mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
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:
@@ -170,7 +170,15 @@ class Root(bonsai.core.tool.Root):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def is_containable(cls, element: ifcopenshell.entity_instance) -> bool:
|
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
|
@classmethod
|
||||||
def is_element_a(cls, element: ifcopenshell.entity_instance, ifc_class: str) -> bool:
|
def is_element_a(cls, element: ifcopenshell.entity_instance, ifc_class: str) -> bool:
|
||||||
|
|||||||
Reference in New Issue
Block a user