BrepFace

class compas.geometry.BrepFace[source]

Bases: Data

An interface for a Brep Face.

Attributes:
areafloat, read-only

Returns the area of this face’s geometry.

centroidcompas.geometry.Point, read-only

Returns the centroid of this face’s geometry.

edgeslist[compas.geometry.BrepEdge], read-only

Returns a list of the edges comprising this face.

is_bsplinebool, read-only

Returns True if this face is a bspline, False otherwise.

is_conebool, read-only

Returns True if this face is a cone, False otherwise.

is_cylinderbool, read-only

Returns True if this face is a cylinder, False otherwise.

is_planebool, read-only

Returns True if this face is a plane, False otherwise.

is_spherebool, read-only

Returns True if this face is a sphere, False otherwise.

is_torusbool, read-only

Returns True if this face is a torus, False otherwise.

is_validbool, read-only

Return True if this face is valid, False otherwise.

loopslist[compas.geometry.BrepLoop], read-only

Returns a list of the loops comprising this face.

native_faceAny

The underlying face object. Type is backend-dependent.

nurbssurfacecompas.geometry.NurbsSurface, read-only

Returns the geometry of this face as a NURBS surface.

surfacecompas.geometry.Surface, read-only

Returns the geometry of this face as a surface.

typeliteral(SurfaceType), read-only

Returns the surface type of this face. One of: PLANE, CYLINDER, CONE, SPHERE, TORUS, BEZIER_SURFACE, BSPLINE_SURFACE, SURFACE_OF_REVOLUTION, SURFACE_OF_EXTRUSTION, OFFSET_SURFACE, OTHER_SURFACE.

verticeslist[compas.geometry.BrepVertex], read-only

Returns a list of the vertices comprising this face.

Methods

add_loop

Adds an inner loop to this face.

add_loops

Adds several inner loops to this face.

adjacent_faces

Returns a list of the faces adjacent to this face.

as_brep

Returns a Brep representation of this face.

from_cone

Construct a face from a cone geometry.

from_cylinder

Construct a face from a cylinder geometry.

from_plane

Construct a face from a plane geometry.

from_sphere

Construct a face from a sphere geometry.

from_surface

Construct a face from a surfaces geometry.

from_torus

Construct a face from a torus geometry.

to_polygon

Convert the face to a polygon without underlying geometry.

try_get_nurbssurface

Returns the NURBS surface representation of this face.

Inherited Methods

ToString

Converts the instance to a string.

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.