A negative value for the Mask syntaxes

Is it possible to use a negative integer for the Mask of the Split Tree component for instance as it is possible for the List item component? For instance, I’d like to get this result; {*}[(<3)or(>-3)], but seems the mask doesn’t accept negative value. Or there is only the Path Statistic component that can help, but it’s not the convenient way at all…

This works

@martinsiegrist First of all, thank you for your reply, but I know about the Path Statistic comp, you don’t get my question, I want to get this logic like this {*}[(>=-3)] which means for any path, want to get three last items

Please upload here a sequence with tree data. :arrow_up_small:


Mask.gh (8.2 KB)

1 Like

Mask_re.gh (14.3 KB)


@HS_Kim Thank you! It is a solution indeed but workaround solution, seems there are no possibilities to use simple syntaxes for Mask

Can this work ?
MaskFirstaLast.gh (7.8 KB)


This also works…

Mask_reV2.gh (15.1 KB)

1 Like

@eddi Neat solution as well

I appreciate the string manipulation component :grin:

MaskFLwTfrm.gh (11.4 KB)


Just for fun:

a = x [y: -y:]

del x[y: -y:]



@martinsiegrist Yea, maybe the simplest solution :grinning:

1 Like

@DavidRutten are negative numbers for the SplitTree going to be implemented in GH2?

1 Like