Geometry list inside other

I would like to divide a list of points based of its belongs to a rectangles. I have done it but selecting one of the rectangle. I like that do it in the three rectangles automatically. Could you help me?

Regards. (7.0 KB)

Use the output of the point in curve as the input to a cull pattern

1 Like

Use the Point In Curves component (you’re file uses the Point In Curve component).


The Index output gives the index of first region that contains the point.


1 Like

unnamed[fixed].gh (8.8 KB)

1 Like

Thanks so much @adel.albloushi Adel and @kev.r ! I check it and it works.
And…If we doesn´t know the numbers of rectangles , do you know how could we do the explode tree?

you’re welcome. it shouldn’t matter how many curves there are
you’ll have a list of curves like this
c = [c1, c2, … , cn]
and a list of lists of points like this
p = [ [pts_c1], [pts_c2] , … , [pts_cn] ]

and they will always be in order, meaning that for any index i, p[i] is list the points inside the curve c[i]

so, it really depends on what you want to do with the curves and points should dictate how to manage the curves and lists of points

check this example
unnamed[fixed][example].gh (17.5 KB)

i included an explode tree so there’s a visual way of selecting p[i]. if you have variable number of curves, you can always right-click on the explode tree and select match outputs