I have need the angle between two lines (negative or positive depends of frist line) and
I use this code to get:
import rhinoscriptsyntax as rs
line1 = rs.GetObject(“LINE1”)
line2 = rs.GetObject(“LINE2”)
line1Start = rs.CurveStartPoint(line1);
line1End = rs.CurveEndPoint(line1);
line2Start = rs.CurveStartPoint(line2);
line2End = rs.CurveEndPoint(line2)
ang1=rs.Angle(line1Start,line1End)
ang2=rs.Angle(line2Start,line2End)
print ang2[0]-ang1[0]
So, rs,angle only return until 0º/180º and -180º /0º, the problem is I have a angle Ex: 170 and other
-170, the return is -340 or 340 , and supose return -20 or 20 depend the frist line:
I try convert this on full 360º but this brings another problem, the 0º position can also be 360º, this generates calculation error.
Any idea