BIM: fix filtering out level issue (#22059)

* Update ifc_status.py

* Update ifc_tools.py
This commit is contained in:
Roy-043
2025-06-23 14:14:51 +02:00
committed by GitHub
parent c6f89f646c
commit 6adb97d79d
2 changed files with 2 additions and 4 deletions

View File

@@ -481,14 +481,12 @@ def filter_out(objs):
nobjs.append(obj)
elif obj.isDerivedFrom("Mesh::Feature"):
nobjs.append(obj)
elif obj.isDerivedFrom("App::DocumentObjectGroup"):
elif Draft.is_group(obj):
if filter_out(obj.Group):
# only append groups that contain exportable objects
nobjs.append(obj)
else:
print("DEBUG: Filtering out",obj.Label)
elif obj.isDerivedFrom("Mesh::Feature"):
nobjs.append(obj)
elif obj.isDerivedFrom("App::Feature"):
if Draft.get_type(obj) in ("Dimension","LinearDimension","Layer","Text","DraftText"):
nobjs.append(obj)

View File

@@ -1598,7 +1598,7 @@ def get_orphan_elements(ifcfile):
products = ifcfile.by_type("IfcProduct")
products = [p for p in products if not p.Decomposes]
products = [p for p in products if not p.ContainedInStructure]
products = [p for p in products if not getattr(p, "ContainedInStructure", [])]
products = [
p for p in products if not hasattr(p, "VoidsElements") or not p.VoidsElements
]