mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 03:21:00 +00:00
Fix #4881. Fix bug where editing grid axes didn't work.
This commit is contained in:
@@ -28,6 +28,7 @@ import ifcopenshell.util.element
|
|||||||
import ifcopenshell.util.representation
|
import ifcopenshell.util.representation
|
||||||
import ifcopenshell.util.placement
|
import ifcopenshell.util.placement
|
||||||
import ifcopenshell.api
|
import ifcopenshell.api
|
||||||
|
import ifcopenshell.api.grid
|
||||||
import bonsai.core.geometry
|
import bonsai.core.geometry
|
||||||
import bonsai.core.geometry as core
|
import bonsai.core.geometry as core
|
||||||
import bonsai.core.aggregate
|
import bonsai.core.aggregate
|
||||||
@@ -384,7 +385,7 @@ class UpdateRepresentation(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
|
|
||||||
if product.is_a("IfcGridAxis"):
|
if product.is_a("IfcGridAxis"):
|
||||||
# Grid geometry does not follow the "representation" paradigm and needs to be treated specially
|
# Grid geometry does not follow the "representation" paradigm and needs to be treated specially
|
||||||
ifcopenshell.api.run("grid.create_axis_curve", self.file, **{"axis_curve": obj, "grid_axis": product})
|
ifcopenshell.api.grid.create_axis_curve(self.file, axis_curve=obj, grid_axis=product)
|
||||||
return
|
return
|
||||||
elif product.is_a("IfcRelSpaceBoundary"):
|
elif product.is_a("IfcRelSpaceBoundary"):
|
||||||
# TODO refactor
|
# TODO refactor
|
||||||
@@ -1794,6 +1795,14 @@ class OverrideModeSetObject(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
self.unchanged_objs_with_openings.append(obj)
|
self.unchanged_objs_with_openings.append(obj)
|
||||||
else:
|
else:
|
||||||
tool.Ifc.finish_edit(obj)
|
tool.Ifc.finish_edit(obj)
|
||||||
|
elif element.is_a("IfcGridAxis"):
|
||||||
|
if not tool.Geometry.has_geometric_data(obj):
|
||||||
|
self.is_valid = False
|
||||||
|
self.should_save = False
|
||||||
|
if obj.data.BIMMeshProperties.mesh_checksum != tool.Geometry.get_mesh_checksum(obj.data):
|
||||||
|
self.edited_objs.append(obj)
|
||||||
|
else:
|
||||||
|
tool.Ifc.finish_edit(obj)
|
||||||
|
|
||||||
return self.execute(context)
|
return self.execute(context)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user