I’ve read several of the older postings here about making pretty perforations on 3D curved shapes like speaker grilles, seat covers, microphones, etc., so I know it looks simple but is actually tricky to do. Of course the smart way to do it is with iterative code and/or something like Galapagos. The other way is crude brute force, and since I really know next to nothing about Galapagos and am highly averse to learning yet another set of code syntax/keywords I thought it would be interesting to see how long it would take to come up with a brute force method. This is the result:
I thought it would take a long time to figure out the appropriate H & V spacings, but it really didn’t take more then about 2 hours. Most of this was waiting for the roughly 1 minute compute time.
What was more difficult/time consuming was figuring out an approach to eliminate the dreaded SDiff - which was, of course my first approach. The final result I came up with is fairly easy to follow and is contained in the attached GH file.
I know the GenePool component is not very well liked, but it does work OK here. It would be nice if it could take as input the # genes and their range, but oh well. A better approach might be to substitute GraphMappers for the GenePools, but it might be that tweaking those would be just as tedious as tweaking the GenePool sliders. And making that change would do nothing to help the overall compute time.
If you look carefully at the holes at the current 3 o’clock position you’ll see that the Pipe component has some problems with a few of it’s input curve directions. I think this is some sort of GH quirk and haven’t investigated it.
To 3D print this part it has to be saved as an STL file and run through a slicer program. Rhino’s STL file had more than 100,000 errors, and my guess is this happened becuase the end result is not a closed Brep. Unfortunately the GH SUnion component failed, as did Rhino’s Solid/Union command.
The good news is the 3D Builder program fixed all the errors in about a minute. I sliced the fixed file with SuperSlicer and the results look good. I’ll probably make a few final tweaks before I try printing it.
holes.gh (22.7 KB)