Invert a random selection

hi
I have a bunch of curves put together in a curve geometry.
using a random reduce i can select some of this curves. to work with them
how can I select the other curves, the “reduced curves”? like invert the selection of the random reduce element.


can anybody help me?

I think Random Reduce basically reduces a set of integers, which are the indices of whatever you’re working with, so using Set Difference, you can find the inverse.

invert reduce.gh (10.7 KB)

2 Likes

When you run into components like this that don’t have a convenient index output you can get them using the Item Index component, then just cull those index from the original list.


get index.gh (9.8 KB)

2 Likes

Thank You Ethan!
That´s what I wanted!

It´s good to know, this easy way to handle the (imported) data.
Thank You Michael!