Hi guys,
ı need a macro program which is the xyz to lra. ı can pay for it.
python code
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 11
- Joined: Fri Mar 30, 2018 1:00 pm
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: python code
Can you explain what length rotation angle format means.
without a formula it's not possible to write the macro.
without a formula it's not possible to write the macro.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: python code
in the first caseJee-Bee wrote: ↑Fri Jan 25, 2019 10:08 am https://en.wikipedia.org/wiki/Polar_coordinate_system
or
https://en.wikipedia.org/wiki/Spherical ... ate_system
i guess
Code: Select all
from numpy import arctan2,pi,arccos
a=FreeCAD.Vector(10,10,10*2**0.5)
l=a.Length
r=arctan2(a.x,a.y)*180/pi
a=arccos(a.z/l)*180/pi
l
r
a