Apply multiinput operation on entire tree by extending depth of data tree

I have been trying to figure out how to work with multi-depth tree structures but I feel like I am still missing some general understanding in standard workflows and mechanisms for this.

I tried to boil it down to a simple problem:

I have two exploded polygons, their individual curves residing on one list on one branch each. {A}

In a first step I want to multiply them in x-direction while keeping the curve-lists on seperate branches for every copy and seperating the copies by adding another branch layer for each multiplication. {A;B} Here I could apply innos simple solution as proposed here.

This only works for geometries that can be grouped (It won’t say for numbers that I want to do other multi-input operations on) and as far as I see it that will only work for a tree structure with a depth of two.

But now what if I want to take all those geometries multiplied in x-direction and multiply them in y-direction, without loosing the initial tree structure but extending it with another branch layer for every copy in y-direction ?{A;B;C} And after that doing the same in z-direction. {A;B;C;D}

Hope it makes sense.


OperationOnTree.gh (14.4 KB)

I think it helps to “reverse” how you think about the problem.
You can just keep grafting and then invert the path index order at the end if you still need an exact match for how you defined it in the example panels.

OperationOnTreeReverse.gh (15.5 KB)

1 Like