How to cross reference branches

Hello!

I wasn’t sure how to even name my problem, hence, couldn’t properly google it.

Example.gh (3.7 KB)

I have three branches of curves, and three branches of vectors.

What I want to do is apply all branch {0} vectors to branch {1} lines, but not in a list format, but grafted format, so that all vectors would affect each line.

This works fine, if I have only one branch of curves, I’d graft vectors, each in separate branch, and GH would duplicate curve list for each vector branch.

But the problem begins, when I have several branches of curves.
If I graft vectors, it applies shortest list principle, and most of the vectors will be applied to last branch of curves.

I’d want, that after grafting, all vector branches with {0;…} are applied to {0} curve branch, {1;…} vectors to {1} curve branch e.t.c.

Is there a simple technique that can manage this?
Currently my workaround is looking at list lengths, and duplicating values, flattening everything, so that I get two simple lists of curves and vectors, but it feels too much hassle for such a simple task. :slight_smile:

Thank you for help!
Janis

Hi,

if i understood you properly, this is one way to do it…

Example_RE.gh (11.0 KB)

Note: Flip Last from TreeSloth was used. Can be replaced with path mapper like this…