Hello GH Community,
I have three groups of rotated surfaces, and I have evaluated the rotation angle of each surface in each group.
I would like to learn how to sort the initial surfaces into subgroups by the common angle so I can select them by grouped common angle.
Any help would be greatly appreciated.
sort by angle.gh (40.0 KB)
Iâm not entirely sure what you are asking for? No sorting required for this:
sort by angle_2024Aug6a.gh (46.6 KB)
Eight angles found, grouped and colored by branch:
{0}
0. -7.5
1. -3
2. 1.5
3. 6
4. 10.5
5. 15
6. 19.5
7. 24
P.S. How to use Member Index. Useful for many things!
1 Like
I wasnât sure I grasped the question either, or what âcommonâ implied here: uniqueness, domain, etc - at first I sorted by angle âdomainsâ, in case it helps:
sort by angle.gh (86.7 KB)
Thank you!
I think I see how itâs working. I will for sure take a look at member index.
May I ask if I am correct in assuming that there are:
55 at -7.5
14 at -3
etc
Thank you Joseph for your time, it is greatly appreciated.
You want the length of each branch, like this:
sort by angle_2024Aug6b.gh (46.6 KB)
WAIT! Too hasty, standby,
P.S. Still hasty but maybe more correct? SortingâŠ
sort by angle_2024Aug6bb.gh (46.1 KB)
Same thing formatted differently:
sort by angle_2024Aug6bbb.gh (46.6 KB)
Thank you 
Perfect! apologies for not being clearer.
I believe I can take it from here
if i explode the list item, I will have those surfaces in those groups?
Iâm being hasty now 
Take the first group of internalized surfaces (68 in total).
I see repeating angles (what I called âcommon angleâ, probably the wrong word to use).
Of those 68 surfaces, I want to group all the surfaces that are 10.5 degrees, all the 15 degrees, all the 6 etc.
The same for the other initial groups
Sorry, I hope i am being clearer.
Me too because Iâm done! Sorry. (thought you said âcleverâ, my eyes are failing)
Thank you for all your help Joseph, I think I can get everything I need from what you have shown me. Much appreciated!
I thought I was being clever by replacing Merge with Entwine, and do think itâs the right approach, but the colors tell me something is wrong. Some surfaces have no color 
I suspect the purple group, and this will haunt me, but Iâm done for now.
sort by angle_2024Aug6c.gh (50.0 KB)
P.S. I found something⊠ColorBa needed Match Tree internally, but that had no effect. 
I got something that shows all the colors (and all the surfaces colored) but I barely understand it and donât know why itâs necessary since the summary numbers didnât change.
sort by angle_2024Aug6d.gh (57.7 KB)
1 Like
I canât thank you enough. Its truly very much appreciated and a huge help!
I have studied it but I am still struggling with the final part.
May I push my luck and ask for one last assistance.
The purpose for the regrouping is to visualize them but more importantly I plan to modify other geometry specific for each angle.
âBy the wayâŠâ is mission creep, AKA moving the goal posts. Exhausting. Iâm still puzzled by the mystery in that purple group and still donât know why there are three groups of surfaces? It looks like you donât understand data trees and how to work with branches.
This was always my goal from the original request. Thanks for all your help so far.
My first reply did that, except for the three initial groups that are still a mystery to me.
Images like this make me cringe, itâs not âThe Grasshopper Wayâ.
Actually, my last reply (version âAug6dâ) did what I think you want. I added my âTree/List Viewerâ tool and disabled the hasty sorting to make it more obvious. The âpath idxâ slider selects the branch and the âlist idxâ slider selects a surface to be displayed in yellow, while all others in that branch are blue. So this image shows branch {0;0;3}
(14 at 6°) and item 13 (zero-based numbering 0âŠ13 = 14 in branch).
Ideally, the sort should reorganize the data tree instead of only the results.
sort by angle_2024Aug6dd.gh (66.5 KB)
1 Like
thank you! this helps a lot.
In this version (âAug7aâ), sorting reorganizes the data tree - not hasty! âTree/List Viewerâ is disabled as it conflicts with ColorBa.
sort by angle_2024Aug7a.gh (71.2 KB)
This version (âAug7aaâ) is the same except âTree/List Viewerâ is enabled and preview of ColorBa is hidden.
sort by angle_2024Aug7aa.gh (71.2 KB)
PShift and Partition in the purple group make this more difficult to understand. They were added to get around a mystery that remains unexplainedâŠ
With preview enabled on the original three Srf params:
sort by angle_2024Aug7aaa.gh (70.9 KB)