SortPoints

Sorts an array of 3-D points.

Syntax

Rhino.SortPoints (arrPoints [, blnAscending [, blnOrder]])

Parameters

arrPoints

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

blnAscending

Optional.  Boolean.  The sorting mode, either ascending or descending.  If omitted, the points are sorted ascending (True).

blnOrder

Optional.  Number.  The component sort order, where:

Value

Component Sort Order

0 (default)

X, Y, Z

1

X, Z, Y

2

Y, X, Z

3

Y, Z, X

4

Z, X, Y

5

Z, Y, X

Returns

Array

An array of sorted 3-D points if successful.

Null

If not successful, or on error.

Example

Dim arr, p

arr = Rhino.GetPoints(,,"First point", "Next point")

If IsArray(arr) Then

arr = Rhino.SortPoints(arr)

For Each p in arr

Rhino.Print Rhino.Pt2Str(p)

Next

End If

Also See

SortStrings

SortNumbers