I have a three-dimensional grid of cubes arranged in a circle, each cube having six faces, giving me a data structure with four subscripts. I want to select the faces of the outermost cubes in each of four directions.

In two of these directions, this is a very nice application of the SplitTree component, giving it a mask of {?;?;0;1} and {?;0;?;4}, i.e. selecting the number 1 face from cubes in the first rank and the number 4 face from cubes in the first row. Fine!

But for the other two sets of faces, what I really want to say is {?,-1;?,2} and {?,?,-1,3}, where the “-1” would indicated picking up the largest numbered cube in that index. Except that the “-1” notion is not supported, of course. Is there a way to specify what I want using SplitTree?

I attach my actual solution to this problem, which involved using SplitTree to pull out the number 2 and 3 faces of all the cubes and then a dexterous use of PathMapper and List Item (-1) to find the last subtree. This worked, but there MUST be something better.

On a more general philosophical note, there are many components that work against list items where the analogous operation against path subscripts would be very natural. For example, Dispatch, List Item or Cull Pattern. Does anyone have a form of documentation showing the mapping between these basic list operations and how the same effect can be applied to a particular subscript of a path?

Many thanks in advance for any advice.

Bob

TreeSplit1.gh (114.9 KB)