Picking circles by the # of circles each circle intersects

Hello,

I am attempting to create a system where I can filter out circles based on the number of other circles they intersect.

Input 1 – circles (CNR)
Input 2 – given value of circles to use as filter

Output – all circles that are greater than or equal to input 2

I am close to the solution, but I can’t get the “curve | curve” component to stop the self intersection. The ideal intersections are what are created with the “MCX”.

How do I get the “curve | curve” intersection to match the “MCX” for instance?

It’s rather basic, but I think I’m missing a graft procedure somewhere.

Circle Selection By Intersecting Points.gh (18.7 KB)

Circle Selection By Intersecting Points Edited V0 Rtree.gh (30.3 KB)

1 Like

Circle Selection By Intersecting Points Edited V1 simplified.gh (15.0 KB)
simplified

1 Like

if all circles lie on the very same plane and all circles have very same radius, then you can also use Proximity2D, which might be a tad faster than RTree but would only work if both the above conditions are met

Circle Selection By Intersecting Points_Re.gh (16.2 KB)

1 Like

Thank you both for the input and for providing gh examples.
I never considered the “Proximity 2D” component. I’ll take it for a spin and see how I can apply it.

Now I’m curious, as a follow up, could this also be used to filter points (without generating circles) based on the number of neighbor points the have.

ex. given a grid with an even distribution of points where some points are missing, have the ability to select only the points that have 1, 2, 3, etc closest neighbors surrounding them. I’ve Included a screenshot as an example. (the doodle is a loose example)

Thanks for any additional feedback!


this part of the definition is allowing to select all points with “n or more” intersections

but if you trim it out you will chose only points with exactly that amount of intersections:


Circle Selection By Intersecting Points_Re_Re.gh (15.4 KB)


if you want to recreate a complete data tree with all the points divided in branches, where branch address {n} contains all the points with n neighbors:

Yeah I had a look.

The real question now is would you have insight on how to perform the procedure I described without generating circles to calculate the number of neighbor points?

Thanks again for taking an interest in this.

yeah, you can do like this:

circles are just not part of the definition at all :slight_smile:

haha yes I realized that just moments after following up :smiley:

Thank you haha

1 Like