This is not an easy question. So I hope I explain it well.
I have a tree (51 items in total) of a specific data structure which I had to flatten in order to copy 7 times along different vectors using a series. Now the structure of the new tree consists of 7 branches with each branch containing 51 flattened items. I would like to unflatten each new branch to the structure of the original tree with adding one number at the beginning at each unflattened branch that indicated the number of that item in the copied series (7 copies in this case). For example: if the original tree’s structure is a combination of these branches (1;0) and (2;0), I want the new tree structure for the 7 copies to be {0;1;0}, {1;1;0}, {2;1;0}…{6;1;0}, and {0;2;0}, {1;2;0}, {2;2;0}…{6;2;0}.
I was able to do this by exploding the tree branch consisting of flattened branches (i.e. {0},{1},{2},{3},{4},{5},{6}) then unflattering each tree and entwine them using graft option. Is there an alternative?
Thanks Daniel, works perfectly for single item trees.
Mine is not so I grafted the geometry being copied and change the path mapper slightly and it worked.
That would work. Further cleansing of the try will be required using this option. In my case, if I got for this, I will need to build a path mapper which switches few paths. Thanks Joseph.
Path Mapper is fragile and prone to failure when the upstream data tree changes. I’ve managed to avoid it completely for many years. There are other ways. Shift Paths instead of flatten, Clean Tree and Prune Tree work very well without destroying data trees the way flatten does.