Matching {A} to {A;B;C}

Hi all,

I’ve run across this problem before and have avoided it by using quick-and-dirty tricks, but I’d like to solve it now. I’ve attached a screenshot and a gh definition, but here is my basic problem.

I have a set of values I’d like to use as line lengths in a list formatted {A}, and a more complex tree of points formatted {A;B;C}, where I’d like each length value to apply to all the points which match highest-level tree indices.

The behavior I expect is that for the first value {0}, that it applies that length to {0;0;0}, {0;0;1}, {0;0;2} etc., and that then {1} applies to {1;0;0}, {1;0;1}, {1;0;2}, etc. I’ve experimented with shortest/longest list, but I don’t think I understand the components well enough to apply them to this situation, and I don’t know if that solution is applicable. Thanks for your help!

tree (8.4 KB)

Hi John,
How’s this? I like Unflatten tree for this sort of thing
tree (14.8 KB)