From e8a2f3aed21ab742f78b3e35f4457c42133b1864 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 22 Oct 2024 14:49:36 +0500 Subject: [PATCH] remove recalculate_dumb_wall_origin and don't mark aligned walls as edited Since 5677768 recalculate_dumb_wall_origin is never used and bim.align_wall is either just changing the location (align_centerline) or might change object's representation but it's already saved to ifc (exterior/interior). --- src/bonsai/bonsai/bim/module/model/wall.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/model/wall.py b/src/bonsai/bonsai/bim/module/model/wall.py index 2fdeb8fcab..63d78c8fc1 100644 --- a/src/bonsai/bonsai/bim/module/model/wall.py +++ b/src/bonsai/bonsai/bim/module/model/wall.py @@ -95,7 +95,6 @@ class AlignWall(bpy.types.Operator): aligner.align_last_layer() else: assert_never(self.align_type) - tool.Ifc.edit(obj) return {"FINISHED"} @@ -281,21 +280,6 @@ class ChangeLayerLength(bpy.types.Operator, tool.Ifc.Operator): return {"FINISHED"} -def recalculate_dumb_wall_origin(wall, new_origin=None): - if new_origin is None: - new_origin = wall.matrix_world @ Vector(wall.bound_box[0]) - if (wall.matrix_world.translation - new_origin).length < 0.001: - return - wall.data.transform( - Matrix.Translation( - (wall.matrix_world.inverted().to_quaternion() @ (wall.matrix_world.translation - new_origin)) - ) - ) - wall.matrix_world.translation = new_origin - for child in wall.children: - child.matrix_parent_inverse = wall.matrix_world.inverted() - - class DrawPolylineWall(bpy.types.Operator, PolylineOperator): bl_idname = "bim.draw_polyline_wall" bl_label = "Draw Polyline Wall"