LineFitFromPoints

Returns the starting and ending points of a line that was fit through an array of 3-D points.

Syntax

Rhino.LineFitFromPoints (arrPoints)

Parameters

arrPoints

Required.  Array.  An array of 3-D points. The array must contain at least two 3-D points.

Returns

Array

An array containing the starting and ending points of the fit line if successful.

Null

If not successful, or on error.

Example

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

Also See

AddLine

CurveEndPoint

CurveStartPoint