Fix bug when trying to calculate the angle from vectors too close to each other.

This commit is contained in:
Bruno Perdigão
2024-09-08 12:01:04 -03:00
parent c607cbc9d7
commit d42890f214
+4 -1
View File
@@ -100,7 +100,10 @@ class Cad:
axis = d1.cross(d2).normalized()
# Calculate the unsigned angle between the "d1" and "d2" vectors
a = d1.angle(d2)
try:
a = d1.angle(d2)
except:
a = 0
# Determine the sign of the angle based on the provided axis
# If new_angle, determine the direction of the rotation