ClippedExtrusion

class compas_ifc.representations.ClippedExtrusion(extrusion, clipping_planes, name=None)

Bases: Geometry

An extrusion clipped by one or more half-space planes.

Directly corresponds to a chain of IfcBooleanClippingResult entities with Operator=DIFFERENCE. The leaf FirstOperand is an IfcExtrudedAreaSolid and each SecondOperand is an IfcHalfSpaceSolid.

Preserves all parametric data: the base extrusion profile, direction, depth and frame, plus every clipping plane with its agreement flag.

Parameters:
extrusionExtrusion

The base extrusion being clipped.

clipping_planeslist[tuple[Plane, bool]]

Each entry is (plane, agreement_flag). plane defines the clipping surface. agreement_flag True means the solid is on the same side as the plane normal; False means the opposite side.

namestr, optional

Optional name for the geometry.

Attributes:
extrusionExtrusion

The base extrusion.

clipping_planeslist[tuple[Plane, bool]]

Clipping planes with agreement flags.

namestr or None

Optional name.

Methods

__init__

compute_aabb

Compute the axis-aligned bounding box of the geometry.

compute_obb

Compute the oriented bounding box of the geometry.

copy

Return a deep copy of this clipped extrusion.

surface_area

Surface area of the clipped extrusion.

to_mesh

Convert the clipped extrusion to a compas.datastructures.Mesh.

to_vertices_and_faces

Discretise the clipped extrusion into vertices and faces.

transform

Transform the clipped extrusion.

volume

Volume of the clipped extrusion.

Inherited Methods

ToString

Converts the instance to a string.

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.