Fix bug in Blender quantities calculator ignoring openings from an aggregate

It wasn't considering that object's geometry might be also altered by opening added not directly but to it's aggregate.
This commit is contained in:
Andrej730
2024-12-27 13:06:07 +05:00
parent 5ef10073cd
commit 845ebb8543
@@ -516,9 +516,9 @@ def get_gross_volume(o: bpy.types.Object) -> float:
return gross_volume
def has_openings(obj: bpy.types.Object) -> Union[ifcopenshell.entity_instance, list[ifcopenshell.entity_instance]]:
def has_openings(obj: bpy.types.Object) -> bool:
element = tool.Ifc.get_entity(obj)
return element and getattr(element, "HasOpenings", [])
return bool(element and tool.Geometry.has_openings(element))
def get_obj_decompositions(obj: bpy.types.Object) -> set[ifcopenshell.entity_instance]: