SortPointList

 Sorts an array of 3-D points so they will be connected in "reasonable" polyline order.

Syntax

Rhino.SortPointList (arrPoints [, dblTolerance])

Parameters

arrPoints

Required.  Array.  An array of 3-D points.

dblTolerance

Optional.  Number.  The minimum distance between points.  Points that fall within this tolerance will be discarded.  If omitted, Rhino's internal zero tolerance is used.

Returns

Array

An array of sorted 3-D points  if successful.

Null

If not successful, or on error.

Example

Dim arrPoints, arrSorted

arrPoints = Rhino.GetPointCoordinates

If IsArray(arrPoints) Then

  arrSorted = Rhino.SortPointList(arrPoints)

  Rhino.AddPolyline arrSorted

End If

Also See

SortPoints