RhinoBrep

class compas_rhino.geometry.RhinoBrep(*args, **kwargs)[source]

Bases: Brep

Rhino Brep backend class.

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

Attributes
  • native_brep (Rhino.Geometry.Brep) – The underlying Rhino Brep instance.

  • vertices (list[RhinoBrepVertex], read-only) – The list of vertices which comprise this Brep.

  • points (list[Point], read-only) – The list of vertex geometries as points in 3D space.

  • edges (list[RhinoBrepEdge], read-only) – The list of edges which comprise this brep.

  • trims (list[RhinoBrepTrim], read-only) – The list of trims which comprise this brep.

  • loops (list[RhinoBrepLoop], read-only) – The list of loops which comprise this brep.

  • faces (list[RhinoBrepFace], read-only) – The list of faces which comprise this brep.

  • frame (Frame, read-only) – The brep’s origin (Frame.worldXY()).

  • area (float, read-only) – The calculated area of this brep.

  • volume (float, read-only) – The calculated volume of this brep.

Methods

copy

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

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_cylinder

Create a RhinoBrep from a box.

from_native

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

from_sphere

Create a RhinoBrep from a sphere.

split

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

transform

Transform this Brep by given transformation matrix

trim

Trim this brep by the given trimming plane

Inherited Methods

ToString

Converts the instance to a string.

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.

fix

Fix the shell.

from_brepfaces

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

from_cone

Construct a Brep from a COMPAS cone.

from_curves

Construct a Brep from a set of curves.

from_data

Construct an object of this type from the provided data.

from_extrusion

Construct a Brep by extruding a closed curve along a direction vector.

from_json

Construct an object from serialized data contained in a JSON file.

from_jsonstring

Construct an object from serialized data contained in a JSON string.

from_mesh

Construct a Brep from a COMPAS mesh.

from_polygons

Construct a Brep from a set of polygons.

from_step_file

Conctruct a Brep from the data contained in a STEP file.

from_sweep

Construct a BRep by sweeping a profile along a path.

from_torus

Construct a Brep from a COMPAS torus.

make_solid

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

overlap

Compute the overlap between this BRep and another.

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.

slice

Slice through the BRep with a plane.

to_data

Convert an object to its native data representation.

to_json

Export the BRep to a JSON file.

to_jsonstring

Serialize the data representation of an object to a JSON string.

to_meshes

Convert the faces of this Brep shape to meshes.

to_step

Write the BRep shape to a STEP file.

to_tesselation

Create a tesselation of the shape for visualisation.

to_viewmesh

Convert this Brep to a view mesh.

transformed

Returns a transformed copy of this geometry.

validate_data

Validate the object's data against its data schema.

validate_json

Validate the object's data against its json 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.