Returns the angle, in degrees, between two 3-D vectors.
Rhino.VectorAngle (arrVector1, arrVector2)
arrVector1 |
Required. Array. The first 3-D vector. |
arrVector2 |
Required. Array. The second 3-D vector. |
Number |
The angle in degrees if successfull. |
Null |
On error. |
Dim s0, s1, du0, dv0, du1, dv1, n0, n1
s0 = Rhino.GetObject("Surface 0", 8)
s1 = Rhino.GetObject("Surface 1", 8)
du0 = Rhino.SurfaceDomain(s0, 0)
dv0 = Rhino.SurfaceDomain(s0, 1)
du1 = Rhino.SurfaceDomain(s1, 0)
dv1 = Rhino.SurfaceDomain(s1, 1)
n0 = Rhino.SurfaceNormal(s0, Array(du0(0), dv0(0)))
n1 = Rhino.SurfaceNormal(s1, Array(du1(0), dv1(0)))
Rhino.Print Rhino.VectorAngle(n0, n1)
Rhino.Print Rhino.VectorAngle(n0, Rhino.VectorReverse(n1))