mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Show annotations and hide openings in spatial decomposition element filter
This commit is contained in:
@@ -212,12 +212,12 @@ class Spatial(bonsai.core.tool.Spatial):
|
||||
else:
|
||||
elements = ifcopenshell.util.element.get_contained(container)
|
||||
for element in elements:
|
||||
if not element.is_a("IfcElement"):
|
||||
if element.is_a("IfcOpeningElement") or tool.Root.is_spatial_element(element):
|
||||
continue
|
||||
element_type = ifcopenshell.util.element.get_type(element)
|
||||
ifc_class = element.is_a()
|
||||
ifc_definition_id = element_type.id() if element_type else 0
|
||||
type_name = element_type.Name or "Unnamed" if element_type else "Untyped"
|
||||
type_name = element_type.Name or "Unnamed" if element_type else f"Untyped {element.is_a()}"
|
||||
results.setdefault(ifc_class, {}).setdefault(ifc_definition_id, {"total": 0, "type_name": type_name})
|
||||
results[ifc_class][ifc_definition_id]["total"] += 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user