From 570513b60be61d8070a188718b9215d9b4276ec1 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Tue, 11 Mar 2025 09:13:48 +1100 Subject: [PATCH] Revert "util.get_element_systems to consider all kinds of ifcsystems" This reverts commit f3f7939c8b9e93216ae4d8331aba40099a33decb. --- src/ifcopenshell-python/ifcopenshell/util/system.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/util/system.py b/src/ifcopenshell-python/ifcopenshell/util/system.py index 3cfc842ebb..ac19ab3c35 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/system.py +++ b/src/ifcopenshell-python/ifcopenshell/util/system.py @@ -66,8 +66,13 @@ def get_system_elements(system: ifcopenshell.entity_instance) -> list[ifcopenshe def get_element_systems(element: ifcopenshell.entity_instance) -> list[ifcopenshell.entity_instance]: results = [] for rel in element.HasAssignments: - if rel.is_a("IfcRelAssignsToGroup") and (group := rel.RelatingGroup).is_a("IfcSystem"): - results.append(group) + if rel.is_a("IfcRelAssignsToGroup") and rel.RelatingGroup.is_a() in ( + "IfcSystem", + "IfcDistributionSystem", + "IfcBuildingSystem", + "IfcZone", + ): + results.append(rel.RelatingGroup) return results