ifcopenshell.api.feature.remove_feature

Module Contents

ifcopenshell.api.feature.remove_feature.remove_feature(file: ifcopenshell.file, feature: ifcopenshell.entity_instance) None

Remove a feature

Fillings are retained as orphans. Featured elements remain. Features cannot exist by themselves, so not only is the relationship removed, the feature is also removed.

Parameters:

feature – The IfcFeatureElement to remove.

Example:

# Create an orphaned opening. Note that an orphaned opening is
# invalid, as an opening can only exist when voiding another
# element.
feature = ifcopenshell.api.root.create_entity(model, ifc_class="IfcOpeningElement")

# Remove it. This brings us back to a valid model.
ifcopenshell.api.feature.remove_feature(model, feature=feature)