Extrusion
- class compas_ifc.representations.Extrusion(profile, direction, depth, frame=None, name=None)
Bases:
GeometryA solid defined by sweeping a 2D profile along a direction.
Directly corresponds to
IfcExtrudedAreaSolid. 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. A
Polygonfor simple closed profiles, aCirclefor circular profiles, or a(outer, [inner, ...])tuple for profiles with voids.- direction
Vector Unit direction of the extrusion (in local frame coordinates).
- depthfloat
Length of the extrusion along direction.
- frame
Frame, optional Local placement of the extrusion solid. Corresponds to
IfcExtrudedAreaSolid.Position.- namestr, optional
Optional name for the extrusion.
- profile
- Attributes:
- profile
Polygon|Circle| tuple[Polygon, list[Polygon]] The swept 2D profile.
- direction
Vector Extrusion direction.
- depthfloat
Extrusion depth.
- frame
Frame Local coordinate frame.
- namestr or None
Optional name.
- profile
Methods
Compute the axis-aligned bounding box of the geometry.
Return a deep copy of this extrusion.
Compute the exact surface area of the extrusion.
Convert the extrusion to a
compas.datastructures.Mesh.Discretise the extrusion into vertices and faces.
Transform the extrusion by transforming its frame.
Compute the exact volume of the extrusion.
Inherited Methods
Converts the instance to a string.
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.