1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-03-14 02:59:42 +01:00
This commit is contained in:
Justin Lin 2020-02-16 16:54:43 +08:00
parent 3f21202fac
commit 5d0a3e7710

View File

@ -1,5 +1,4 @@
use <experimental/mz_blocks.scad>;
use <experimental/mz_walls.scad>;
use <square_maze.scad>;
maze_rows = 10;
block_width = 2;
@ -12,28 +11,14 @@ module pyramid_maze(maze_rows, block_width, wall_thickness) {
square(leng, center = true);
}
blocks = mz_blocks(
[1, 1],
maze_rows, maze_rows
);
walls = mz_walls(blocks, maze_rows, maze_rows, block_width);
leng = maze_rows * block_width ;
half_leng = leng / 2;
intersection() {
linear_extrude(leng * 2)
translate([-half_leng, -half_leng])
for(wall = walls) {
for(i = [0:len(wall) - 2]) {
hull() {
translate(wall[i]) square(wall_thickness, center = true);
translate(wall[i + 1]) square(wall_thickness, center = true);
}
}
}
square_maze([1, 1], maze_rows, block_width, wall_thickness);
pyramid(leng + wall_thickness);
}
}