How to solid Difference holes onto a surface? NO PLUGINS

Hi Im having trouble creating these holes in my surface using the cylinders I’ve created. I tried solid difference, brep split, and surface split and nothings working i also tried flattening everything and simplifying it and literally nothing works, some of the cylinders are still sticking out and idk how to get rid of it, I’d appreciate any help i can get! I’ve attached the script but just to warn you, it’s a little heavy (any tips on how to make my file run faster and less heavy would be appreciated too cause my instructor says that if it doesn’t open in a minute then it wont get marked lol) thank you!!!

A3_autosave.gh (89.2 KB)

I think the error occurs with the extrusion solid.
Try Offset.

EDIT: yep , this definition is a total mess.

This part here doesn’t make sense:


You extract the centroid point, but the you use it as UV coordinate “Point” to extract a location/frame/normal in the surface, which is that green arrow on the base.
Then you use that direction to extrude your whole shape to create a Linear extrusion.

The resulting shape is a literal impossible shape, with a thickness that constantly change from positive thickness, zero, and negative thickness.

This is why you holes sometime end up result as if you are adding material instead of subtracting.

Replaced this part with a one-liner in c# to create an actual Brep offset.

Tip: step by step, bake your geometries on Rhino and manually check if the shape make some sense to you.



Here you subdivide your surface into actual quadrilateral chunks and then use every corner to create a cylinder… thus resulting in most of cylinders have quadruplicates and so making everything slow, specifically the boolean difference…
Just use subdivide surface instead :see_no_evil_monkey:



Here you have many circles, and use the “Area” component to get their centers (which you actually already have! Look few centimeters on the left!) … and then to find the direction of extrusion you “Evaluate Surface” on your circles (so grasshopper will have to cast each and every of your circles to a surface, which will be evaluated to an UV point from the “centroid” aka, a totally random point…)

Centroid point from Area component is a “real” world-space point in absolute XYZ coordinates.
“Point” from Evaluate Surface component is a “UV” point, a “2D” coordinate in the parameter space of the surface. (On a “Reparametrized” surface that space go from 0 to 1 in both direction.)
The only correct way to use this is like this:

But this have to make sense! Is the centroid realling always meaningful for the “center” of your surface? No, not always.
Sometime it’s easier to do something like this:

(notice the reparametrize symbol)
0.5 is “half way” between 0 and 1, but this doesn’t mean exactly half-distance… learn about parametric space in nurbs.

You can speed up things here a bit. I rebuild this whole part of code.


Finally, I’ve added a c# script to do solid difference with custom tolerance, to speed it up.


A3_autosave.gh (89.4 KB)

Good luck!

I have been wondering about this lately: the surface centroid is not guarenteed to lie “over” the center of a surface, but neither is the UV point 0.5,0.5. if the surface is trimmed. What can I use that is fail-safe? Get the UV coords of the trim corners and average them?

thank you so much for your help, I appreciate it so much. Is there anything I can replace c# script with as I’m not allowed to use plugins or older components?

Thank you!!! for some reason the spikes are still showing inside my blob when I try this, however, when I try to brep join the surfaces, it doesnt make it one brep for me

Also, I think that rebuild surface might be a plugin so I wouldn’t be able to use that component either

I’m attaching the file just to check if it’s a closed brep.
I modified the definition according to my ideas, but it does not affect the final result.
Processing time 2m 30sec. (Rhino 8)

A3_autosave a.gh (3.6 MB)

A C# component is a native Grasshopper component. It does not come from another plug-in, and only has to be renewed to be Rhino8 compatible.

Absolutely! The centroid doesn’t have to.
But, you can use that point an “pull” it to the surface with Surface Closest Point component.

Yes. That seems a valid approach!
It really depends on every different workflow…

For the solid offset you can use the code from Leo:

For the solid boolean with tolerance, you can set a 0.01 tolerance on your current Rhino model and so Grasshopper should use that tolerance for all its components, like Solid Difference component.

This is how it’s looking right now for me. the circles finally cut through but i had to use a cutter instead of solid difference for it to work so my script is running slow again. for some reason its spliit into different surfaces, however, leaving a weird gap between the outer and inner solid, and i want to be just one thick solid since this is supposed to be a panelization scheme. I’m so sorry I know I keep asking so many questions and I really appreciate all the help everyone has given me

A3_autosave.gh (95.2 KB)

I don’t know if this will help you , but this is how I’ve cut holes in many different shapes:

I used your Loft that was made from the twisted circle inputs as the base surface, which is why the holes are not nicely aligned. There are simple ways around this if you think this method would work for you.

new.gh (20.7 KB)

See the second image. The surfaces you made were fine. Flatten before Brep Join!
Then you get a closed brep, what again makes it possible to use Solid difference
And endresult is a solid brep.

Choose your numbers lower. When shift them down to 10 and 30 it takes about a minute. TIP: As long as you are working on it, make the numbers as small as possible. It is about the idea. When finished turn them. And take a coffee break and have a nice result after x minutes.
regards, Eef


thank you so much that worked!

Hi, I had another question. Now that I’ve created the circles on my surface, I’m trying to turn the surface into panels while keeping some of those circles within each panel. However, when I use Isotrim, it removes or disrupts the circles. How can I panelize the surface while maintaining the circular openings within the panels?

Different question, different thread.

Ok, sorry I’ll make another post