Brep

class rhino3dm.Brep
Brep()

Brep constructor

Faces

Collections.BrepFaceList: Gets the brep faces list accessor.

Surfaces

Collections.BrepSurfaceList: Parametric surfaces used by faces

Edges

Collections.BrepEdgeList: Gets the brep edges list accessor.

Vertices

Collections.BrepVertexList: Gets the brep vertices list accessor.

IsSolid

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

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.

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.

static TryConvertBrep(geometry)

Attempts to convert a generic Geometry object into a Brep.

Parameters:

geometry (rhino3dm.GeometryBase) – Geometry to convert, not all types of GeometryBase can be represented by BReps.

Returns:

Brep if a brep form could be created or None 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.

Return type:

rhino3dm.Brep

static CreateFromMesh(mesh, trimmedTriangles)

Create a brep representation of a mesh

Return type:

rhino3dm.Brep

static CreateFromBoundingBox(bbox)

[todo] add documentation

static CreateFromBox(box)

Constructs new brep that matches a bounding box.

Parameters:

box (rhino3dm.BoundingBox) – A box to use for creation.

Returns:

A new brep; or None on failure.

Return type:

rhino3dm.Brep

static CreateFromCylinder(cylinder, capBottom, capTop)

Constructs a Brep definition of a cylinder.

Parameters:
  • 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.

Return type:

rhino3dm.Brep

static CreateFromSphere(sphere)

Constructs a Brep definition of a sphere.

Parameters:

sphere (rhino3dm.Sphere) – The input sphere provides the orienting plane and radius.

Returns:

A Brep if successful, None on error.

Return type:

rhino3dm.Brep

static CreateQuadSphere(sphere)

Constructs a Brep definition of a quad sphere.

Parameters:

sphere (rhino3dm.Sphere) – The input sphere provides the orienting plane and radius.

Returns:

A Brep if successful, None on error.

Return type:

rhino3dm.Brep

static CreateFromCone(cone, capBottom)

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:
  • cone (Cone) – A cone value.

  • capBottom (bool) – if True the base of the cone should be capped.

Returns:

A Brep if successful, None on error.

Return type:

rhino3dm.Brep

static CreateFromRevSurface(surface, capStart, capEnd)

Constructs a brep form of a surface of revolution.

Parameters:
  • 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, None on error.

Return type:

rhino3dm.Brep

static CreateFromSurface(surface)

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:

surface (rhino3dm.Surface) – A surface to convert.

Returns:

Resulting brep or None on failure.

Return type:

rhino3dm.Brep

static CreateTrimmedPlane(plane, curve)

Create a Brep trimmed plane.

Parameters:
  • plane (rhino3dm.Plane) – Plane that will be trimmed.

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

Returns:

Resulting brep or None on failure.

Return type:

rhino3dm.Brep

Flip()

Reverses entire brep orientation of all faces.

Return type:

void