BuildingInformationModel.add_element

BuildingInformationModel.add_element(element, parent=None, material=None)

Add a GenericElement to the model tree and create its IFC entity.

For elements loaded from IFC (with an existing _ifc_entity), only the compas_model bookkeeping is performed. For programmatically created elements, the IFC entity, relationship, geometry representation, and placement are all created in the underlying IFC file.

Parameters:
elementGenericElement

The element to add.

parentGenericElement, optional

Parent element in the spatial hierarchy.

materialoptional

Material to assign (from compas_model).

Returns:
GenericElement