mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
Fix #2528. Setting x angle on slabs now only affects the X euler angle
This commit is contained in:
@@ -176,8 +176,7 @@ class DumbSlabGenerator:
|
|||||||
obj.matrix_world = matrix_world
|
obj.matrix_world = matrix_world
|
||||||
bpy.context.view_layer.update()
|
bpy.context.view_layer.update()
|
||||||
self.collection.objects.link(obj)
|
self.collection.objects.link(obj)
|
||||||
rotation = mathutils.Matrix.Rotation(self.x_angle, 4, 'X')
|
obj.matrix_world = Matrix.Rotation(self.x_angle, 4, 'X')
|
||||||
obj.matrix_world = rotation
|
|
||||||
|
|
||||||
element = blenderbim.core.root.assign_class(
|
element = blenderbim.core.root.assign_class(
|
||||||
tool.Ifc,
|
tool.Ifc,
|
||||||
|
|||||||
@@ -294,8 +294,12 @@ class ChangeExtrusionXAngle(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
is_global=True,
|
is_global=True,
|
||||||
should_sync_changes_first=False,
|
should_sync_changes_first=False,
|
||||||
)
|
)
|
||||||
rotation = mathutils.Matrix.Rotation(x_angle, 4, "X")
|
|
||||||
obj.matrix_world = rotation
|
euler = obj.matrix_world.to_euler()
|
||||||
|
euler.x = x_angle
|
||||||
|
new_matrix = euler.to_matrix().to_4x4()
|
||||||
|
new_matrix.col[3] = obj.matrix_world.col[3]
|
||||||
|
obj.matrix_world = new_matrix
|
||||||
if wall_objs:
|
if wall_objs:
|
||||||
DumbWallRecalculator().recalculate(wall_objs)
|
DumbWallRecalculator().recalculate(wall_objs)
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|||||||
Reference in New Issue
Block a user