mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 21:39:59 +00:00
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).
This commit is contained in:
@@ -95,7 +95,6 @@ class AlignWall(bpy.types.Operator):
|
|||||||
aligner.align_last_layer()
|
aligner.align_last_layer()
|
||||||
else:
|
else:
|
||||||
assert_never(self.align_type)
|
assert_never(self.align_type)
|
||||||
tool.Ifc.edit(obj)
|
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
@@ -281,21 +280,6 @@ class ChangeLayerLength(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
return {"FINISHED"}
|
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):
|
class DrawPolylineWall(bpy.types.Operator, PolylineOperator):
|
||||||
bl_idname = "bim.draw_polyline_wall"
|
bl_idname = "bim.draw_polyline_wall"
|
||||||
bl_label = "Draw Polyline Wall"
|
bl_label = "Draw Polyline Wall"
|
||||||
|
|||||||
Reference in New Issue
Block a user