In an attempt to generate a perforation pattern with a grid of round holes, I am generating a list of circles, generating individual brep cylinders from each circle that intersect my main body and then boolean differencing each cylinder from the main body. This process works, but is extremely slow as the number of holes increases. It doesn’t appear that the “Make Hole” feature from Rhino has been implemented in the SDK yet – though it also seems slow when the number of holes is increased (maybe its just using bool diff behind the scenes anyway).
Is there any other way that I can create holes in a solid that may be more computationally efficient than individually diffing each cylinder?
I’ve tried using rg.Brep.CreateBooleanDifference in two ways:
- looping through each cylinder as an individual bool diff and replacing the breps[‘front’] with the result after each iteration
- calling the booldiff once using two lists
The first method takes about 25 seconds for 200 holes
The second method takes about 38 seconds for 200 holes