Help with applying voronoi to my own geometry


(I originally posted this in a old thread with the same topic but I think no one is active in that thread and the latest post have not been replied to for approx 2 years, so I created a new one)

I want to add the voronoi shapes within my own volume. The tutorial that I have followed created the voronois within a box generated by the script. So I tried to replace this box command with a command called Geometry and then right klicked on it, and klicked “set on geometry” and choose the shape that I created myself. But it did not work, the script creates voronoi shapes outside of my geometry. What am I doing wrong? Maybe I can not use the box command and create “regular” boxex to be used as guiding template for the script to follow? (25.7 KB)

the Voronoi3D component wants specifically a Box object as input, so if you provide another type of geometry (like a Brep in the shape of a box) it will just convert that Brep input into the “bounding box (World.XY oriented) of that particular Brep”

you can either use a Box Parameter (and click 3 points on the Rhino canvas) or build one using the Solids → Primitive → Box-dedicated components

Thanks for the reply!

What I am looking for is to be able to create my own shape where I can apply my script of the Voronoi3D. It does not have to be a box, it could be organic shapes. For example I have seen in another post that people have applied the vornoi shapes to a form of a snake or a skull.

Lets say I want to fill this shape with voronoi3D:

one way you can do that is to generate the 3D voronoi with bigger size, then intersect your geometry with the 3D cells, like explained in this old but still valuable thread:

note that the box that defines the Voronoi size is the bounding box of the Geometry itself:

and the points that generate the cells are filtered in such a way only the ones inside the geometry are kept:


Thanks for the quick reply, I will try to experiment with this!


I think I made it work now with some if my own modification. I saw that you managed to colour the different shapes. Is it possible to paint my panels with different colours using a script? So when I bake them they will have different colours when I render the model. Please see attached picture of what I mean.I hope you can see what I am trying to explain in the picture… :smiley: (17.4 KB)

Why is it not possible to apply voronoi3d to this shape?

Basic_Model_0229.3dm (9.9 MB)
Voronoi_IrregularShapeTest_2.3dm (14.4 MB)

works ok on my computer… just apply a solid union if you have multiple intersecting -closed- Breps

I uploaded the wrong file. (17.4 KB)

This grasshopper script does not work with the shape I have made.

befor euploading the GH file, please right click on any Parameter that holds a Geometry you have referenced in Rhino and choose Internalise data:

this will save the Geometry inside the GH file, in such a way when we open just the GH file it has your Breps in it

please reupload your GH file with internalized geometries you are having troubles with :slight_smile:

1 Like

Hope this works! (36.5 KB)

I try to have this geometry as different bodys also but stil does not work. I want to be able to create a shape that follows the interior of a building but this might be to advance for gh scrapt to use?

the Geometry is recognized as an open Brep

so when PointInBrep is used, because a Closed Brep that can contain points does not exist, every point is considered as being outside of the brep, thus Dispatched into the “not contained” list, and the Voronoi component receives no point to work with at all

the problem comes from this part being somehow welded to the brep but you can see from the wireframe that a wall is in-between:

I rebuilt that part in Rhino and internalized it, looks like working now :slight_smile: (48.6 KB)


Thank you so much for the help with rebuilding the gh script!!! This helps alot!
But did you also get this faluire at creating a surface on your computer?

I also have another question, wondering if it possible to colour each panels (see question posted a couple of days ago up in the thread)

if you use Boundary Surface component the surfaces are built without errors:

about the colored panels, there are several ways to do that but the one I usually go with is by Elefront plugin:

1 Like

Thanks I will try this! :smiley:

1 Like

WellI took I an alternative path, Been working on imbedding geometry into the voronoi diagram for weeks now =) Using curve - data tree- flatten tree- populate 2d- voronoi 3d. Bit confused when to use cull pattern an solid union? Also by what means does one go from Cell to curve? Ive got the solid portion on lock no color coded, bit confused. Finally, what to do with these blocks to get a appealing voronoi form?

Thanks rhino family
Christian Carey

Christian Carey Applying Voroni to (947.1 KB)

Hi again

So I have successfully made a couple of bodies into a 3d voronoi, but one of them just doesn´t work, the script is having problem converting the shape into a 3d voronoi. The other ones with similair shape worked fine. Why won´t it convert this particular shape intro 3d voronoi?

I will have to upload both the grasshopper and rhino file since it won´t internilize data into the grasshopper file as you instructed earlier.
Voronoi_Test_IrregularShapeWorking_TEST.3dm (72.4 KB) (37.4 KB)

because the whole script is based on finding the random points that are inside your Brep, the thing of starting with an open Brep (that by definition can’t enclose points: it’s open) doesn’t help :slight_smile:

in Rhino you can use menu Analyze → Edge tools → Show Edges, to highlight the naked edges on your polysurface:

this edge was open because there was a tiny surface as long as the whole edge, on the inside of the model:

the other small surface had to be rebuilt, here is the resulting closed solid internalized in the starting Brep parameter :slight_smile: (it looks like the definition starts working correctly, I didn’'t check what happens afterwards) (39.2 KB)


Thanks so much for the explanation and help. I learn so much from you in this thread! :grin:
Unfortunately I can not get it to work with the surfaces between the “pipes”. Maybe it is easier to create a new similair shape and just try again with the script.

I solved the problem by making a new body with a similair shape!

   I'd like some acquisition here, How to color code the blocks an proceed from here on forth?

Made hence way alternative route, so in attribution of logic; I ask even though this has been piped can I still synchronize the vornonoi pattern internally within each block? (16.3 MB) (16.3 MB)

Christian Carey

1 Like