mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
#2106. Fix bug where geometry cache was not cleared when openings were changed
This commit is contained in:
@@ -156,6 +156,7 @@ class UpdateRepresentation(bpy.types.Operator):
|
||||
|
||||
def update_obj_mesh_representation(self, context, obj):
|
||||
product = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)
|
||||
tool.Geometry.clear_cache(product)
|
||||
|
||||
if product.is_a("IfcGridAxis"):
|
||||
ifcopenshell.api.run("grid.create_axis_curve", self.file, **{"axis_curve": obj, "grid_axis": product})
|
||||
|
||||
@@ -44,6 +44,7 @@ class AddOpening(bpy.types.Operator):
|
||||
if not element_id:
|
||||
return {"FINISHED"}
|
||||
element = self.file.by_id(element_id)
|
||||
tool.Geometry.clear_cache(element)
|
||||
if element.is_a("IfcOpeningElement"):
|
||||
self.report({"WARNING"}, "An IfcOpeningElement can't be voided")
|
||||
return {"FINISHED"}
|
||||
@@ -132,6 +133,7 @@ class RemoveOpening(bpy.types.Operator):
|
||||
should_sync_changes_first=False,
|
||||
)
|
||||
|
||||
tool.Geometry.clear_cache(tool.Ifc.get_entity(obj))
|
||||
Data.load(IfcStore.get_file(), obj.BIMObjectProperties.ifc_definition_id)
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user