You can now select group and system data in selectors

This commit is contained in:
Dion Moult
2024-07-10 17:30:32 +10:00
parent 670bf9d4a6
commit 4e78de6ce9
2 changed files with 9 additions and 1 deletions
@@ -31,6 +31,7 @@ import ifcopenshell.util.geolocation
import ifcopenshell.util.classification
import ifcopenshell.util.schema
import ifcopenshell.util.shape
import ifcopenshell.util.system
from decimal import Decimal
from typing import Optional, Any, Union, Iterable
@@ -331,6 +332,10 @@ def _get_element_value(element: ifcopenshell.entity_instance, keys: list[str]) -
value = value.id()
elif key == "classification":
value = ifcopenshell.util.classification.get_references(value)
elif key == "group":
value = ifcopenshell.util.element.get_groups(value)
elif key == "system":
value = ifcopenshell.util.system.get_element_systems(value)
elif key in ("x", "y", "z", "easting", "northing", "elevation") and hasattr(value, "ObjectPlacement"):
if getattr(value, "ObjectPlacement", None):
matrix = ifcopenshell.util.placement.get_local_placement(value.ObjectPlacement)