Class Brep

Hierarchy (view full)

Constructors

Properties

hasBrepForm: boolean

Returns true if the Brep.TryConvertBrep function will be successful for this object

isDeformable: boolean

true if object can be accurately modified with "squishy" transformations like projections, shears, and non-uniform scaling.

isManifold: boolean

Gets a value indicating whether or not the Brep is manifold. Non-Manifold breps have at least one edge that is shared among three or more faces.

isSolid: boolean

Determines whether this brep is a solid, or a closed oriented manifold.

isSurface: boolean

Returns true if the Brep has a single face and that face is geometrically the same as the underlying surface. I.e., the face has trivial trimming. In this case, the surface is the first face surface. The flag Brep.Faces[0].OrientationIsReversed records the correspondence between the surface's natural parametric orientation and the orientation of the Brep.trivial trimming here means that there is only one loop curve in the brep and that loop curve is the same as the underlying surface boundary.

isValid: boolean

Tests an object to see if it is valid.

isValidWithLog: [boolean, string]

...

objectType: ObjectType

Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.

userStringCount: number

Gets the amount of user strings.

Methods

  • Returns void

    Description

    Reverses entire brep orientation of all faces.

  • Parameters

    • accurate: boolean

      If true, a physically accurate bounding box will be computed. If not, a bounding box estimate will be computed. For some geometry types there is no difference between the estimate and the accurate bounding box. Estimated bounding boxes can be computed much (much) faster than accurate (or "tight") bounding boxes. Estimated bounding boxes are always similar to or larger than accurate bounding boxes.

    Returns BoundingBox

    The bounding box of the geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.

    Description

    Bounding box solver. Gets the world axis aligned bounding box for the geometry.

  • Parameters

    • key: string

      id used to retrieve the string.

    Returns string

    string associated with the key if successful. null if no key was found.

    Description

    Gets user string from this geometry.

  • Returns boolean

    false if object cannot be converted to a deformable object. true if object was already deformable or was converted into a deformable object.

    Description

    If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.

  • Parameters

    • angleRadians: number

      Angle of rotation in radians.

    • rotationAxis: number[]

      Direction of the axis of rotation.

    • rotationCenter: number[]

      Point on the axis of rotation.

    Returns boolean

    true if geometry successfully rotated.

    Description

    Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).

  • Parameters

    • scaleFactor: number

      The uniform scaling factor.

    Returns boolean

    true if geometry successfully scaled.

    Description

    Scales the object by the specified factor. The scale is centered at the origin.

  • Parameters

    • key: string

      id used to retrieve this string.

    • value: string

      string associated with key.

    Returns boolean

    true if successful, false if not.

    Description

    Attach a user string (key,value combination) to this geometry.

  • Parameters

    • xform: Transform

      Transformation to apply to geometry.

    Returns boolean

    true if geometry successfully transformed.

    Description

    Transforms the geometry. If the input Transform has a SimilarityType of OrientationReversing, you may want to consider flipping the transformed geometry after calling this function when it makes sense. For example, you may want to call Flip() on a Brep after transforming it.

  • Parameters

    • translationVector: number[]

      A moving vector.

    Returns boolean

    true if geometry successfully translated.

    Description

    Translates the object along the specified vector.

  • Constructs new brep that matches an aligned box.

    Parameters

    • box: Box

      Box to match.

    Returns Brep

    A Brep with 6 faces that is similar to the Box.

  • Constructs new brep that matches a bounding box.

    Parameters

    Returns Brep

    A new brep; or null on failure.

  • Parameters

    • cone: Cone

      A cone value.

    • capBottom: boolean

      if true the base of the cone should be capped.

    Returns Brep

    A Brep if successful, null on error.

    Description

    Constructs a Brep representation of the cone with a single face for the cone, an edge along the cone seam, and vertices at the base and apex ends of this seam edge. The optional cap is a single face with one circular edge starting and ending at the base vertex.

  • Parameters

    • cylinder: Cylinder

      cylinder.IsFinite() must be true.

    • capBottom: boolean

      if true end at cylinder.m_height[0] should be capped.

    • capTop: boolean

      if true end at cylinder.m_height[1] should be capped.

    Returns Brep

    A Brep representation of the cylinder with a single face for the cylinder, an edge along the cylinder seam, and vertices at the bottom and top ends of this seam edge. The optional bottom/top caps are single faces with one circular edge starting and ending at the bottom/top vertex.

    Description

    Constructs a Brep definition of a cylinder.

  • Parameters

    • trimmedTriangles: boolean

      if true, triangles in the mesh will be represented by trimmed planes in the brep. If false, triangles in the mesh will be represented by untrimmed singular bilinear NURBS surfaces in the brep.

    Returns Brep

    Description

    Create a brep representation of a mesh

  • Parameters

    • surface: RevSurface

      The surface of revolution.

    • capStart: boolean

      if true, the start of the revolute is not on the axis of revolution, and the surface of revolution is closed, then a circular cap will be added to close of the hole at the start of the revolute.

    • capEnd: boolean

      if true, the end of the revolute is not on the axis of revolution, and the surface of revolution is closed, then a circular cap will be added to close of the hole at the end of the revolute.

    Returns Brep

    A Brep if successful, null on error.

    Description

    Constructs a brep form of a surface of revolution.

  • Parameters

    • sphere: Sphere

      The input sphere provides the orienting plane and radius.

    Returns Brep

    A Brep if successful, null on error.

    Description

    Constructs a Brep definition of a sphere.

  • Parameters

    • surface: Surface

      A surface to convert.

    Returns Brep

    Resulting brep or null on failure.

    Description

    Constructs a Brep from a surface. The resulting Brep has an outer boundary made from four trims. The trims are ordered so that they run along the south, east, north, and then west side of the surface's parameter space.

  • Parameters

    • sphere: Sphere

      The input sphere provides the orienting plane and radius.

    Returns Brep

    A Brep if successful, null on error.

    Description

    Constructs a Brep definition of a quad sphere.

  • Parameters

    • plane: Plane

      Plane that will be trimmed.

    • curve: Curve

      A simple (no self intersections) closed curve that defines the outer boundary of the trimmed plane.

    Returns Brep

    Resulting brep or null on failure.

    Description

    Create a Brep trimmed plane.

  • Parameters

    • json: object

      A json formatted object in the following format (values are orientative):

      {
      version: 10000,
      archive3dm: 60,
      opennurbs: -1877964208,
      data: 'encoded 3dm object data'
      }

    Returns CommonObject

    Description

    Decodes a Rhino Object

  • Parameters

    • geometry: GeometryBase

      Geometry to convert, not all types of GeometryBase can be represented by BReps.

    Returns Brep

    Brep if a brep form could be created or null if this is not possible. If geometry was of type Brep to begin with, the same object is returned, i.e. it is not duplicated.

    Description

    Attempts to convert a generic Geometry object into a Brep.

Generated using TypeDoc