Returns a line that was fit through an array of 3-D points.
rhinoscriptsyntax.LineFitFromPoints ( points )
rhinoscript.curve.LineFitFromPoints ( points )
points |
Required. List. A list of 3-D points. The list must contain at least two 3-D points. |
List |
A list containing the starting and ending points of the fit line if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
points = rs.GetPoints()
if points and len(points)>1:
line=rs.LineFitFromPoints(points)
if line: rs.AddLine(line.From, line.To)