diff --git a/examples/maze/heart_maze.scad b/examples/maze/heart_maze.scad index 29162de2..aa252727 100644 --- a/examples/maze/heart_maze.scad +++ b/examples/maze/heart_maze.scad @@ -3,7 +3,7 @@ use ; use ; use ; use ; -use ; +use ; radius_of_heart = 12; height_of_heart = 25; @@ -64,9 +64,9 @@ module heart_maze(maze, radius, cblocks, levels, thickness = 1) { function right_wall(block) = get_wall_type(block) == "RIGHT_WALL"; function upper_right_wall(block) = get_wall_type(block) == "UPPER_RIGHT_WALL"; - function get_x(block) = mz_get(block, "x"); - function get_y(block) = mz_get(block, "y"); - function get_wall_type(block) = mz_get(block, "w"); + function get_x(block) = mz_square_get(block, "x"); + function get_y(block) = mz_square_get(block, "y"); + function get_wall_type(block) = mz_square_get(block, "w"); arc_angle = 360 / cblocks; r = radius / (levels + 1); diff --git a/examples/maze/regular_polygon_maze.scad b/examples/maze/regular_polygon_maze.scad index b5cd94b1..5f6244cf 100644 --- a/examples/maze/regular_polygon_maze.scad +++ b/examples/maze/regular_polygon_maze.scad @@ -1,7 +1,7 @@ use ; use ; use ; -use ; +use ; // only for creating a small maze @@ -42,9 +42,9 @@ module regular_polygon_maze(radius, cblocks, levels, thickness = 1, sides) { function right_wall(block) = get_wall_type(block) == "RIGHT_WALL"; function upper_right_wall(block) = get_wall_type(block) == "UPPER_RIGHT_WALL"; - function get_x(block) = mz_get(block, "x"); - function get_y(block) = mz_get(block, "y"); - function get_wall_type(block) = mz_get(block, "w"); + function get_x(block) = mz_square_get(block, "x"); + function get_y(block) = mz_square_get(block, "y"); + function get_wall_type(block) = mz_square_get(block, "w"); arc_angle = 360 / cblocks; r = radius / (levels + 1); diff --git a/examples/maze/stereographic_hex_maze.scad b/examples/maze/stereographic_hex_maze.scad index 65b5c798..9afc8d94 100644 --- a/examples/maze/stereographic_hex_maze.scad +++ b/examples/maze/stereographic_hex_maze.scad @@ -1,6 +1,6 @@ use ; use ; -use ; +use ; use ; columns = 10; @@ -24,7 +24,7 @@ module hex_maze_stereographic_projection(columns, cell_radius, wall_thickness, f pyramid_height = square_w / sqrt(2); // create a maze - blocks = mz_blocks( + blocks = mz_square_blocks( [1, 1], rows, columns ); diff --git a/examples/maze/twisted_maze.scad b/examples/maze/twisted_maze.scad index 3292b427..3f4c42a8 100644 --- a/examples/maze/twisted_maze.scad +++ b/examples/maze/twisted_maze.scad @@ -1,5 +1,5 @@ use ; -use ; +use ; use ; use ; use ; @@ -12,7 +12,7 @@ angle = 90; axis = "X_AXIS"; // [X_AXIS, Y_AXIS] // $fn = 24; -blocks = mz_blocks( +blocks = mz_square_blocks( [1, 1], rows, columns ); diff --git a/src/maze/_impl/_mz_hex_walls.scad b/src/maze/_impl/_mz_hex_walls.scad index ca218f1f..3fb0d0ec 100644 --- a/src/maze/_impl/_mz_hex_walls.scad +++ b/src/maze/_impl/_mz_hex_walls.scad @@ -1,8 +1,8 @@ -use <../mz_get.scad>; +use <../mz_square_get.scad>; -function _get_x(block) = mz_get(block, "x"); -function _get_y(block) = mz_get(block, "y"); -function _get_wall_type(block) = mz_get(block, "w"); +function _get_x(block) = mz_square_get(block, "x"); +function _get_y(block) = mz_square_get(block, "y"); +function _get_wall_type(block) = mz_square_get(block, "w"); function _is_top_wall(block) = _get_wall_type(block) == "TOP_WALL"; function _is_right_wall(block) = _get_wall_type(block) == "RIGHT_WALL"; diff --git a/src/maze/mz_hamiltonian.scad b/src/maze/mz_hamiltonian.scad index 5f153cce..5c05af0f 100644 --- a/src/maze/mz_hamiltonian.scad +++ b/src/maze/mz_hamiltonian.scad @@ -1,6 +1,6 @@ use <_impl/_mz_hamiltonian_impl.scad>; use ; -use ; +use ; use <../util/sort.scad>; use <../util/dedup.scad>; @@ -15,9 +15,9 @@ function mz_hamiltonian(rows, columns, start, seed) = [ for(block = blocks) let( - x = mz_get(block, "x"), - y = mz_get(block, "y"), - wall_type = mz_get(block, "w"), + x = mz_square_get(block, "x"), + y = mz_square_get(block, "y"), + wall_type = mz_square_get(block, "w"), pts = wall_type == "TOP_WALL" ? _mz_hamiltonian_top(x, y) : wall_type == "RIGHT_WALL" ? _mz_hamiltonian_right(x, y) : wall_type == "TOP_RIGHT_WALL" ? _mz_hamiltonian_top_right(x, y) : [] diff --git a/src/maze/mz_get.scad b/src/maze/mz_square_get.scad similarity index 84% rename from src/maze/mz_get.scad rename to src/maze/mz_square_get.scad index 481aa049..42b760bb 100644 --- a/src/maze/mz_get.scad +++ b/src/maze/mz_square_get.scad @@ -1,4 +1,4 @@ -function mz_get(block, query) = +function mz_square_get(block, query) = let( i = search(query, [ ["x", 0],