Bugfix in rotation angle calculation when transforming arcs

Use arctan to properly account for quadrant of angle.
pull/221/head
Kenneth Weiss 2024-06-09 18:00:09 -07:00
parent fcb648b9bb
commit 260a44ed2c
1 changed files with 1 additions and 1 deletions

View File

@ -334,7 +334,7 @@ def transform(curve, tf):
new_radius = complex(rx, ry) new_radius = complex(rx, ry)
xeigvec = eigvecs[:, 0] xeigvec = eigvecs[:, 0]
rot = np.degrees(np.arccos(xeigvec[0])) rot = np.degrees(np.arctan2(xeigvec[1], xeigvec[0]))
if new_radius.real == 0 or new_radius.imag == 0 : if new_radius.real == 0 or new_radius.imag == 0 :
return Line(new_start, new_end) return Line(new_start, new_end)