1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 17:24:20 +02:00

bottom option

This commit is contained in:
Justin Lin
2020-04-10 13:10:29 +08:00
parent 343e6dc26c
commit 0f74a0f24e

View File

@@ -1,7 +1,8 @@
use <experimental/voronoi_square_cells.scad>;
grid_w = 5;
spacing = .1;
spacing = 0;
bottom = "YES"; // [YES, NO]
levels = [
[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
@@ -117,4 +118,15 @@ for(cell = cells) {
offset(-spacing)
polygon(cell[1]);
}
}
if(bottom == "YES") {
color("black")
linear_extrude(1)
for(cell = cells) {
level = levels[size[1] - cell[0][1]][cell[0][0]];
if(!is_undef(level)) {
polygon(cell[1]);
}
}
}