From f3f7939c8b9e93216ae4d8331aba40099a33decb Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 10 Mar 2025 14:34:38 +0500 Subject: [PATCH] util.get_element_systems to consider all kinds of ifcsystems --- src/ifcopenshell-python/ifcopenshell/util/system.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/util/system.py b/src/ifcopenshell-python/ifcopenshell/util/system.py index ac19ab3c35..3cfc842ebb 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/system.py +++ b/src/ifcopenshell-python/ifcopenshell/util/system.py @@ -66,13 +66,8 @@ 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 rel.RelatingGroup.is_a() in ( - "IfcSystem", - "IfcDistributionSystem", - "IfcBuildingSystem", - "IfcZone", - ): - results.append(rel.RelatingGroup) + if rel.is_a("IfcRelAssignsToGroup") and (group := rel.RelatingGroup).is_a("IfcSystem"): + results.append(group) return results