Metal foam in Grasshopper

Hi everyone,

I’ve been struggling with creating a mesh in Grasshopper that replicates the look of a metal foam such as this:

There are a number of posts that discuss solutions for creating organic foam-like meshes, but the deal-breaker comes from wanting to apply this foam definition to an imported piece of geometry from another CAD program, in this case Solidworks. When the imported geometry (either a direct import of SW data, or via the .STEP or .IGES file formats) is used, it often takes some epic calculation times and then either doesn’t work, or doesn’t quite have quite the right look or density.

After many tests, this forum post seemed to produce the most foam-like solution:
Solid with sponge-like surface?

This old forum post is a little broken, but the definition and Rhino file are still reachable here: Sponge by feklee - Thingiverse

This definition has been the closest to getting the right look but when an imported file set as a BREP (of approx. 120x120x300mm) is used, it fails to work. It works at smaller ‘Populate3D’ counts (3000 or less), but to get small enough holes and to fill the shape, my guess is that the count probably needs to be in the 15000+ range.

Here’s a preview render of a 15000 count Populate3D block rendered in Keyshot:

And here’s the geometry next to a 1000 count Populate3D applied:

So my question is, does anyone have any experience working with Grasshopper and imported geometry and/or has any advice on getting the definition to work at higher Populate3D counts? I’m not super experienced with Rhino & Grasshopper so there’s probably a smarter approach… I’m also open to completely left-field solutions as well :smiley:

Anyway here’s my definition file (a small modification of the work from @DanielPiker, @DavidWood and @feklee):

20200624_MetalFoam_GH.gh (18.9 KB)
And my Rhino file containing the imported Solidworks geometry:
20200624_MetalFoam.3dm (6.0 MB)

Something like this?

Don’t use breps. Use meshes.

As a general rule, I can get on board with that advice. Unfortunately it doesn’t seem to solve the definition failing in this case. Could be user-error on my part of course…

The Dendro plugin is great, but the results remind me a bit of the effect you can achieve in Autodesk’s Meshmixer program. It’s a cool voronoid look, but a little too ‘blobby’ to look like a mass-produced metal foam material…

Hi Paul,

Were you able to solve the problem with mesh intersection. I am having same problem with with my file.

Thanks
Aniket

Sorry Aniket, I’ve not had any breakthroughs… :frowning:

Thanks for the reply, I am trying something else and will let you know if I have any.

This one works, but if you increase or change the size box the mesh intersection fails.

I did explore that solution, along with a few other Dendro plugin ones. I don’t recall exactly why I didn’t use it in the end, but I suspect it was because the calculations were taking an extremely long time to compute.