How to create random shape and hole patterns for perforating 3d meshes

hello again everyone,

i’m trying to figure out how to make various perforation shapes and patterns on 3d meshes so that i can eventually thicken and 3d print them. i know how to create regular sized repeating hole patterns using weaverbird picture frames on a mesh and then using catmull clark subdivision to turn those picture frame holes into round holes. what i’m trying to figure out is how to create more irregular round holes and other shaped patterns across meshes on different parts of a mesh to make more natural and interesting perforation patterns. i want to vary the density, location and size of holes ands other shapes across meshes, ultimately perforating them to then thicken then and 3d print them.

i have found 3 very nice examples of hole patternmaking scripts in the forum which have helped me discover how to do some of this and i’ve included them and the efforts i have made to try and get them to produce the hole and shape patterns controls on the 3d meshes that i have mentioned here. i’ve also discussed the challenges i have with each of the three scripts and techniques i have tried here:

  1. Holes and recesses on a surface : this creates a beautiful pattern that uses surface morph to map it onto a surface. the problem is I want to do this with mesh and there is no mesh morph technique that i am aware of for this. i’ve heard that pufferfish has a twisted box morphing technique that might make this possible but i’ve not tried that yet. does anybody know how to produce a pattern like this on a 3d mesh ?

  2. Project holes on SRF of : this also produces a very nice hole pattern using triremesh and results in a hole pattern similar to the weaverbird picture frames - catmull clark subdivision technique. i tried to create random radii on this but that did not work. it would be great if this could use random radii and also somehow not completely cover the mesh in holes, leaving some areas blank.. any thoughts on how this might be accomplished ?!

  3. Make regular round holes on the surface of the object : another lovely random hole patterning technique, beautifully scripted and tbh it’s a bit beyond my understanding. i’ve not managed to get it working on the meshes i use but any suggestions here on how to apply this to the internal mesh and how to only apply the patterning technique to certain parts of the mesh rather than the whole mesh would also be very useful.

there is a recent post i created here similar to this - ‘Perforate mesh deleting random quads/triangles based on their area size’ - demonstrating how to delete random quads from a mesh but i was not very happy with the pattern it produced. i wrote that script to try and avoid doing so many extrude cut patterns from the 3 techniques i have been playing with here as sometimes my meshes are big and i need to extrude cut hundreads/thousands of hole patterns out of them!

so I’ve been exploring this method i posted along with the 3 aforementioned methods to try and improve upon and create hole patterns on meshes that allow for both the hole/pattern size, and hole/pattern location on the mesh. it seems point attractors and using techniques like kory bieg’s pattern variation (varies hole pattern based on curvature of surface but again only works on surface) could be helpful here but i’m not sure how to integrate them. there seems to be great options for pattern making and projecting to surfaces but the problem i have is getting it to work on the organic meshes i typically work with.

i hope you can open the attached script here. i have disabled all of the components in it as they are quite demanding, the original methods are grouped in pink and my efforts in the default violet group colour - it’s best to enable each sub group one at a time and see how it works and then see what i have tried.

i notice some people have mentioned in previous posts of mine that they don’t have all of the plugins i use in grasshopper, i have tried to bake all of my geometry internally and limit my use of exotic plugins. please let me know if you are getting any requests for exotic grasshopper plugins and i will try and resolve and reupload the file (if anybody knows how to check which plugins and remove the need for them in a script, that would be very helpful too!). thank you in advance for any advice and tips you have on developing these type of hole patterns for 3d meshes!

hole pattern explorations rev1.gh (1.4 MB)

@Arthur_Paul_O_Keeffe sorry for late reply.
I’d like to make sure I understand the problem you are trying to solve. It is challenging to understand and debug your script. As first step, can you share a model (or a sketch) of what input you have, and what result you are trying to achieve.

hi Rajaa, thanks for responding to this and hopefully i can help clarify the problem i’m trying to solve. i admit that the .gh script i posted contains some complex geometry patterns, that’s why each of the three of them included are all disabled by default. also, each of them contain implicit geometry so no external rhino.3dm file is necessary.

i am trying to achieve random shaped hole geometry on 3d meshes. in the first example in my script, ‘1 Holes and recesses on a surface’, that script only allows for creating those lovely random hole shapes and hole patterns on a surface only, I have tried to edit that script to work on 3d meshes in the included effort but that has not worked. here is an image of the script for that showing the result on a surface, I would like that result on a 3d mesh.

in the second example in my script, ‘2 Project holes on SRF of’, it is possible to perforate consistent holes on a 3d mesh. i tried to edit this script to make the holes and shapes more random but i could not get that to work either.

in the third example in my script, ‘3 Make regular round holes on the surface of the object’, it’s possible to build random sized holes on a surface but not on a 3d mesh. i have tried to edit that script so that it would work on a 3d mesh but could not get that to work either.

each of these original hole making pattern script solutions were generously contributed by other members including @mahanmotamedi1991 for the first one, @DanielPiker for the second one and @michaelvollrath for the third one. i have referenced the links to those posts in my original post above as well as my other relevant post and script 'Perforate mesh deleting random quads/triangles based on their area size’.

basically, what i am really after is a way to create random holes and shape patterns like the first effort in my script that @mahanmotamedi1991 produced on a surface only I need that pattern on a 3d mesh! Thanks again for any insights you can share on this!

Hello

I don’t really see where is your problem surely because I didn’t go too much on all the scripts you put.

The simple way but very slow is to generate some meshes that represent holes (sphere for example) and the cut the mesh. There main problem is the speed and perhaps sometime reliability, the reason I made a tool in Nautilus.But now in V8 things are better

So if you want that

Here the time calculation

cut holes on shape.gh (12.3 MB)

But for fast and more precise cut, cutting using Mesh Isosplitting is best.

1 second for a 244000 faces mesh

15 s for 3.9 Million faces

You will find here a script to cut mesh using Scalar Field and IsoSurface Splitting.

Scalar field is used to generate point distribution, but points can come from whatver tool you want, then a radius is added to the point.

Change subdivision from 0 or 1 to 2 or 3 or more when happy with the result.

Tool can also do Voronoi with various models.

Need Nautilus 2.0.3s

cut holes on shape using iso distance.gh (186.4 KB)