mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 18:26:25 +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):
|
def update_obj_mesh_representation(self, context, obj):
|
||||||
product = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)
|
product = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)
|
||||||
|
tool.Geometry.clear_cache(product)
|
||||||
|
|
||||||
if product.is_a("IfcGridAxis"):
|
if product.is_a("IfcGridAxis"):
|
||||||
ifcopenshell.api.run("grid.create_axis_curve", self.file, **{"axis_curve": obj, "grid_axis": product})
|
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:
|
if not element_id:
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
element = self.file.by_id(element_id)
|
element = self.file.by_id(element_id)
|
||||||
|
tool.Geometry.clear_cache(element)
|
||||||
if element.is_a("IfcOpeningElement"):
|
if element.is_a("IfcOpeningElement"):
|
||||||
self.report({"WARNING"}, "An IfcOpeningElement can't be voided")
|
self.report({"WARNING"}, "An IfcOpeningElement can't be voided")
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
@@ -132,6 +133,7 @@ class RemoveOpening(bpy.types.Operator):
|
|||||||
should_sync_changes_first=False,
|
should_sync_changes_first=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
tool.Geometry.clear_cache(tool.Ifc.get_entity(obj))
|
||||||
Data.load(IfcStore.get_file(), obj.BIMObjectProperties.ifc_definition_id)
|
Data.load(IfcStore.get_file(), obj.BIMObjectProperties.ifc_definition_id)
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user