Cull Index question

Hi I’m new to Grasshopper and,

I want to cull two index areas from the tree. But it seems to be not working properly, and have no idea why.


Result:

ghh.gh (16.7 KB)

if your final goal is to remove n random elements from a list, maybe Random Reduce gets you there faster


ghh_re.gh (18.0 KB)

Thanks for the tip!

but my another goal is to list the remainder elements (in this case 2&3). but it keeps listing 0,1,2 when I cull.


ghh_re.gh (18.5 KB)

ahhhh :slight_smile:

Point List component always generates a new list that starts with zero, it does not give a static name to your items, it just lists how many thay are, starting from 0
so if you have 4 elements [0, 1, 2, 3] and cull the first two → [2, 3] when you apply a Point List on those remaining it will always list them as [0, 1]

what you can do is create a parallel list that references a “code” to each geometry, for instance to their center point, and then refere to that to retrieve the object name

this is by “naming” the center point of each surface (A) and retrieving back its name afterwards (B) :

you could also apply the very same Random Reduction operation to a tree where one branch {0} hosts the surfaces, and another branch {1} hosts the names of the items… I wouldn’t recomment this but it’s feasible in this particular case


ghh_re_re.gh (15.9 KB)

1 Like

solved it ! the “naming” tip helped a lot, thanks :slight_smile:

1 Like