Revolution
- class compas_ifc.representations.Revolution(profile, axis_point, axis_direction, angle, frame=None, name=None)
Bases:
GeometryA solid defined by revolving a 2D profile around an axis.
Directly corresponds to
IfcRevolvedAreaSolid. Preserves the parametric data that is lost when ifcopenshell evaluates the shape into tessellated or OCC geometry.- Parameters:
- profile
Polygon|Circle| tuple[Polygon, list[Polygon]] The swept 2D profile. Same conventions as
Extrusion.- axis_point
Point Origin of the revolution axis (in local frame coordinates).
- axis_direction
Vector Unit direction of the revolution axis (in local frame coordinates).
- anglefloat
Revolution angle in degrees (IFC convention). Use 360 for a full revolution.
- frame
Frame, optional Local placement of the solid. Corresponds to
IfcRevolvedAreaSolid.Position.- namestr, optional
Optional name for the revolution.
- profile
- Attributes:
- profile
Polygon|Circle| tuple[Polygon, list[Polygon]] - axis_point
Point - axis_direction
Vector - anglefloat
- frame
Frame - namestr or None
- profile
Methods
Return a deep copy of this revolution.
Approximate surface area from mesh discretisation.
Convert the revolution to a
compas.datastructures.Mesh.Discretise the revolution into vertices and faces.
Transform the revolution by transforming its frame.
Compute the volume via Pappus's centroid theorem.
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.
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.