Revolution

class compas_ifc.representations.Revolution(profile, axis_point, axis_direction, angle, frame=None, name=None)

Bases: Geometry

A 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:
profilePolygon | Circle | tuple[Polygon, list[Polygon]]

The swept 2D profile. Same conventions as Extrusion.

axis_pointPoint

Origin of the revolution axis (in local frame coordinates).

axis_directionVector

Unit direction of the revolution axis (in local frame coordinates).

anglefloat

Revolution angle in degrees (IFC convention). Use 360 for a full revolution.

frameFrame, optional

Local placement of the solid. Corresponds to IfcRevolvedAreaSolid.Position.

namestr, optional

Optional name for the revolution.

Attributes:
profilePolygon | Circle | tuple[Polygon, list[Polygon]]
axis_pointPoint
axis_directionVector
anglefloat
frameFrame
namestr or None

Methods

__init__

copy

Return a deep copy of this revolution.

surface_area

Approximate surface area from mesh discretisation.

to_mesh

Convert the revolution to a compas.datastructures.Mesh.

to_vertices_and_faces

Discretise the revolution into vertices and faces.

transform

Transform the revolution by transforming its frame.

volume

Compute the volume via Pappus's centroid theorem.

Inherited Methods

ToString

Converts the instance to a string.

compute_aabb

Compute the axis-aligned bounding box of the geometry.

compute_obb

Compute the oriented bounding box of the geometry.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

rotate

Rotate the geometry.

rotated

Returns a rotated copy of this geometry.

scale

Scale the geometry.

scaled

Returns a scaled copy of this geometry.

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.

transformed

Returns a transformed copy of this geometry.

translate

Translate the geometry.

translated

Returns a translated copy of this geometry.

validate_data

Validate the data against the object's data schema.