From 2c9e4434258caf4c0a2c441b51f8dbbb64e4ae46 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Fri, 1 Mar 2024 20:02:15 +1100 Subject: [PATCH] Fix #4300. You can now select spatial elements by their location too. --- src/ifcopenshell-python/ifcopenshell/util/selector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ifcopenshell-python/ifcopenshell/util/selector.py b/src/ifcopenshell-python/ifcopenshell/util/selector.py index fc899f5a5d..d252c756bb 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/selector.py +++ b/src/ifcopenshell-python/ifcopenshell/util/selector.py @@ -507,6 +507,8 @@ class FacetTransformer(lark.Transformer): def filter_function(element): container = ifcopenshell.util.element.get_container(element) + if not container: + container = ifcopenshell.util.element.get_aggregate(element) containers = self.get_container_tree(container) result = False if containers else None for container in containers: