See #5919. You can now add openings through "Add Element" just like everything else.

This means that openings can (and default to) start with extrusions. It
also starts to open up the possibility to add other types of feature
elements. Still really incomplete.
This commit is contained in:
Dion Moult
2025-01-25 20:43:08 +11:00
parent 2c531501c3
commit 75c6505121
6 changed files with 66 additions and 25 deletions
@@ -735,16 +735,10 @@ class OverrideDelete(bpy.types.Operator):
else:
bpy.data.objects.remove(obj)
while True:
has_removed_opening = False
openings = context.scene.BIMModelProperties.openings
for i, opening in enumerate(openings):
if not (element := tool.Ifc.get_entity(opening.obj)):
has_removed_opening = True
bpy.data.objects.remove(opening.obj)
context.scene.BIMModelProperties.openings.remove(i)
if not has_removed_opening:
break
for opening in context.scene.BIMModelProperties.openings:
if not tool.Ifc.get_entity(opening.obj):
bpy.data.objects.remove(opening.obj)
tool.Model.purge_scene_openings()
if self.is_batch:
old_file = tool.Ifc.get()