Divide branch of list by specific number

Hello,

is it possibile to divide list in a specific number of branch as a picture attached?

Thank you

yes, Partition List component, you need to state the number of elements contained in each List, so in your case 3 means 3 elements per list:

thank you,

but I need to divide by number of branch (5.4,3 / 5.4, 5.4 / 3.0, 5.4) (5.216051 / 5.216051) as a picture

3 means 3 list (from previous)

Thank you again

If you provide a list of divisors that matches the source list in length, then Unflatten it to match the source tree structure, each number gets divided by its matching divisor.

There are all sorts of ways to automate the generation of this list, but I don’t see what the logic is behind your choice of divisor…

unflatten then divide.gh (8.1 KB)

in the picture you are using two different principles :smiley:

in A you are saying “I want this list to be divided in threee”
while in B you are saying “I want this list to be divided in 1, so keep it as it is” (you should have said 2 if you want to end up with two branches)

if you want to split a given branch into many sub-branches of equal size (like A, where you say “I want n final branches”) then you can just divide list length by that amount (the result must be a round number) and use that value in Partition List, like: