Tree rerouting with Sift and Entwine. Can it be done automatically?

Hello All.
I have to resort to this combination of components several times.
Tree that I want to re-route (not remap) according to a clear pattern.
I do it with a sift+entwine+clean tree (to get rid of the nulls).
The difference among the cases is JUST the number of branches’ pairs.
Is there a component that given this type of structure can generate the clean tree?
In my poor intuition the process is always the same…

Thanks in advance for the help!!

Since you haven’t posted the file, why not just use Clean tree with remove empty enabled?
Then using replace paths or renumber paths from treesloth to fix the numbering?

Thanks @christopher.ho!
I tried treesloth but I couldn’t manage with either Renumberpaths or replace paths.
I internalized the data to share the file. Hope someone knows an answer.
It is not really necessary, but as it happens many times in my work I hope someone finds an easier-more direct way that doesn’t need to have the branch amount specified.
Thanks in advance!

BTW. I randomly copied the garage element to show my point. A duplicate element is rerouted to the appropiate branch indicated by the numeric pattern, but I need to specify the amount of branches in advance and I want it to be generated from the length of the list of the set components.

Sift and Entwine Alternative Seek.gh (10.8 KB)

Here is how I would do it with set and path replacement.
You just need to make sure they are of the same data type.


Sift and Entwine Alternative Seek.gh (15.9 KB)

2 Likes

Finally got the time to review it. Works like a charm!
Now I have to find the time to understand how you used the path replace… :grin:

Assign Paths from tree frog makes short work of this as well:

1 Like