Pair two lists per-index, then reverse every other branch

Hi everyone! :waving_hand:

I’m a Grasshopper beginner and I’m 99% done with a 3D-print toolpath — just stuck on one ordering issue.

What I have:

A horseshoe-shaped structure printed in a spiral. For each of my 294 layers, I have:

  • An outer wall curve

  • An inner wall curve

  • Connectors between them at the tips

  • A zigzag infill curve in the gap

  • Connectors from the zigzag to the walls

All the geometry is correct and the pieces touch each other where they should. I’m joining everything with Merge → Join Curves.

The problem:

When I plug a List Item into the joined output to step through the curves, I see that the printer would do all 294 outer walls bottom-to-top first, then all 294 zigzags bottom-to-top, etc. — instead of interleaving them per layer like a real print needs:

wall layer 1 → zigzag layer 1 → wall layer 2 → zigzag layer 2 → …

So my Merge is stacking the input lists end-to-end instead of interleaving them per layer. I think this is a data-tree issue with how my inputs are structured (some flat, some grafted, etc.).

What I’d like:

Whatever the right way is to make Grasshopper combine these inputs in per-layer order so that branch N contains all the pieces belonging to layer N, in the right traversal order — and then Join Curves can fuse each branch into one continuous segment.

I’ve tried Weave and Entwine and various combinations of Flatten/Graft/Simplify on the inputs but I keep getting either too many branches, branches with wrong contents, or back to the stacked order.

File attached. If anyone could take a quick look and show me the right combination of components and tree settings, I’d be incredibly grateful. I’m not looking for a fancy solution — just the standard “interleave N lists per-index” pattern.

Thank you so much! :folded_hands:

tester.gh (61.5 KB)

open your GH file with its Rhino file, right click on the initial Geometry node and select “internalise data”

then save the file and upload it again: