BIM: fix filtering out level issue (#22059)
* Update ifc_status.py * Update ifc_tools.py
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user