1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-09-02 11:12:42 +02:00
This commit is contained in:
Justin Lin
2020-02-16 15:59:45 +08:00
parent 77df23ae83
commit 4eaf763a85

View File

@@ -1,4 +1,5 @@
use <square_maze.scad>; use <experimental/mz_blocks.scad>;
use <experimental/mz_walls.scad>;
maze_rows = 8; maze_rows = 8;
block_width = 2; block_width = 2;
@@ -19,18 +20,23 @@ module cube_maze(maze_rows, block_width, wall_thickness, inner_cube, travel_all)
module two_mazes() { module two_mazes() {
module one_maze() { module one_maze() {
blocks = mz_blocks(
[1, 1],
maze_rows, maze_rows
);
walls = mz_walls(blocks, maze_rows, maze_rows, block_width);
translate([origin, origin, half_cube_size]) translate([origin, origin, half_cube_size])
linear_extrude(wall_thickness) build_square_maze( linear_extrude(wall_thickness)
maze_rows, for(wall = walls) {
maze_rows, for(i = [0:len(wall) - 2]) {
go_maze( hull() {
1, 1, // starting point translate(wall[i]) square(wall_thickness, center = true);
starting_maze(maze_rows, maze_rows), translate(wall[i + 1]) square(wall_thickness, center = true);
maze_rows, maze_rows }
), }
block_width, }
wall_thickness
);
} }
one_maze(); one_maze();