Sorting sublists

Hi,

I am looking for a way to organize items within a sublist/tree branch without having to flatten the tree entirely. I want to sort each row of items by their y value, but don’t want to disrupt the order of each row. I am still new to grasshopper so any help is appreciated.

Thanks
new a2.gh (57.0 KB)

What part of this are we supposed to look at?

What is your ultimate goal? Not sure that sorting by Y will help.


No need to overthink it. Just calculate the centroids and run it through a Sort component.

2 Likes

Yes. To explain: if you leave the geometry in its tree structure, the sorting will be applied to each list separately without a need to flatten the entire tree.

Thank you! I think I need a nap

someone else fixed my issue. thank you for your help though

So no need to know your ultimate goal or what good sorting by Y does you, eh? Got it :bangbang:

P.S. And no one blinked at using Solid Difference to subtract one surface from another? Nicely shaped CAD sculpture, you might be surprised to see the many different ways of creating it.

Are you not supposed to solid difference surfaces?

A surface is not a solid, and surfaces can be created with holes.

Solid operations are slow, surface regions (planar or not) are faster.

Ah, I see. What would be a more efficient way of doing a solid difference command on a surface?



new a2_2025Feb21a.gh (72.4 KB)

P.S. Third color mode: “Simplified”


new a2_2025Feb21b.gh (72.3 KB)

P.P.S. This might be the first time I’ve baked a ColorBa component, Rendered