So I tried to split a list with 101 members into 74 specific branches. The corner left list represents the number of member in each branch. And because the last 4 (71,72,73,74) contains no numbers, this result in only 70 branches in the result. Is there any way to keep 75 branches (with las four branches contains nothing) in the final result?
Use split list instead of Partition List
Hi, sorry but the corner left list means that in branch68 it should contains 4 members in up left list, in branch 69 it should contains none members in up left list. However, when I used split list, the results are not members of up left list. Any idea what’s wrong?
Can you share a portion of your file. I need to dig into the data trees without using my imagination.
Sure. By the way do you have any idea how I can do this “partition list” in gh_python?
share.gh (24.2 KB)
It looks like you’re trying to partition/group your meshes by some property. If so, this script might inspire a solution (i.e. using the
groupby function from
Edit: That said, here a quick script attacking the more immediate problem, and not using any fancy libraries:
220509_GroupByPartitionList_00.gh (26.5 KB)
Looks amazing! I’ll try. Thank you so much!
Something I learned from this post that Partition List automatically Prunes empty branches towards the end of the Data Tree, Which I think It is not the Expected Behavior.
Below is my alternative way using SubList Component and a bunch of patterns sifting to keep the integrity of the Data Tree.
share-Sublist.gh (32.7 KB)
Thanks！It’s amazing! Cheers