Grasshopper

algorithmic modeling for Rhino

Hey I have been running particle scripts in which I amass a large number of points. For each of these points I have assigned a circle, and I am not trying to eliminate overlapping circles. Delete Dups doesn't work because it isn't the same line. So basically if two circles are overlapping I need it to select one and delete it, but leave the other.

Thanks!

Views: 4730

Attachments:

Replies to This Discussion

Do all your circles have the same radius? If so, I think (but I'm not entirely sure) it would be faster to work on the distance between each point, and to cull one out of two when they are too close.

they do have same radius. I will try what you just suggested

Here is a solution.. using containment..

 

Attachments:

I have tried your solution. However I am a little confused. I have set my points to the first Pt function, and have defined my radius as 50mm with a slider. If I understand your definition correctly the bottom one is separate from the top. The top one defines a region of the overlapping circles and then tests if the points are in the region and outputs 0, 1, or 2. Once it goes through the entire function I only have one circle remaining. Could you by any chance specify where you inputed points, circles etc. And also how your bottom function works? Sorry for the misunderstanding, this is probably one of the most complicated scripts I have had to work with. Thank you

Oops!!

 

I missed a wire connection..

 

 

 

The definition used "index"..

 

For the points of isolated circles,

they are only once contained by the regions..

it means only one "2(inside)"..

so using the indices of that points,

I picked up the corresponding circles..

 

For the points of overlapped circles,

they are contained twice or more..

I chosed one index of them..

 

----

 

Below definition is..

a kind of grasshopper tricks..

 

The circle component casts from input objects to circles..

In that process, objects except circular curves are discarded..

The following Point and Circle Component is not needed..

I'm afraid the RUnion component works in your case, but not for complex shapes like Drew's one.

When there are a lot of circles really close to each other, some region union correspond to the small surfaces between circles, where there is none (see the image)

I tried removing points with the Cull Duplicates component, but even with a tolerance greater than the radius of circles, there still are some problems. I don't really understand how is working this component. (I tried with "average", "cull all" and "leave one" options).

Hey,

how about this one. its a new component.

BestRegards

DeDackel

Attachments:

Have a look at the Cullpts component as well.

Danny explains it here quiet nice:

http://www.grasshopper3d.com/forum/topics/how-to-apply-rules-for-ra...

Take the T with the expression T*2 and the setting-leave one

BestRegards

DeDackel

Yep, it seems to work. What a powerfull component ! I'm loving it ;)

I love it too :-)

AWESOME!!!! Thank you guys so much! Its great to see such an active and helping community.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service