I am trying to write a Python script that converts a vector to a polar angle on my current Cplane. For example:

[1,0,0] = 0°

[0,1,0] = 90°

[-1,0,0] = 180°

[0,-1,0] = 270° (or -90° would work too)

what would be the easiest way to accomplish this with a known vector?

It’s indeed just calling methods:

```
import math
import Rhino.Geometry as rg
for v in [[1,0,0], [0,1,0], [-1,0,0], [0,-1,0]]:
rad = rg.Vector3d.VectorAngle(rg.Vector3d.XAxis, rg.Vector3d(*v), rg.Plane.WorldXY)
deg = math.degrees(rad)
print deg
```

1 Like

That works great! Thanks for the help!