Split list of coordinates into several branches

Hello,
wan
I’m trying to split a list into several (and regular) branches, solutions found on the forum apparently doesn’t work, probably because this list is coordinates…

So I’m trying to divide those coordinates into regular branches each 4. Here’s my attempt and what I would want.

Thanks

171220_demo_GH.gh (9.0 KB)

Use the Partition List component

1 Like

Partition

Yep! just like this…

1 Like

or with Path Mapper

1 Like

Wow thanks, can’t believe I missed it ! Partition is better than Path mapper in my definition, because the number is subject to change due to precedent parameter, thanks a lot !

And, while I’m at it, what would be the best way to retrieve one branch of the tree ? (with all 4 coordinates) Basically I need the list item for subset, but the “Sub list” component isn’t working, how should i input the domain properly to get those points ?

171220_demo_GH_v2.gh (15.5 KB)

Partition is also quite flexible as it can handle differently sized sublists. You could partition it into chunks of 4 points, then 2 points, then 1 point, then 4 points again and repeat.

you mean one specific branch from your tree?

1 Like

Yes exactly, but I would need to have a slider to chose the domain, any ideas ?

So a slider that would pick (0;0) then (0;1) then (0;2) and so on…

To make it a bit clearer to you I’m recording and extracting iterations from a Kangaroo component, and I would need to see the all process going on with one slider.

Thanks a lot for the answer Raul !

I hadn’t thought about this feature, flexible indeed ! (and thanks for your amazing job throught those years)

Here we go with one slider…

Partition.gh (8.1 KB)

You can easily simplify the input tree of TreeBranch component and go through different branches with the slider.

1 Like