Polyhedron
- class compas.geometry.Polyhedron[source]
Bases:
Geometry
A polyhedron is a geometric object defined by its vertices and faces.
- Parameters:
- verticeslist[[float, float, float] |
compas.geometry.Point
] The point locations of the vertices of the polyhedron.
- faceslist[list[int]]
The faces as a list of index lists.
- namestr, optional
The name of the polyhedron.
- verticeslist[[float, float, float] |
- Attributes:
- verticeslist[list[float]]
The XYZ coordinates of the vertices of the polyhedron.
- faceslist[list[int]]
The faces of the polyhedron defined as lists of vertex indices.
- edgeslist[tuple[int, int]], read-only
The edges of the polyhedron as vertex index pairs.
Methods
Compute the boolean difference of this polyhedron and another.
Compute the boolean intersection of this polyhedron and another.
Compute the boolean union of this polyhedron and another.
Construct a polyhedron from the convex hull of a set of points.
Construct a polyhedron from its half-spaces and one interior point.
Construct a polyhedron from intersecting planes.
Construct a polyhedron from one of the platonic solids.
Verify that the polyhedron forms a closed surface.
Returns a mesh representation of the polyhedron.
Returns a list of vertices and faces.
Transform the polyhedron.
Inherited Methods
Converts the instance to a string.
Compute the axis-aligned bounding box of the geometry.
Compute the oriented bounding box of the geometry.
Make an independent copy of the data object.
Construct an object of this type from a JSON file.
Construct an object of this type from a JSON string.
Rotate the geometry.
Returns a rotated copy of this geometry.
Scale the geometry.
Returns a scaled copy of this geometry.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Convert an object to its native data representation and save it to a JSON file.
Convert an object to its native data representation and save it to a JSON string.
Returns a transformed copy of this geometry.
Translate the geometry.
Returns a translated copy of this geometry.
Validate the data against the object's data schema.