Dear Path Mapper,

I work with ShapeDiver, so it can help to keep my files free from scripts. I made a simplified version of Path Mapper that’s able to take the “ * “ wildcard with only Grasshopper components.

It only handles paths symbolically, so denoting a Source Path as {0;1} is treated the same as denoting it as {a;b}. The wildcard captures any depth of branch not captured by the other symbols. For example, I can swap the last branch indices of a tree of depth {0;1;2;3;4;5} by mapping from {*;a;b} to {*;b;a} or even to {b;*;a} (which would put the branches on {4;0;1;2;3;5}).

It’s basically useful whenever the exact depth of the tree is not known/can change, but it is known where the branch depths of interest are relative to the start or end of the depth.

I hope that makes sense, and that it may come to be useful to someone!

P.S. It’s relatively fast, but the main bottleneck lies in the “Replace Paths” component that it uses. If someone knows a faster way to place items from one branch onto another, I’m keen to find out!

Dynamic Path Swapper.ghuser (21.4 KB)

dynamic path swapper example.gh (33.7 KB)