Dividing sublists

I would like to know how to group items within sublists. I originally had 5 branches (sets of points) that I wanted to further divide into groups of 2 points each. When I partition the original lists I’m left with a structure that contains 23 branches with 2 items per branch. I must be executing something incorrectly or misunderstanding the branch structure.

Any help would be greatly appreciated.

Thank you!

hi! Always better to post an example file for faster/easier responses

Maybe this helps?
help.gh (37.4 KB)

Thank you! This is along the same track that I was on, I believe. I have amended your definition to include what I was working on previously. It’s close but I still need an additional level of grouping. Perhaps I can achieve this will a culling pattern as you suggested.

help 2.gh (20.9 KB)

check it out

The data structure appears to be identical to what was upstream (check the point list or param viewer). What I would like to have is each cell (branch?) further divided into groups of two. Instead of 0-1 at every location it is sequential over the length of the list, e.g., 0-0,1-1, 2-2, etc. The reason is that I want those points to be associated with the outer curve corner points downstream (so there will be groups of 3 points in the end). Is this possible? Perhaps I’m going about this in the wrong way and over-complicating things.

I approached it somewhat differently in this solution. I shifted and wove upstream instead of trying to partition the lists at the end. Is there a cleaner way to achieve this?

help 3.gh (21.0 KB)

Thank you, btw,

I think you are looking for something like this:
help 3_V2.gh (12.5 KB)


shelco thanks for including your file, I believe @Adam_M gave you the answer unless you were looking for something else - My version is pretty much the same as Adam’s but I used point on curve instead of evaluating the curves

help 3_b.gh (18.2 KB)

1 Like

Thank you! This is what I was looking for. I was making things a bit too complicated.