Add branch layer according to move operation

Hey there!

I have multiple points in a tree structure. The points are grouped in lists on individual branches. The list lengths vary. The tree structure has a depth of 1, if that is how you refer to the number of digits in the curly brackets of a path.

Additionally I have a flat list of level heights.

My goal is to move each point by every value in the level list and to get a tree structure of a depth of two. In this tree structure the first branch layer should contain a branch for each level and the second branch layer (the branches that come out of the level-branches) should contain a branch for each point group.

Unfortunately my understanding of trees and branches is not intuitive yet, but I was hoping someone could help out. Ideally the path mapper would not have to be used.

Many thanks in advance!

graft by operation.gh (6.0 KB)

this is one way:

graft by operation_inno.gh (11.4 KB)

Fantastic, couldn’t be any simpler. Thank you!