Adding a new branch to existing tree

Hello

I have a tree with 2n branches: {0;0}, {0;1}, {1;0}, {1;1}, …,{n;0}, {n;1}

and second tree tree with 2m branches: {0;0}, {0;1}, {1;0}, {1;1}, …,{m;0}, {m;1}

As a result i want to have:

{0;0}, {0;1}, {1;0}, {1;1}, …,{n;0}, {n;1}, {n+1;0}, {n+1;1}, {n+1+1;0}, {n+1+1;1}, …,{n+1+m;0}, {n+1+m;1}

In other words i want first branch of second tree to be first branch next after last branch of first tree and so on.

I hope the picture will help to better understand

Hello,

Try to Replace Paths on the second tree.

ConcatTrees.gh (19.8 KB)

Thank you very much for answer.
I must admit i am a little overwhelmed by numbers of components in script. When i was writing my post i thought that there will be need of using 2-3 components. Now when i saw the answer i am glad that i asked- it would be ages before I solved it.

You could also use Path Mapper if the amount of branches in the first tree does not change.

image

Yes this would be fine. But i also wille invesitgate your previous script.

It might be worth investigating Entwine for this with “Flatten Inputs” disabled? (right-click option) But I haven’t looked at your code and the OP didn’t post any so… :man_shrugging: