1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 22:28:16 +01:00
dotSCAD/examples/voronoi/voronoi_torus.scad

16 lines
317 B
OpenSCAD
Raw Normal View History

2020-06-10 20:17:18 +08:00
use <voronoi/vrn2_cells_space.scad>;
2021-10-08 09:36:01 +08:00
use <polyline_join.scad>;
2020-04-09 14:53:05 +08:00
use <ptf/ptf_torus.scad>;
size = [40, 80];
grid_w = 5;
2020-06-10 20:17:18 +08:00
cells = vrn2_cells_space(size, grid_w);
2020-04-09 14:53:05 +08:00
$fn = 4;
for(cell = cells) {
cell_poly = [for(p = cell[1]) ptf_torus(size, p, [10, 5], [360, 360])];
2021-10-08 09:36:01 +08:00
polyline_join(cell_poly)
sphere(d = 1);
2020-04-09 14:53:05 +08:00
}