Support other voiding IfcFeatureElementSubtraction elements #3889

Support other voiding IfcFeatureElementSubtraction besides IfcOpeningElement.
This commit is contained in:
Andrej730
2023-10-16 15:05:40 +05:00
parent ce8598a0b4
commit 24eb149221
4 changed files with 16 additions and 4 deletions
@@ -130,7 +130,7 @@ class Usecase:
elif inverse.is_a("IfcRelVoidsElement") and inverse.RelatingBuildingElement == from_element:
opening = inverse.RelatedOpeningElement
# We don't copy filled openings, since there is no guarantee the filling is also copied
if not opening.HasFillings:
if not opening.is_a("IfcOpeningElement") or not opening.HasFillings:
new_opening = ifcopenshell.api.run("root.copy_class", self.file, product=opening)
new_opening.VoidsElements[0].RelatingBuildingElement = to_element
if new_opening.ObjectPlacement and new_opening.ObjectPlacement.is_a("IfcLocalPlacement"):