Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vector can't be 0,0,-1 #20

Open
JuhaHuiskonen opened this issue Mar 22, 2017 · 1 comment
Open

vector can't be 0,0,-1 #20

JuhaHuiskonen opened this issue Mar 22, 2017 · 1 comment
Assignees
Labels

Comments

@JuhaHuiskonen
Copy link
Member

If vector defining the sub-structure is exactly 0,0,-1 vector 0,0,1 is used instead. Current workaround is to introduce a small inaccuracy, e.g use vector 0,0,-0.99. But this should be fixed. @serbanilca

@JuhaHuiskonen
Copy link
Member Author

JuhaHuiskonen commented Mar 2, 2018

@serbanilca this is the proposed fix:

--- euler.py.old        2018-01-05 15:59:54.000000000 +0100
+++ euler.py    2018-01-05 16:01:22.000000000 +0100
@@ -58,7 +58,7 @@

     if abs(vector.x()) < 0.00001 and abs(vector.y()) < 0.00001:
         rot = radians(0.00)
-        tilt = radians(0.00)
+        tilt = acos(vector.z())
     else:
         rot = atan2(vector.y(), vector.x())
         tilt = acos(vector.z())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants