Dual Mesh Grouping

Hi everyone,

I’m now solving a dual mesh grouping problem. I started with a loop-subd mesh, dual-mesh to hexagons, then I want those hexagons three in a group (as red lines in picture). But I couldn’t figure out how those indexes were sorted after dual mesh component.


I’d like to ask if there’s anyway to sort those hexagons, or I should try more brute force approach such as finding 3 Closest Pts and group it together? Thanks!!

(Btw the C# component is a variant from Daniel Piker here and here, which re-ordered loop subd faces, but the index after dual mesh is still quite random for me :frowning: )


20200709_Hexagon Grouping_Question.gh (46.4 KB)

Can you sort them by the center point x, then y to reindex the cells. Then select adjacents to group?

Oh, Thank Scott for giving me the idea, I just prototype it and looks pretty nice!

Actually my real goal is to group the whole geodesic dome. Probably need to keep working on those edges between orange peels, but I’ll keep updating here.

Also, still curious to know if this problem can be solved reversely from dual-mesh algorithm? Just like Daniel Piker sorted loop-subd faces mathematically, Thank again!