Skip to content

compas_brep.operations ¤

Pluggable operations for compas_brep — implemented by the active backend (OCC or Rhino).

Functions:¤

brep_extract_topology ¤

brep_extract_topology(brep: Brep) -> None

Populate a Brep's topology lists in-place from its native backend shape.

Called lazily the first time topology (vertices, edges, loops, faces) is accessed on a Brep that was returned from a backend operation without eager extraction.

brep_rebuild ¤

brep_rebuild(brep: Brep, data: dict) -> None

Rebuild the native backend object from a STEP-inspired JSON data dict.

Called from Brep.from_data to reconstruct the native shape. Requires an active backend (OCC or Rhino).

brep_to_data ¤

brep_to_data(brep: Brep) -> dict

Extract a STEP-inspired JSON-serializable dict from the native backend.

Called from Brep.data to produce the canonical serialization. Requires an active backend (OCC or Rhino).

face_to_nurbssurface ¤

face_to_nurbssurface(face: Any) -> Any

Convert the underlying surface of a backend-backed face to a NurbsSurface.