OCCBrepFace

class compas_occ.brep.OCCBrepFace(occ_face)

Bases: BrepFace

Class representing a face in the BRep of a geometric shape.

Parameters:
occ_faceTopoDS.TopoDS_Face

An OCC BRep face.

Attributes:
verticeslist[BrepVertex], read-only

List of BRep vertices.

edgeslist[BrepEdge], read-only

List of BRep edges.

loopslist[BrepLoop], read-only

List of BRep loops.

surfaceGeomAdaptor_Surface

Surface geometry from the adaptor.

Methods

add_loop

Add an inner loop to the face.

add_loops

Add an inner loop to the face.

fix

Try to fix the face.

from_cone

Construct a face from a cone.

from_cylinder

Construct a face from a cylinder.

from_plane

Construct a face from a plane.

from_polygon

Construct a BRep face from a polygon.

from_sphere

Construct a face from a sphere.

from_surface

Construct a face from a surface.

from_torus

Construct a face from a torus.

is_equal

Check if this face is equal to another face.

is_same

Check if this face is the same as another face.

is_valid

Verify that the face is valid.

to_cone

Convert the face surface geometry to a cone.

to_cylinder

Convert the face surface geometry to a cylinder.

to_plane

Convert the face surface geometry to a plane.

to_polygon

Convert the face to a polygon without underlying geometry.

to_sphere

Convert the face surface geometry to a sphere.

to_torus

Convert the face surface geometry to a torus.

try_get_nurbssurface

Try to convert the underlying geometry to a Nurbs surface.

Inherited Methods

ToString

Converts the instance to a string.

adjacent_faces

Returns a list of the faces adjacent to this face.

as_brep

Returns a Brep representation of this face.

copy

Make an independent copy of the data object.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

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.

validate_data

Validate the data against the object's data schema.