Invalid Brep in Solid Difference – Voronoi Cylinder in Rhino 8

Hello, I’m trying to recreate a Voronoi-based porous cylinder model from a research paper using Rhino 8 and Grasshopper, but I’m having trouble with the Solid Difference operation.

The model uses Voronoi cells generated on the XY and XZ planes, followed by Offset, Extrude, and Cap Holes operations. When I bake the geometries from each branch separately and run Check in Rhino, they are all valid, closed solids. However, the Solid Difference operation involving both branches produces an “Invalid Brep.”

I’ve tried changing the tolerance, the Populate 2D seed, and the order of the cutting objects, but the problem remains. I also tried subtracting the two branches from the cylinder sequentially. The first operation returned a “Closed Brep,” while the second returned an “Invalid Brep.”

What could be causing this issue? How can I successfully complete the Boolean operations and obtain the porous cylinder shown in the paper’s final image? Are there any connections or steps in the workflow that I should correct?

I’m attaching the Grasshopper definition, the Rhino file containing the baked geometries, screenshots of my current result, and the target model from the paper.

I would really appreciate any help or suggestions. Thank you!

Hi @Burak_Değirmenci,

The problem is that many of the cutters touch or overlap each other. Boolean operations don’t handle coincident faces like that well, and the result ends up with edges shared by more than two faces, which is why it’s invalid.

With a cylinder radius of 10 and a 20×20 Voronoi rectangle, one pore corner landed almost exactly on the cylinder wall, which also causes a bad edge. A slightly smaller radius will avoid this.

– Dale

Hi Dale, thank you for checking my file and explaining the issue.

I tried reducing the cylinder radius as you suggested, but the Solid Difference operation still returns an “Invalid Brep,” and I’m unable to obtain the final porous cylinder.

Could the touching or overlapping cutters still be causing this? How would you recommend modifying them to resolve the issue?

Does this look like what you wanted?

If so, I would suggest to create a clean section in 2D

5.gh (56.8 KB)

I’m using Rhino 9 beta but I think most of the definition should work in Rhino 8 too

Have you seen the isopod topic:

I looked at the pdf and I’m wondering why these people didn’t use a 3D voronoi? Did they not have access to the command due to an old rhino version?

in any way it is weird and if the end result is a mesh, you can also just create individual overlapping mesh pipes along 3D voronoi struts.

Unfortunately, this is not the model we were expecting to receive. We need a model that is clinical-grade. I have attached an image of the model I would like to achieve.

Your model is just trimmed with a cylinder

Hi Burak,

If you reverse the direction of your offsets so you get this:

Then you can extrude discreet cutters that will be much more effective:

Giving you a closed brep:

And you can tidy up and simplify the code quite a bit and make it more flexible in how you place and orient the desired object:

4j.gh (42.4 KB)

I’ve also added the option of a margin between the cylinder and the box that defines the Voronoi limits to help avoid edge artefacts. And a final step to remove isolated fragments that can result from the booleans.

HTH
Jeremy