diff --git a/examples/voronoi/voronoi_holder.scad b/examples/voronoi/voronoi_holder.scad new file mode 100644 index 00000000..9db51aba --- /dev/null +++ b/examples/voronoi/voronoi_holder.scad @@ -0,0 +1,42 @@ +use ; +use ; +use ; + +size = [200, 72]; +grid_w = 8; // grid_w must divide size equally. +thickness = 2; +spacing = 1.5; +frags = 24; + +module voronoi_holder() { + half_spacing = spacing / 2; + cells = vrn2_cells_space( + size = size, + grid_w = grid_w + ); + + r = size[0] / (2 * PI) - thickness * 1.5; + + difference() { + bend_extrude(size = size, thickness = thickness * 3, angle = 360, frags = frags) + render() + difference() { + square(size); + render() + for(cell = cells) { + offset(-half_spacing) + polygon(cell[1]); + } + } + linear_extrude(size[1] - thickness) + arc(radius = r, angle = 360, width = thickness, $fn = frags); + } + + linear_extrude(thickness) + circle(r + thickness * 1.75, $fn = frags); + + linear_extrude(thickness * 2) + circle(r - 0.25 * thickness, $fn = frags); +} + +voronoi_holder(); \ No newline at end of file