# Voronoi3d Intersection with complex polysurface

Hello there!

I am working for a class in Architectural School, trying to develop something like a “generative Voronoi growth”.

My first goal is to create a pattern on the wall by inscribing voronoi solids into the building’s walls and intersecting them with a simple model of the building’s geometry. The resulting lines on the inside of the room could be an interior structure (or just paint) and should later selectively be subdivided by a second “generation” of voronoi cells in 2d (but I’m not there yet.)

So far I wrote a little GH-script that creates voronoi polysurfaces within the bounding box of the geometry using random and manually specified points.

However, when I intersect the two sets of geometry, the resulting polysurfaces are overlapping and sort of doubling - and I can’t the heck get to the bottom of it.

Would someone look over this and help me out?

Voronoi_on_solid.gh (19.8 KB)
Voronoi_on_Solid.3dm (5.9 MB)

This is a very common mistake when if you overlook the data tree through your workflow.

Voronoi_on_solid_re.gh (50.8 KB)

1 Like

Oh boy, thanks for helping me out! I have a notion that I have to look into data structure a lot for this project…

Alright - I’m warming up this thread, because I am back at that project and trying to extend the algorithm, again having trouble with data structure:

I need to split the six surfaces generated by the first iteration of a 3d-Voronoi operation a second time.

In my file I’m struggling to get Grasshopper to split each large face of the surface (large polygons) only with the individual set of voronoi cells created around the random points on that specific surface, so that each larger region basically spawns a completely random set of voronoi cells that do not cross its border

It seems to me, GH is taking into account all the sets of voronoi sets created for each of the six regions and I can’t for the heck of it find out what my mistake is. Can yomeone help?

Voronoi_on_Solid_UPX.3dm (7.7 MB)
20190327_Voronoi_on_solid_mkV.gh (35.7 KB)

Like this?

20190327_Voronoi_on_solid_mkV_re.gh (35.5 KB)

1 Like

If you want 2D pattern, then check Voronoi Group.

VoronoiGroup.gh (11.0 KB)

4 Likes

Oh wow, that looks incredibly promising - and yes, it’s exactly what I was searching for. Thanks a bunch!

I have been pondering a couple of days about it and I am still not so sure why my own approach did not at all work out, but I will take some time to take apart the data structure once more and check it out thoroughly. I’ll be posting results of course