mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 19:54:07 +00:00
Implement unjoin in new wall engine
This commit is contained in:
@@ -1058,6 +1058,18 @@ class WallPrototypeVTX(bpy.types.Operator):
|
|||||||
self.body_context = ifcopenshell.util.representation.get_context(tool.Ifc.get(), "Model", "Body", "MODEL_VIEW")
|
self.body_context = ifcopenshell.util.representation.get_context(tool.Ifc.get(), "Model", "Body", "MODEL_VIEW")
|
||||||
self.axis_context = ifcopenshell.util.representation.get_context(tool.Ifc.get(), "Plan", "Axis", "GRAPH_VIEW")
|
self.axis_context = ifcopenshell.util.representation.get_context(tool.Ifc.get(), "Plan", "Axis", "GRAPH_VIEW")
|
||||||
|
|
||||||
|
def unjoin(self, wall1):
|
||||||
|
element1 = tool.Ifc.get_entity(wall1)
|
||||||
|
if not element1:
|
||||||
|
return
|
||||||
|
|
||||||
|
ifcopenshell.api.run("geometry.disconnect_path", tool.Ifc.get(), element=element1, connection_type="ATSTART")
|
||||||
|
ifcopenshell.api.run("geometry.disconnect_path", tool.Ifc.get(), element=element1, connection_type="ATEND")
|
||||||
|
|
||||||
|
axis1 = self.get_wall_axis(wall1)
|
||||||
|
axis = axis1["reference"].copy()
|
||||||
|
body = axis1["reference"].copy()
|
||||||
|
self.recreate_wall(element1, wall1, axis, body)
|
||||||
selected_objects = [o for o in context.selected_objects if tool.Ifc.get_entity(o)]
|
selected_objects = [o for o in context.selected_objects if tool.Ifc.get_entity(o)]
|
||||||
if len(selected_objects) == 1:
|
if len(selected_objects) == 1:
|
||||||
self.join_E(context.active_object, context.scene.cursor.location)
|
self.join_E(context.active_object, context.scene.cursor.location)
|
||||||
|
|||||||
Reference in New Issue
Block a user