mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 09:32:37 +00:00
Fix #4345. Removing grid axes are now handled specially.
This commit is contained in:
@@ -91,6 +91,17 @@ class Geometry(blenderbim.core.tool.Geometry):
|
|||||||
if element.is_a("IfcRelSpaceBoundary"):
|
if element.is_a("IfcRelSpaceBoundary"):
|
||||||
ifcopenshell.api.run("boundary.remove_boundary", tool.Ifc.get(), boundary=element)
|
ifcopenshell.api.run("boundary.remove_boundary", tool.Ifc.get(), boundary=element)
|
||||||
return bpy.data.objects.remove(obj)
|
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
|
collection = obj.BIMObjectProperties.collection
|
||||||
if collection:
|
if collection:
|
||||||
|
|||||||
Reference in New Issue
Block a user