Returns the starting and ending points of a line that was fit through an array of 3-D points.
Rhino.LineFitFromPoints (arrPoints)
arrPoints |
Required. Array. An array of 3-D points. The array must contain at least two 3-D points. |
Array |
An array containing the starting and ending points of the fit line if successful. |
Null |
If not successful, or on error. |
Dim arrPoints, arrLine
arrPoints = Rhino.GetPoints
If IsArray(arrPoints) And UBound(arrPoints) > 0 Then
arrLine = Rhino.LineFitFromPoints(arrPoints)
If IsArray(arrLine) Then
Rhino.AddLine arrLine(0), arrLine(1)
End If
End If