RhinoBrep

class compas_rhino.geometry.RhinoBrep[source]

Bases: Brep

Rhino Brep backend class.

Wraps around and allows serialization and de-serialization of a Rhino.Geometry.Brep.

Attributes:
native_brepRhino.Geometry.Brep

The underlying Rhino Brep instance.

verticeslist[compas_rhino.geometry.RhinoBrepVertex], read-only

The list of vertices which comprise this Brep.

pointslist[compas.geometry.Point], read-only

The list of vertex geometries as points in 3D space.

edgeslist[compas_rhino.geometry.RhinoBrepEdge], read-only

The list of edges which comprise this brep.

trimslist[compas_rhino.geometry.RhinoBrepTrim], read-only

The list of trims which comprise this brep.

loopslist[compas_rhino.geometry.RhinoBrepLoop], read-only

The list of loops which comprise this brep.

faceslist[compas_rhino.geometry.RhinoBrepFace], read-only

The list of faces which comprise this brep.

framecompas.geometry.Frame, read-only

The brep’s origin (Frame.worldXY()).

areafloat, read-only

The calculated area of this brep.

volumefloat, read-only

The calculated volume of this brep.

centroidcompas.geometry.Point, read-only

The calculated centroid of this brep.

curveslist[compas_rhino.geometry.RhinoNurbsCurve], read-only

The list of curves which comprise this brep.

is_closedbool, read-only

True if this brep is closed, False otherwise.

is_compoundbool, read-only

True if this brep is compound, False otherwise.

is_compoundsolidbool, read-only

True if this brep is compound solid, False otherwise.

is_convexbool, read-only

True if this brep is convex, False otherwise.

is_infinitebool, read-only

True if this brep is infinite, False otherwise.

is_orientablebool, read-only

True if this brep is orientable, False otherwise.

is_shellbool, read-only

True if this brep is a shell, False otherwise.

is_surfacebool, read-only

True if this brep is a surface, False otherwise.

is_validbool, read-only

True if this brep is valid, False otherwise.

orientationliteral(BrepOrientation), read-only

The orientation of this brep. One of: FORWARD, REVERSED, INTERNAL, EXTERNAL.

shellslist[compas_rhino.geometry.RhinoBrep], read-only

The list of shells which comprise this brep.

solidslist[compas_rhino.geometry.RhinoBrep], read-only

The list of solids which comprise this brep.

surfaceslist[compas_rhino.geometry.RhinoNurbsSurface], read-only

The list of surfaces which comprise this brep.

Methods

cap_planar_holes

Cap all planar holes in the Brep.

contains

Check if the Brep contains a given geometric primitive.

copy

Creates a deep-copy of this Brep using the native Rhino.Geometry.Brep copying mechanism.

fillet

Fillet edges of the Brep.

filleted

Returns a filleted copy of the Brep.

flip

Flip the orientation of all faces of the Brep.

from_boolean_difference

Construct a Brep from the boolean difference of two groups of Breps.

from_boolean_intersection

Construct a Brep from the boolean intersection of two groups of Breps.

from_boolean_union

Construct a Brep from the boolean union of two groups of Breps.

from_box

Create a RhinoBrep from a box.

from_brepfaces

Create a Brep from a list of Brep faces forming an open or closed shell.

from_breps

Joins the breps at any overlapping edges to form as few as possible resulting breps.

from_cone

Create a RhinoBrep from a cone.

from_curves

Create a RhinoBreps from a list of planar face boundary curves.

from_cylinder

Create a RhinoBrep from a box.

from_extrusion

Create a RhinoBrep from an extrusion.

from_iges

Construct a RhinoBrep from a IGES file.

from_loft

Construct a Brep by lofting a set of curves.

from_mesh

Create a RhinoBrep from a mesh.

from_native

Constructs a RhinoBrep from an instance of a Rhino.Geometry.Brep.

from_pipe

Construct a Brep by extruding a circle curve along the path curve.

from_plane

Create a RhinoBrep from a plane.

from_polygons

Create a RhinoBrep from a list of polygons.

from_sphere

Create a RhinoBrep from a sphere.

from_step

Construct a RhinoBrep from a STEP file.

from_sweep

Construct one or more RhinoBrep(s) from a sweep operation.

from_torus

Construct a RhinoBrep from a COMPAS torus.

slice

Slice through the Brep with a plane.

split

Splits a Brep into pieces using a Brep as a cutter.

to_meshes

Convert the faces of this Brep shape to meshes.

to_step

Write the Brep shape to a STEP file.

to_viewmesh

Convert the Brep to a single view mesh.

transform

Transform this Brep by given transformation matrix

trim

Trim this brep by the given trimming plane.

trimmed

Returns a trimmed copy of this brep by the given trimming plane.

Inherited Methods

ToString

Converts the instance to a string.

compute_aabb

Compute the axis-aligned bounding box of the geometry.

compute_obb

Compute the oriented bounding box of the geometry.

contours

Generate contour lines by slicing the Brep shape with a series of planes.

cull_unused_edges

Remove all unused edges.

cull_unused_faces

Remove all unused faces.

cull_unused_loops

Remove all unused loops.

cull_unused_vertices

Remove all unused vertices.

edge_faces

Identify the faces connected to a given edge.

edge_loop

Identify the parent loops of the a given edge.

fix

Fix the shell.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

from_planes

Construct a Brep from a set of planes.

heal

Heal the shape.

make_solid

Convert the current shape to a solid if it is a shell.

overlap

Compute the overlap between this BRep and another.

rotate

Rotate the geometry.

rotated

Returns a rotated copy of this geometry.

scale

Scale the geometry.

scaled

Returns a scaled copy of this geometry.

sew

Sew together the individual parts of the shape.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_iges

Write the Brep shape to an IGES file.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

to_polygons

Convert the faces of this Brep shape to polygons.

to_stl

Write the Brep shape to an STL file.

to_tesselation

Create a tesselation of the shape for visualisation.

transformed

Returns a transformed copy of this geometry.

translate

Translate the geometry.

translated

Returns a translated copy of this geometry.

validate_data

Validate the data against the object's data schema.

vertex_edges

Identify the edges connected to a given vertex.

vertex_faces

Identify the faces connected to a vertex.

vertex_neighbors

Identify the neighbouring vertices of a given vertex.