I would like to suggest several components that would make working with trees easier.
I'm currently trying to create a three-dimensional grid of points where each point is on its own branch corresponding to its indices within the three-dimensional matrix, but I'm not sure it's even possible for adjustable grid dimensions.
1. Select Branches
This has seemed to be missing to me since trees were introduced. Like Replace Branches, this component would allow the user to filter a tree with a branch pattern, but it would preserve the branch paths of the output elements instead of merging them into a given path. Maybe this can be done with Path Compare and Cull Pattern, but it should be easier.
E.g. for
{0:0:0}
0 Point 1
{0:1:0}
0 Point 2
{0:1:1}
0 Point 3
1 Point 4
Selecting 0:1:* would give
{0:1:0}
0 Point 2
{0:1:1}
0 Point 3
1 Point 4
2. Extract Paths
Given an input tree this component would output a new tree where each element was the path of the corresponding element in the input tree.
E.g. for
{0:0}
0 Referenced Point
1 Referenced Point
{0:1}
0 Referenced Point
1 Referenced Point
2 Referenced Point
The result would be
{0:0}
0 {0:0}
1 {0:0}
{0:1}
0 {0:1}
1 {0:1}
2 {0:1}
3. Set paths
This component would take a data tree and a path tree and apply the paths to the elements of the data tree.
E.g. for
(Tree 1 - data)
{0}
0 Point 1
1 Point 2
2 Point 3
{1}
0 Point 4
1 Point 5
(Tree 2 - paths)
{0}
0 {0:1}
1 {1:0}
{1}
0 {0:0}
1 {1:0}
The result would be
{0}
0 Point 3
{0:0}
1 Point 4
{0:1}
0 Point 1
{1:0}
0 Point 2
1 Point 5
Any elements in the data tree for which there is not a corresponding path in the path tree would retain its path (like Point 3).
If anyone wants more clarification on these examples I would be happy to oblige.
Tags: