Grasshopper

algorithmic modeling for Rhino

Hi,

 

I am trying to compare two coplanar surfaces based on area and cull the smaller of the surfaces.  The surfaces are shared walls of adjacent extruded cubes.  The cubes are extruded at varied heights.  I want to keep the larger wall between each cube and delete the smaller overlapping wall from the data structure.  If there are two surfaces of equal area, I want to cull one of them.  (In others words, I only want one wall between each cube cell.)  I want to do this because I plan to render the cube extrusions (on a very large surface) as different materials and I need to eliminate overlapping surfaces.  In the attached image, you can see the overlapping surfaces at the intersections of the cubes.  I have done similar culling operations but I am having trouble with this one since I have to compare these specific area relationships between cubes.  ANy advice would be much appreciated.

 

Matthew 

Views: 1824

Attachments:

Replies to This Discussion

Hi All,

I though I would put this question back in the queue.  I have attached an updated definition in which I am trying to compare the overlapping surfaces with a shared XYZ point (similar to using the centroid for sorting duplicate surfaces).  But, that's my theory...I am not sure how to manage the lists to then compare overlapping surface and then cull them from the overall assembly.  Any help would be appreciated.  Thanks!

Matthew

Attachments:

I'm probably not advanced enough yet to be of much help, but maybe some combination of these:

Math » Operators » Larger Than

Sets » List » Dispatch 

 

-Taylour

You were on the right track. Here is my approach:

 

  1. Get the center point of each face
  2. Project that center point back to the base surface, and get its UV coordinates
  3. Round off the UV coordinates to avoid slight inaccuracies
  4. use "Create Set" to create an index map based on duplicate points
  5. use "assign paths" (a custom cluster I wrote) to put the faces into branches based on create set's index map
  6. within each branch, sort by area, and extract the larger one. 

 

Attached is a definition that demonstrates. Let me know if you have any questions about what I did!

Attachments:

Thanks Andrew, that works very well.  It is still a bit mysterious to me since I have not worked much with sets at this level, but I see what the definition is doing in principle.  I'll have to study it more!  Thanks again for your reply.

 

Best Regards, Matthew

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service