Move away if circle edges intersects

I have several things, I’m trying to do.

  1. create circle crvs of three different size based on existing circles and their radius
  2. use those resultant circles and spread them out if they intersect. and spread them out at a specified distance between circle edges. The direction of the spread is random but all of it should be in the x or y direction.
  3. have all circles contained in a rectangular crv. If out of bounds, deleted.

so far I have the first parameter done but no idea how to get the second or last one.


Circle_filter_creation.gh (43.3 KB)

Your first Crv param is not internalized.

Hey, sorry here is the file with the internalized crvs
Circle_filter_creation.gh (107.7 KB)

Extremely long delay opening the file :interrobang: 806 curves… 455K curves from both outputs of CrossRef, taking one full minute in CrvProx. Too much for me, I don’t get it quickly.

My standard advice is to debug code with FAR FEWER curves; don’t use all of them until it works.

Sorry about that I didn’t know it would be that big of a file. I just got rid of 75% of the curves. it should be faster to work with now.
Circle_filter_creation.gh (43.3 KB)

I didn’t look at that, just disabled the slow part at the end and added some code trying to make sense of this:


Circle_filter_2024Jul29a.gh (124.1 KB)

As to your detailed goals, they sound a little vague and arbitrary. Not interested, sorry.

P.S. Look at the three text panels at the top of the image I posted. The four branches add up to 675, which is 131 curves less than the 806 going in. The next two panels show gaps in the domains being considered, which presumably account for the 131 missing circles.

Is that on purpose :question: Or accident?

What useful information are you getting from CrossRef and CrvProx :question:

Are 455K results useful in any way :question:

It’s on accident. Thanks for pointing that out.
I was browsing several different forums and crv prox seemed like an option to find out whether two crvs were intersecting. I’m relatively new to grasshopper, but my thought process was find a way to filter for the intersected circles and then have those circles go away from each other. Not entirely too sure if crossRef and CrvProx is the way. :sweat_smile:

Here is a different way to consider this issue. Maybe not how you like, and definitely not considering intersections and “spread them out”. Note the pink circles, they are the only two because that branch has only two.


Circle_filter_2024Jul29b.gh (114.7 KB)

The purple group creates new circles, all the same size and color by branch.

If you’re actually looking to “move the circles away from each other”, then you’ll likely need an iterative approach (perhaps using Kangaroo). I might suggest looking up “Circle Packing” on this forum as there are many threads on this topic. Here’s one that might be of use. KANGAROO2 Circle Packing - Different sized circles - #12 by Jack_Zeng and Circle Packing tutorial with Grasshopper