mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-03-14 11:10:01 +01:00
refactor
This commit is contained in:
parent
3f21202fac
commit
5d0a3e7710
@ -1,5 +1,4 @@
|
|||||||
use <experimental/mz_blocks.scad>;
|
use <square_maze.scad>;
|
||||||
use <experimental/mz_walls.scad>;
|
|
||||||
|
|
||||||
maze_rows = 10;
|
maze_rows = 10;
|
||||||
block_width = 2;
|
block_width = 2;
|
||||||
@ -12,28 +11,14 @@ module pyramid_maze(maze_rows, block_width, wall_thickness) {
|
|||||||
square(leng, center = true);
|
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 ;
|
leng = maze_rows * block_width ;
|
||||||
half_leng = leng / 2;
|
half_leng = leng / 2;
|
||||||
|
|
||||||
intersection() {
|
intersection() {
|
||||||
linear_extrude(leng * 2)
|
linear_extrude(leng * 2)
|
||||||
translate([-half_leng, -half_leng])
|
translate([-half_leng, -half_leng])
|
||||||
for(wall = walls) {
|
square_maze([1, 1], maze_rows, block_width, wall_thickness);
|
||||||
for(i = [0:len(wall) - 2]) {
|
|
||||||
hull() {
|
|
||||||
translate(wall[i]) square(wall_thickness, center = true);
|
|
||||||
translate(wall[i + 1]) square(wall_thickness, center = true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pyramid(leng + wall_thickness);
|
pyramid(leng + wall_thickness);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user