cables is under heavy development.
There might be one or another bug, please let us know about it!

SortArray3ByDistance Op

Namespace: Ops.Array

Op author: pandur

sort an array3, by the distance of each point to the previous point

Sorts an array with the following rules:

  • Get the 1st point position
  • Go through the entire array and calculate the distance of every point to the 1st
  • Get the index which has the smallest distance
  • this index now becomes the new previous point
  • remove the previous position from sorting algorithm

repeats until the entire array has been sorted.


Array (Array)

Array in


Result (Array)

Sorted array out

Result Index (Array)

Caught a mistake or want to contribute to the documentation?

Edit Documentation 

SortArray3ByDistance example

Patches using SortArray3ByDistance

  • Examples (1)
  • Public
  • My Patches


Ops.Array.SortArray3xByDistance renamed to Ops.Array.SortArray3ByDistance
2019-06-13 - pandur