This commit is contained in:
Bruno Perdigão
2024-09-01 10:48:16 -03:00
parent 43e13ef8f3
commit 977014b86a
+1 -1
View File
@@ -106,7 +106,7 @@ class Cad:
# Determine the sign of the angle based on the provided axis # Determine the sign of the angle based on the provided axis
# If new_angle, determine the direction of the rotation # If new_angle, determine the direction of the rotation
parameter = round(axis.z, 2) < 0 or (round(axis.y, 2) == 0 and round(axis.x < 0)) or (round(axis.x, 2) == 0 and round(axis.y < 0)) parameter = round(axis.z, 2) < 0 or (round(axis.y, 2) == 0 and round(axis.x < 0)) or (round(axis.x, 2) == 0 and round(axis.y < 0))
if new_angle: if new_angle is not None:
rot_mat = Matrix.Rotation(new_angle, 3, axis) rot_mat = Matrix.Rotation(new_angle, 3, axis)
rot_vector = (d1 @ rot_mat) if parameter else (rot_mat @ d1) rot_vector = (d1 @ rot_mat) if parameter else (rot_mat @ d1)
return rot_vector return rot_vector