Grasshopper

algorithmic modeling for Rhino

Hello community!

I have a head scratcher that I desperately need help with.

The Setting: I have a set of partially overlapping surfaces.

The Problem: I would like to cull out the parts of the surfaces that overlap one another. (reference images below).

This is part of a much larger definition that i am working on that contains hundreds of sets of overlapping surfaces and so I have to be weary of computational load and would request you factor that in with your suggestions. 

I attached a definition with an example set of surfaces.

Any help would be much appreciated as this is the last piece of the puzzle for my definition.

mohammed

Views: 4116

Attachments:

Replies to This Discussion

Great problem, well defined and presented in your GH code.  This is tantalizingly close but...?  Getting the correct surface of the resulting Brep (solids) in a general purpose way is the trick now.  Not so hard really, just more time than I have at the moment.  And maybe the wrong approach.

Attachments:

Beautifully simple! my concern is the Solid difference.. the hair on my neck stands straight when im forced to use solid intersections, they are frighteningly heavy! (atleast in my case when i have to apply this to hundreds of surfaces). 

Hi.

Take a look at the attachment. there are some duplicated faces so I deleted them. Best.

Attachments:

Yeah, two duplicate surfaces!  I finally noticed that too.  Would have had this much earlier if I had noticed that sooner.  :(

OH NO, Im soooo Sorry about that.. I removed the duplicates from my original definition and re-uploaded it just incase this discussion evolves into one of those competitions of achieving an end result with the least number of components and more people wanna take a crack at it!

This is fantastic,, im yet to apply it to all the surfaces because i need to modify it so that it works with my existing tree structure (which my mind seems to not allow me to.. it seems that it knows that its Friday! all im hearing, "leave it till monday"!). Once i do so, ill reupload with all surfaces, perhaps someone may find it useful in the furture.

Here is a method that uses two Anemone loops.  The outer loop (white group) interates through each branch, the inner loop (yellow group) iterates through each surface and applies 'RDiff (Region Difference)' to subtract all other regions in that branch, except for itself.

WARNING!!!  The 'DeDup' cluster removes duplicate surfaces in one branch and is very specific to this set of data.  For this problem, duplicate surfaces will cause any algorithm to fail.

P.S.  Once again though, I have to hand it to Hyungsoo Kim for a very clever solution that returns both sets of surfaces - those removed and those remaining.

Attachments:

ok ok, im loving the creativity behind this one...

*runs away to the corner with his laptop to study it further!

This looping method works equally well with "solids" by simply replacing 'RDiff ' with 'SDiff (Solid Difference').  Nothing shows while the loops are running so be patient.

Attachments:

Separate 'SDiff' geometry results, color by 'Volume':

Attachments:

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