LineFitFromPoints



Your Ad Here

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

Syntax

Rhino.LineFitFromPoints (arrPoints)

Parameters

strObject

Required.  Array.  An array of 3D points. The array must contain at least two 3D 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

Return to Rhino Index


Your Ad Here