Running into an issue with voronoi generator gang.

Boundary geometry is always different depending on the input, and it’s always an irregular polygon, never a regular rectangle or square. Any ideas why the pattern is not adhering to the boundary shape?

So sorry, I’ve got one more question if you don’t mind.
How would I go about creating closed polygons from the resulting pattern?

I’ve managed to create the images below, which cuts the corners of the original polygon. Is there a way to use the original boundary to inform the closed shapes I can then calculate the original areas of? I know how to do that last bit.

I figured out a really long way around it by hatching the area, dehatching into a brep and then splitting the brep with the extruded lines of the interior voronoi pattern, and then extracted the brep edges, join and close.

For higher resolution voronoi grids, try to make a list branched tree with only those curves that are near the boundary curve, and perform that region operation only on those. Merge the trees together afterwards. Can significantly speed up your code. As comparison, just ran a test of 50.000 points. Without branched tree, executing time is 10* that of without