fix bim tests after 143e094

drawings and annotations that are part of some drawing don't need to be added to the spatial hierarchy
This commit is contained in:
Andrej730
2024-08-22 17:56:18 +05:00
parent 5d6655cbc7
commit 358c834427
+9 -1
View File
@@ -170,7 +170,15 @@ class Root(bonsai.core.tool.Root):
@classmethod
def is_containable(cls, element: ifcopenshell.entity_instance) -> bool:
return element.is_a("IfcElement") or element.is_a("IfcAnnotation") or element.is_a("IfcGrid")
if element.is_a("IfcElement") or element.is_a("IfcGrid"):
return True
if element.is_a("IfcAnnotation"):
if element.ObjectType == "DRAWING":
return False
drawing_group = tool.Drawing.get_drawing_group(element)
if not drawing_group:
return True
return False
@classmethod
def is_element_a(cls, element: ifcopenshell.entity_instance, ifc_class: str) -> bool: