Sorting geometry according to multiple locations

I have a question about sorting lists. This model has been sorted according to distances to one single point, but this being a symmetrical design with 4 different parts that have been joined, although the numbers rise from the bottom, I would like the numbers to be more connected, so that on the sleeves, front and back, the numbers remain relatively connected with each other. The base mesh is 4 different meshes combined and needs to stay connected, but I wonder if there is a way to use the split meshes as perhaps a reference to sort it so that the numbers become more connected depending on their location?

Or if there is another way to simply make the list more connected, like distance to multiple points?

Thanks (333.5 KB)

Do your circles follows a mesh topology? If so you can sort them using graph methods such as Breadth First Search.

I can set it up, but I need to see your definition for the base mesh.

Also to make assembly easier you can add edge indexing.
Even the reference below is not circular but it addresses same clustering and indexing logic:


Thanks for your reply.
The base mesh is in the beginning of the definition, the base which is plugged into kangoroo is the 4 meshes which are joined, if that is what you mean by base mesh.

The whole piece have been connected with lines that tangents the circles, and I have placed rings that cut through, all the rings will be the same size, so there is probably not a need to sort them, the circles with numbers and ring holes have also been orientated to the c-plane. I just need the overall numbers of the circles to go together so that I can take for exemple 1- 20 and assemble them quite efficiently, which will be more difficult if for example 24 is connected with 62.
Can that be solved with Breadth First Search?

I have attached the more in depth definition here. (364.8 KB)

The logic is that you build a mesh topology from points using a Voronoi diagram, assumming that a mesh can be flatenned to a disc without cutting. In my opinion your fabrication model needs a topology diagram.


  1. Flatten your mesh to 2D (in this case it is boundary first flattening, use other disc flatenning (i.e. laplace smoothing) if you use mac)
  2. Compute 2D voronoi and map it onto 3D mesh
  3. Then create a polygonal mesh and perform BFS
  4. Inscribe circle to a polygon or use your previous data of radii

You compute voronoi diagram to get a mesh and sort it afterwards

Then you use that info for fabrication.

I did this using NGon boundary first flatenning: (347.5 KB)


Thank you so much! this is beyond amazing! I did not know about Ngon before, this will definitely make things easier for me!

If I could just ask a few questions

When I use the file, the end rows appear to get excluded from the voronoi, but not from yours? I don’t know if I’m missing something

Topology (334.6 KB)

Also, How to you bake the text? or extract the values to the text baker?

Many Thanks

It is because naked edges were missing:

And for text: (368.2 KB)


Amazing, thank you so much!

1 Like

Hi, I just wonder if I could ask one more question.

A lot of the algorithm is in the end plugged into one sort node, the sort node determines the order of the orientation of the circles to the C-plane, that it goes from 0 - the end and also the rotation of the text, etc, the keys are just based on distance to a point, is it possible to plug in values of the vornoi numbers into the keys, so that the rest of the algorithm does the same thing only with the new numbers? Or would it need to be redone from scratch with the new numbers?


Topology (382.7 KB)

I would really skip the distance search for indexing and follow the indexing of a mesh graph.
I think you would need to redo this part.


Ok, thanks!