OCCBrep

class compas_occ.brep.OCCBrep(*args, **kwargs)

Bases: Brep

Class for Boundary Representation of geometric entities.

Attributes:
verticeslist[OCCBrepVertex], read-only

The vertices of the Brep.

edgeslist[OCCBrepEdge], read-only

The edges of the Brep.

loopslist[OCCBrepLoop], read-only

The loops of the Brep.

faceslist[OCCBrepFace], read-only

The faces of the Brep.

frameFrame, read-only

The local coordinate system of the Brep.

areafloat, read-only

The surface area of the Brep.

volumefloat, read-only

The volume of the regions contained by the Brep.

Methods

check

Check the shape.

contours

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

copy

Deep-copy this BRep using the native OCC copying mechanism.

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 an edge.

edge_loops

Identify the parent loops of an edge.

fillet

Fillet the edges of a BRep.

filleted

Construct a copy of a Brep with filleted edges.

fix

Fix the shell.

from_boolean_difference

Construct a BRep from the boolean difference of two other BReps.

from_boolean_intersection

Construct a BRep from the boolean intersection of two other BReps.

from_boolean_union

Construct a BRep from the boolean union of two other BReps.

from_box

Construct a BRep from a COMPAS box.

from_brepfaces

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

from_breps

Construct one compound BRep out of multiple individual BReps.

from_cone

Construct a BRep from a COMPAS cone.

from_curves

Construct a BRep from a set of curves.

from_cylinder

Construct a BRep from a COMPAS cylinder.

from_extrusion

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

from_iges

Conctruct a BRep from the data contained in a IGES file.

from_mesh

Construct a BRep from a COMPAS mesh.

from_native

Construct a BRep from an OCC shape.

from_plane

Make a BRep from a plane.

from_planes

Make a BRep from a list of planes.

from_polygons

Construct a BRep from a set of polygons.

from_shape

Construct a BRep from an OCC shape.

from_sphere

Construct a BRep from a COMPAS sphere.

from_step

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

from_surface

Construct a BRep from a COMPAS surface.

from_sweep

Construct a BRep by sweeping a profile along a path.

from_torus

Construct a BRep from a COMPAS torus.

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.

sew

Sew together the individual parts of the shape.

simplify

Simplify the shape by merging colinear edges and coplanar faces.

slice

Slice a BRep with a plane.

split

Split a BRep using another BRep as splitter.

to_iges

Write the BRep shape to a IGES file.

to_meshes

Convert the faces of the BRep shape to meshes.

to_polygons

Convert the faces of the BRep to simple polygons without underlying geometry.

to_step

Write the BRep shape to a STEP file.

to_stl

Write the BRep shape to a STL file.

to_tesselation

Create a tesselation of the shape for visualisation.

to_viewmesh

Convert the BRep to a view mesh.

transform

Transform this Brep.

transformed

Return a transformed copy of the Brep.

trim

Trim a Brep with a plane.

trimmed

Construct a copy of a Brep trimmed with a plane.

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.

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.

contains

Check if the Brep contains a given geometric primitive.

edge_loop

Identify the parent loops of the a given edge.

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_loft

Construct a Brep by lofting a set of curves.

from_pipe

Construct a Brep by extruding a closed curve along a path curve.

rotate

Rotate the geometry.

rotated

Returns a rotated copy of this geometry.

scale

Scale the geometry.

scaled

Returns a scaled copy of this geometry.

sha256

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

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.

translate

Translate the geometry.

translated

Returns a translated copy of this geometry.

validate_data

Validate the data against the object's data schema.