How to manually do what MatchPaths (tree frog) does?

Human / Tree frog has this incredible component called MatchPaths that I use often. It lets me flatten a data tree, do a bunch of individual manipulations and then re-assemble as long as the item-count is the same.

I don’t know how I would do this manually though. Just for learning, I’m curious how to do something like this with basic GH components.

Here is an example with a 3D grid of planes, flattened the tree and rotated each plane one degree (0 to 360 degrees) and then reassembled them back into the original data tree. The planes area an orientation base for some piece of geometry.


test_matchpaths.gh (18.6 KB)


RE_test_matchpaths.gh (22.6 KB)

2 Likes

Epic! This is great thanks @Rickson. It even works when I turn off all the ‘simplify’ options. Learned some things about Partition List and Replace Paths.

I was worried that maybe Path Mapper would be the solution, which I don’t like because it’s not as robust to changes.

I’m guessing that I’d still need to check the tree afterwards to make sure whatever operations I’ve done didn’t jumble the indices somehow.