Fix bug where filtering did not work for indirectly spatially contained elements

This commit is contained in:
Dion Moult
2021-09-13 09:12:51 +10:00
parent 2a07f7082a
commit 8aa790c1c1
3 changed files with 12 additions and 1 deletions
@@ -79,6 +79,9 @@ def get_material(element, should_skip_usage=False):
def get_container(element):
aggregate = get_aggregate(element)
if aggregate:
return get_container(aggregate)
if hasattr(element, "ContainedInStructure") and element.ContainedInStructure:
return element.ContainedInStructure[0].RelatingStructure