Combining lists at a certain level

Hello everyone,

I have four different rectangles as polycurves. Extracting their curves, start and endpoints consequently, I have the following code:

I would like to combine the start and endpoints without flattening such that the list @Level1 have 8 elements, namely all startpoints and endpoints of every rectangle beside each other without loosing the level structure.

On of ways I thought of is a list combination by list.join which returns null’s, which I actually cannot understand why. I hope I do it exactly as described here.

Does anybody know how it could be possible?

I would be grateful of your help.

Is this what you need?

1 Like

…thank you for your reply. actually this is my case:

which doesn’t work also with code blocks because of the 4th level.
What I want to do is to have a four level list like this as outcome of the two lists above

Then you could use a SetUnion node instead of List.Combine / List.Join

Does it solve your issue?


Hi Yna_Db

thank you for your reply. Your solution works. Thank you.