Fix #3261 : You can now purge unused openings that do not intersect with their related building element.

It's a naive implementation and very inefficient. Moreover there may be false positives because it's testing overlapping the evaluated mesh element with all openings applied.
This commit is contained in:
Gorgious56
2025-01-03 17:37:46 +01:00
parent 7bfa926e6d
commit 3a7488d54b
5 changed files with 61 additions and 8 deletions
@@ -1132,8 +1132,8 @@ def get_aggregate(element: ifcopenshell.entity_instance) -> Union[ifcopenshell.e
element = file.by_type("IfcBeam")[0]
aggregate = ifcopenshell.util.element.get_aggregate(element)
"""
is_not_ifc2x3 = element.file.schema != "IFC2X3"
if decomposes := getattr(element, "Decomposes", None):
is_not_ifc2x3 = element.file.schema != "IFC2X3"
if is_not_ifc2x3 or decomposes[0].is_a("IfcRelAggregates"):
return decomposes[0].RelatingObject