Brep

Brep

Boundary Representation. A surface or polysurface along with trim curve information.

Constructor

new Brep()

Extends

Members

hasBrepForm :bool

Inherited From:
Returns true if the Brep.TryConvertBrep function will be successful for this object
Type:
  • bool

isDeformable :bool

Inherited From:
true if object can be accurately modified with "squishy" transformations like projections, shears, and non-uniform scaling.
Type:
  • bool

isManifold :bool

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.
Type:
  • bool

isSolid :bool

Determines whether this brep is a solid, or a closed oriented manifold.
Type:
  • bool

isSurface :bool

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.
Type:
  • bool

isValid :bool

Inherited From:
Tests an object to see if it is valid.
Type:
  • bool

objectType :ObjectType

Inherited From:
Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
Type:
  • ObjectType

userStringCount

Inherited From:

Methods

(static) createFromBox(box) → {Brep}

Constructs new brep that matches a bounding box.
Parameters:
Name Type Description
box BoundingBox A box to use for creation.
Returns:
A new brep; or null on failure.
Type
Brep

(static) createFromCone(cone, capBottom) → {Brep}

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:
Name Type Description
cone Cone A cone value.
capBottom bool if true the base of the cone should be capped.
Returns:
A Brep if successful, null on error.
Type
Brep

(static) createFromCylinder(cylinder, capBottom, capTop) → {Brep}

Constructs a Brep definition of a cylinder.
Parameters:
Name Type Description
cylinder Cylinder cylinder.IsFinite() must be true.
capBottom bool if true end at cylinder.m_height[0] should be capped.
capTop bool if true end at cylinder.m_height[1] should be capped.
Returns:
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.
Type
Brep

(static) createFromMesh(trimmedTriangles)

Create a brep representation of a mesh
Parameters:
Name Type Description
trimmedTriangles bool 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.

(static) createFromRevSurface(surface, capStart, capEnd) → {Brep}

Constructs a brep form of a surface of revolution.
Parameters:
Name Type Description
surface RevSurface The surface of revolution.
capStart bool 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 bool 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:
A Brep if successful, null on error.
Type
Brep

(static) createFromSphere(sphere) → {Brep}

Constructs a Brep definition of a sphere.
Parameters:
Name Type Description
sphere Sphere The input sphere provides the orienting plane and radius.
Returns:
A Brep if successful, null on error.
Type
Brep

(static) createFromSurface(surface) → {Brep}

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:
Name Type Description
surface Surface A surface to convert.
Returns:
Resulting brep or null on failure.
Type
Brep

(static) createQuadSphere(sphere) → {Brep}

Constructs a Brep definition of a quad sphere.
Parameters:
Name Type Description
sphere Sphere The input sphere provides the orienting plane and radius.
Returns:
A Brep if successful, null on error.
Type
Brep

(static) createTrimmedPlane(plane, curve) → {Brep}

Create a Brep trimmed plane.
Parameters:
Name Type Description
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:
Resulting brep or null on failure.
Type
Brep

duplicate() → {GeometryBase}

Inherited From:
Constructs a deep (full) copy of this object.
Returns:
An object of the same type as this, with the same properties and behavior.
Type
GeometryBase

edges()

...

encode()

Inherited From:
...

faces()

...

flip()

Reverses entire brep orientation of all faces.

getBoundingBox(plane) → {Array}

Inherited From:
Aligned Bounding box solver. Gets the plane aligned bounding box.
Parameters:
Name Type Description
plane Plane Orientation plane for BoundingBox.
Returns:
[BoundingBox, Box]
  • (BoundingBox) A BoundingBox in plane coordinates.
  • (Box) Aligned box in World coordinates.
Type
Array

getUserString()

Inherited From:
...

getUserStrings()

Inherited From:
...

makeDeformable() → {bool}

Inherited From:
If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.
Returns:
false if object cannot be converted to a deformable object. true if object was already deformable or was converted into a deformable object.
Type
bool

rdkXml()

Inherited From:
...

rotate(angleRadians, rotationAxis, rotationCenter) → {bool}

Inherited From:
Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).
Parameters:
Name Type Description
angleRadians double Angle of rotation in radians.
rotationAxis Array.<x, y, z> Direction of the axis of rotation.
rotationCenter Array.<x, y, z> Point on the axis of rotation.
Returns:
true if geometry successfully rotated.
Type
bool

scale(scaleFactor) → {bool}

Inherited From:
Scales the object by the specified factor. The scale is centered at the origin.
Parameters:
Name Type Description
scaleFactor double The uniform scaling factor.
Returns:
true if geometry successfully scaled.
Type
bool

setUserString()

Inherited From:
...

surfaces()

...

toJSON()

Inherited From:
Create a JSON string representation of this object

transform(xform) → {bool}

Inherited From:
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:
Name Type Description
xform Transform Transformation to apply to geometry.
Returns:
true if geometry successfully transformed.
Type
bool

translate(translationVector) → {bool}

Inherited From:
Translates the object along the specified vector.
Parameters:
Name Type Description
translationVector Array.<x, y, z> A moving vector.
Returns:
true if geometry successfully translated.
Type
bool