BrepFace

class compas.geometry.BrepFace(name=None)[source]

Bases: Data

An interface for a Brep Face.

Attributes
  • is_plane (bool, read-only) – Returns True if this face is a plane, False otherwise.

  • is_cylinder (bool, read-only) – Returns True if this face is a cylinder, False otherwise.

  • is_sphere (bool, read-only) – Returns True if this face is a sphere, False otherwise.

  • is_torus (bool, read-only) – Returns True if this face is a torus, False otherwise.

  • is_cone (bool, read-only) – Returns True if this face is a cone, False otherwise.

  • is_bspline (bool, read-only) – Returns True if this face is a bspline, False otherwise.

  • vertices (list[BrepVertex], read-only) – Returns a list of the vertices comprising this face.

  • edges (list[BrepEdge], read-only) – Returns a list of the edges comprising this face.

  • loops (list[BrepLoop], read-only) – Returns a list of the loops comprising this face.

  • surface (Surface, read-only) – Returns the geometry of this face as a surface.

  • nurbssurface (NurbsSurface, read-only) – Returns the geometry of this face as a NURBS surface.

  • area (float, read-only) – Returns the area of this face’s geometry.

  • centroid (Point, read-only) – Returns the centroid of this face’s geometry.

  • is_valid (bool, read-only) – Return True if this face is valid, False otherwise.

Methods

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.

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

from_data

Construct an object of this type from the provided data.

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.

sha256

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

to_data

Convert an object to its native data representation.

to_json

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

to_jsonstring

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

validate_data

Validate the object's data against its data schema.

validate_json

Validate the object's data against its json schema.