How to construct tree from lists

I have Spaces, Panels and Aperture… as a separate lists and trying to create one tree…that have 3 levels
Thanks for the help…


createTree.gh (8.2 KB)

Maybe you need Partition List

Are you looking for something like this?


Uploading: CreateTree.gh…

1 Like

thanks a lot…I need now additional advice how we would extract data for specific item…

so results would be all items from that related to {0} item 0 Cell1 so all item {0;0} Panel and {0;0;0}… Apertures etc…

for {0} item 1 Cell2 would be all item {0;1} Panel and {0;1;0} if we would have apertures

CreateTree
CreateTree.gh (13.3 KB)

2 Likes

thanks a lot, your help is really apprecited. This is useful as well to get specific elements like only spaces, only panels or only Aperture.
However, trying to do one more thing extract for the first item from Spaces all child elements sth like…
so I can select space from the list and will get Space, Panels and Aperture but only for this space, we chose…

Michał, try this. There’s a simple C# script that trims only the longest branches. Maybe that will help you. There’s also another part that lets selecting all elements that belong to any of the spaces. You could easily modify the script to target different branching depths.

CreateTree_Filter_KN.gh (12.5 KB)
ScreenCaptureProject54

1 Like

thanks a lot, this is what I need…