GenericElement
- class compas_ifc.element.GenericElement(ifc_type='IfcGenericElementProxy', geometry=None, transformation=None, name=None, **kwargs)
Bases:
Generic[T],ElementA unified element representing any building component in an IFC model.
This class extends
compas_model.Elementto bridge IFC entity data with the compas_model infrastructure. It provides a clean, minimal API for accessing element properties while keeping a reference to the underlying IFC entity for advanced access.All IFC product subclasses (IfcWall, IfcSlab, IfcBeam, etc.) as well as spatial containers (IfcSite, IfcBuilding, IfcBuildingStorey) are represented uniformly as
GenericElementinstances with differentifc_typevalues.Property setters are bi-directional: setting geometry, name, properties, or transformation on the element also updates the underlying IFC entity.
- Parameters:
- ifc_typestr, optional
The IFC class name (e.g. “IfcWall”, “IfcSlab”, “IfcBuildingStorey”).
- geometryBrep | Mesh, optional
The geometry of the element.
- transformationTransformation, optional
The local transformation relative to the parent element.
- namestr, optional
The name of the element.
Methods
Computes the Axis Aligned Bounding Box (AABB) of the geometry of the element.
Computes the collision geometry of the geometry of the element.
Detect volumetric collision between this element and another.
Compute contacts between this element and another element.
Compute the geometry of the element in local coordinates.
Computes the Oriented Bounding Box (OBB) of the geometry of the element.
Computes a reference point for the element geometry (e.g.
Computes the triangulated surface mesh of the element's model geometry.
Computes the tetrahedral volumetric mesh of the element's model geometry.
Show this element and its children in compas_viewer.
Inherited Methods
Converts the instance to a string.
Add a feature to the list of features of the element.
Apply the features to the (base) geometry.
Compute the geometry of the element in model coordinates and taking into account the effect of interactions with connected elements.
Compute the transformation to model coordinates of this element based on its position in the spatial hierarchy of the model.
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.
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.
Transforms the element.
Creates a transformed copy of the element.
Validate the data against the object's data schema.