Fix #4345. Removing grid axes are now handled specially.

This commit is contained in:
Dion Moult
2024-04-16 16:43:02 +10:00
parent 23abf674f3
commit 1e41561fe8
@@ -91,6 +91,17 @@ class Geometry(blenderbim.core.tool.Geometry):
if element.is_a("IfcRelSpaceBoundary"):
ifcopenshell.api.run("boundary.remove_boundary", tool.Ifc.get(), boundary=element)
return bpy.data.objects.remove(obj)
if element.is_a("IfcGridAxis"):
is_last_axis = False
# Deleting the last W axis is OK
if ((grid := element.PartOfU) and len(grid[0].UAxes) == 1) or (
(grid := element.PartOfV) and len(grid[0].VAxes) == 1
):
is_last_axis = True
if is_last_axis:
return
ifcopenshell.api.run("grid.remove_grid_axis", tool.Ifc.get(), axis=element)
return bpy.data.objects.remove(obj)
collection = obj.BIMObjectProperties.collection
if collection: