If I have a list of 20 coordinates, and I sort them using the [sort points by distance] node it sorts them perfectly ;) Say we take the first item in the sorted list, is there a way to find out what item/where it was in the original list? Cant work it out ;( ;)

Comments

Mmm.

Bodysoulspirit's picture
Submitted by

Mmm.

Basically yeah would be good if Sort Points By Distance had an "index" output port, like Magneson did for his custom list nodes (link) (already suggested lower on that topic for stock nodes too related to a question by Kewl). But the amazing Sort With Index node by Martinus works for 1D values (and no minus values).

Also if the dictionary nodes allowed more data type beside text (or if they were more text conversion node possibilities, f.e. "2D list To Text list", or if Merge XY list allowed to merge 2 texts lists into 1) they could I guess be used for this pretty fast, (see Editor Support For Dictionaries request)

Otherwise, methods would for example be to still use dictionaries but to convert the 2D points into texts using Process List (see attached composition & screenshot), or convert points to text & split text etc (joined composition 2).

Hope this helps though