ifcopenshell.api.feature.remove_feature¶
Module Contents¶
- ifcopenshell.api.feature.remove_feature.remove_feature(file: ifcopenshell.file, feature: ifcopenshell.entity_instance) None¶
Permanently delete a feature element and its void or projection relationship.
The feature entity (e.g. IfcOpeningElement) is removed from the model along with its IfcRelVoidsElement or IfcRelProjectsElement relationship. The host element (wall, slab, etc.) is unaffected. Any fillings (windows, doors) that occupied the opening become orphaned and must be separately deleted via root.remove_product.
- 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)