Split and sum specific index values

Hallo dear community,


I need a little help to understand how make the sum of specific index, inside each branch.
I need to divide the list of each branch (p.e. each 3 indexes) and than sum the values in the right index order, (p.e.in Branch 0, Index 0+3+6, 1+4+7, 2+5+8)

Thanks for the help

Hi,

could this work for you?

Split list and sum.gh (7.9 KB)

I would do something like this:

3_by_3.gh (13.1 KB)

this is just a “safety” in case the number of items in a branch is not multiple of 3… maybe :slight_smile:

image

2 Likes

Hallo dear Fernando, thanks for the help.

I need to to return to have the same Branch with the same N index of the list lenght, aka
-{0} N 1085
-{1} N 1836
-{2} N 1400

Any advice?

Hi Christian,

If I understand you correctly, you want to split the branches with different partitions, correct? Something like this could work, just graft the size input in the partition list component, as you are already doing and use the Shift Paths component at the end to keep the same structure. As I do not have you data, you may need to play with the input of the Offset in the Shift :sweat_smile:.

Thanks Fernando,
so I can get to the goal. Thanks for your time

Yes, follow the forum guidelines and post a GH file with data (or geometry).

3. Attach minimal versions of all the relevant files

1 Like