'X angle' rotates ifcslab/ifcramp in space. (#2522)

* 'X angle' rotates ifcslab/ifcramp in space.

* rotation w/ mathutils.Matrix.Rotation instead
per https://github.com/IfcOpenShell/IfcOpenShell/pull/2522#issuecomment-1287969832
This commit is contained in:
Ryan Schultz
2022-10-22 23:32:31 -05:00
committed by GitHub
parent 733b89be12
commit 77f2ad8f68
2 changed files with 4 additions and 0 deletions
@@ -176,6 +176,8 @@ class DumbSlabGenerator:
obj.matrix_world = matrix_world
bpy.context.view_layer.update()
self.collection.objects.link(obj)
rotation = mathutils.Matrix.Rotation(self.x_angle, 4, 'X')
obj.matrix_world = rotation
element = blenderbim.core.root.assign_class(
tool.Ifc,
@@ -278,6 +278,8 @@ class ChangeExtrusionXAngle(bpy.types.Operator, tool.Ifc.Operator):
is_global=True,
should_sync_changes_first=False,
)
rotation = mathutils.Matrix.Rotation(x_angle, 4, 'X')
obj.matrix_world = rotation
if wall_objs:
DumbWallRecalculator().recalculate(wall_objs)
return {"FINISHED"}