Sorts an array of 3-D points so they will be connected in "reasonable" polyline order.
Rhino.SortPointList (arrPoints [, dblTolerance])
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. |
Array |
An array of sorted 3-D points if successful. |
Null |
If not successful, or on error. |
Dim arrPoints, arrSorted
arrPoints = Rhino.GetPointCoordinates
If IsArray(arrPoints) Then
arrSorted = Rhino.SortPointList(arrPoints)
Rhino.AddPolyline arrSorted
End If