Voronoi 2D
Voronoi tessellation inside a planar boundary — emits a Region whose outer is the boundary and whose holes are the offset cells. Fuses Grasshopper's classic Populate 2D + Voronoi + Boundary Surface chain into a single node so lattice walls / perforated plates stay one-line in the graph.
The node auto-detects the boundary's plane (it does not assume XY), so a wall rotated into the XZ or any oblique plane tessellates correctly without needing a re-orientation node first.
Node
Interactive preview is available in the interactive reader.
Sockets
boundary (in)- Path. Closed planar polyline that bounds the cells. Required — must have ≥ 3 distinct points.
siteCount (in)- Int. Number of Voronoi sites scattered inside the boundary. Default: 24.
seed (in)- Int. RNG seed for site placement. Same seed → identical tessellation. Default: 1.
wallThickness (in)- Float. Inward offset applied to each cell, in mm. Half lands on each side of the gap, so a 0.6 setting carves 0.6 mm walls between cells. Default: 0.6.
region (out)- Region —
outer= the input boundary,holes= the inward-offset cells.
Parameters
Cell Count- Number of sites placed inside the boundary. Higher counts produce smaller, denser cells. Default: 24.
Seed- Mulberry32 seed driving site placement. Bumping the seed shuffles the pattern without changing density. Default: 1.
Wall Thickness- Inward offset per cell, in mm. Set to your line width × 2 for printable lattice walls. Default: 0.6.
How It Works
- Plane fit. Newell's method gives a robust normal even for slightly non-planar input. The node builds an orthonormal
(origin, u, v, normal)basis from that. - Project to 2D. Every boundary point is dropped into the
(u, v)frame. - Site placement. A seeded mulberry32 PRNG rejection-samples points in the 2D bounding box, keeping only those inside the boundary polygon.
- Delaunay (Bowyer–Watson). Sites + a far-away super-triangle are inserted incrementally; "bad" triangles (whose circumcircle contains the new site) are removed and the cavity re-stitched.
- Voronoi dual. For each site, walk its incident Delaunay triangles in CCW order and collect their circumcenters. Each walk yields one convex polygon — that site's cell.
- Sutherland–Hodgman clip. Cells are clipped to the boundary. Cells outside or touching only the super-triangle are dropped here.
- Inward offset. Each clipped cell shrinks by
wallThickness / 2, carving a printable gap between neighbours. - Lift back to 3D. Cells are reprojected through the plane basis and emitted as the
holes[]of the outputRegion.