List Sort

https://user-images.githubusercontent.com/14288520/187995646-ed8c3c53-3fad-4882-9175-6cf9bd037bf3.png

Functionality

Sort items from list. It should accept any type of data from Sverchok: Vertices, Strings (Edges, Polygons), Matrix, Curves, Surfaces, Fields or Blender data.

The node will sort the data based on the keys list. I not keys list is supplied the node will sort the data based in the data itself, note that this is only possible with numeric data.

Inputs

  • Data: Any kind of data.

  • Keys: List with the desired order of the data (new positions)

Parameters

  • Level: Set the level at which to observe the List. Level 1 is top level (totally zoomed out), higher levels get more granular (zooming in) until no higher level is found (atomic). The node will just sort the data at the level selected.

Outputs

  • Data: Sorted data. Depends on incoming data and can be nested.

Examples

https://user-images.githubusercontent.com/14288520/188199920-cae91075-e413-4804-b4f7-4759986d9242.png https://user-images.githubusercontent.com/14288520/188199934-419325ec-3eb8-453f-8040-66b430a9c445.png

Sorting a list of random numbers:

https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/list_struct/sort/list_sort_sverchok_blender_example_00.png

Sorting a List of Objects:

https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/list_struct/sort/list_sort_sverchok_blender_example_01.png

Sorting faces based on theirs center Z coordinate:

https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/list_struct/sort/list_sort_sverchok_blender_example_02.png

Examples of sorting at different levels:

https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/list_struct/sort/list_sort_sverchok_blender_example_03.png