mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
util.get_element_systems to consider all kinds of ifcsystems
This commit is contained in:
@@ -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]:
|
def get_element_systems(element: ifcopenshell.entity_instance) -> list[ifcopenshell.entity_instance]:
|
||||||
results = []
|
results = []
|
||||||
for rel in element.HasAssignments:
|
for rel in element.HasAssignments:
|
||||||
if rel.is_a("IfcRelAssignsToGroup") and rel.RelatingGroup.is_a() in (
|
if rel.is_a("IfcRelAssignsToGroup") and (group := rel.RelatingGroup).is_a("IfcSystem"):
|
||||||
"IfcSystem",
|
results.append(group)
|
||||||
"IfcDistributionSystem",
|
|
||||||
"IfcBuildingSystem",
|
|
||||||
"IfcZone",
|
|
||||||
):
|
|
||||||
results.append(rel.RelatingGroup)
|
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user