How to convert vector into line that is not printed

Hello there,

Little bit I am confused now. I want to use Angle 2 function but actually I do not want to the two lines appear on screen? Previously I created 2 vectors but I have received an error message; “Could not convert -1,0,0 to a list of points”. What is the best practice to use vectors instead to replace lines?

Angle2 wants either two lists of two points, two lists of 6 numbers that represent x,y,z,x’,y’,z’ (the start/end points of the line), or (not specified in the help) two line “objects”. It does not add any lines to the document.


import rhinoscriptsyntax as rs

line_1=[[0,0,0],[1,0,0]]
line_2=[[0,0,0],[0,1,0]]

angle,reflex=rs.Angle2(line_1,line_2)

print angle,reflex

#or

angle,reflex=rs.Angle2([0,0,0,1,0,0],[0,0,0,0,1,0])

print angle,reflex

#or

line_1=rs.coerceline([0,0,0,1,0,0])
line_2=rs.coerceline([0,0,0,0,1,0])
angle,reflex=rs.Angle2(line_1,line_2)

print angle,reflex

HTH, --Mitch

Thanks Mitch,

I need to play more with this concept because I have points, end point and start point. I will try the GetPointCoordinates function later on.

This works as well:

import rhinoscriptsyntax as rs

orig=rs.coerce3dpoint([0,0,0])
ep_1=rs.coerce3dpoint([1,0,0])
ep_2=rs.coerce3dpoint([0,1,0])

angle,reflex=rs.Angle2([orig,ep_1],[orig,ep_2])

print angle,reflex

–Mitch