diff --git a/examples/maze/cylinder_maze.scad b/examples/maze/cylinder_maze.scad index 362c71b7..57f503e3 100644 --- a/examples/maze/cylinder_maze.scad +++ b/examples/maze/cylinder_maze.scad @@ -36,7 +36,6 @@ module cylinder_maze() { maze_columns = round(2 * 3.14159 * radius / block_width); maze_blocks = mz_square_blocks( - [1, maze_rows], maze_rows, maze_columns, x_wrapping = true ); diff --git a/examples/maze/heart2heart_maze.scad b/examples/maze/heart2heart_maze.scad index 3fc43e31..5c8a105e 100644 --- a/examples/maze/heart2heart_maze.scad +++ b/examples/maze/heart2heart_maze.scad @@ -32,7 +32,6 @@ module heart_base(name, font_name, font_size, radius, ring_thickness, tip_r_of_h module heart2heart_maze(names, font_name, font_size, radius_of_heart, tip_r_of_heart, wall_thickness, cblocks, levels, spacing) { maze = mz_square_blocks( - [1, 1], cblocks, levels, y_wrapping = true ); diff --git a/examples/maze/heart_maze.scad b/examples/maze/heart_maze.scad index 11066da1..a6fa74c5 100644 --- a/examples/maze/heart_maze.scad +++ b/examples/maze/heart_maze.scad @@ -107,7 +107,6 @@ module heart_maze(maze, radius, cblocks, levels, thickness = 1) { } maze = mz_square_blocks( - [1, 1], cblocks, levels, y_wrapping = true ); diff --git a/examples/maze/maze_masking.scad b/examples/maze/maze_masking.scad index 9ec09805..d8d3efe0 100644 --- a/examples/maze/maze_masking.scad +++ b/examples/maze/maze_masking.scad @@ -30,8 +30,7 @@ module maze_masking(start, mask, block_width, wall_thickness, wall_height, base_ columns = len(mask[0]); blocks = mz_square_blocks( - start, - rows, columns, + rows, columns, start, mz_square_initialize(mask = mask) ); diff --git a/examples/maze/mobius_maze.scad b/examples/maze/mobius_maze.scad index 24e7118a..f4e88f5d 100644 --- a/examples/maze/mobius_maze.scad +++ b/examples/maze/mobius_maze.scad @@ -15,7 +15,6 @@ radius = 0.5 * leng / PI; a_step = 360 / leng; blocks = mz_square_blocks( - [1, 1], rows, columns, y_wrapping = true ); diff --git a/examples/maze/noisy_circle_maze.scad b/examples/maze/noisy_circle_maze.scad index 3e595134..ed3882d1 100644 --- a/examples/maze/noisy_circle_maze.scad +++ b/examples/maze/noisy_circle_maze.scad @@ -5,10 +5,9 @@ use ; use ; use ; -module noisy_circle_maze(start, r_blocks, block_width, wall_thickness, origin_offset, noisy_factor) { +module noisy_circle_maze(r_blocks, block_width, wall_thickness, origin_offset, noisy_factor) { double_r_blocks = r_blocks * 2; blocks = mz_square_blocks( - start, double_r_blocks, double_r_blocks ); @@ -35,7 +34,6 @@ module noisy_circle_maze(start, r_blocks, block_width, wall_thickness, origin_of } noisy_circle_maze( - start = [1, 1], r_blocks = 8, block_width = 5, wall_thickness = 2, diff --git a/examples/maze/pyramid_hex_maze.scad b/examples/maze/pyramid_hex_maze.scad index b7bb3d75..c825607a 100644 --- a/examples/maze/pyramid_hex_maze.scad +++ b/examples/maze/pyramid_hex_maze.scad @@ -31,7 +31,6 @@ module pyramid_hex_maze(columns, cell_radius, wall_thickness) { pyramid_height = square_w / sqrt(2); blocks = mz_square_blocks( - [1, 1], rows, columns ); diff --git a/examples/maze/regular_polygon_maze.scad b/examples/maze/regular_polygon_maze.scad index 8632d755..27a98fa6 100644 --- a/examples/maze/regular_polygon_maze.scad +++ b/examples/maze/regular_polygon_maze.scad @@ -50,7 +50,6 @@ module regular_polygon_maze(radius, cblocks, levels, thickness = 1, sides) { r = radius / (levels + 1); maze = mz_square_blocks( - [1, 1], cblocks, levels, y_wrapping = true ); diff --git a/examples/maze/sphere_maze.scad b/examples/maze/sphere_maze.scad index 81fd895b..a8268cd7 100644 --- a/examples/maze/sphere_maze.scad +++ b/examples/maze/sphere_maze.scad @@ -52,7 +52,6 @@ module sphere_maze() { size = [rows * block_width, columns * block_width + pole_offset * 2]; blocks = mz_square_blocks( - [1, 1], rows, columns, y_wrapping = true ); diff --git a/examples/maze/square_maze.scad b/examples/maze/square_maze.scad index abf9c87d..6baf57d8 100644 --- a/examples/maze/square_maze.scad +++ b/examples/maze/square_maze.scad @@ -1,9 +1,8 @@ use ; use ; -module square_maze(start, rows, block_width, wall_thickness) { +module square_maze(rows, block_width, wall_thickness) { blocks = mz_square_blocks( - start, rows, rows ); @@ -20,7 +19,6 @@ module square_maze(start, rows, block_width, wall_thickness) { } square_maze( - start = [1, 1], rows = 10, block_width = 2, wall_thickness = 1 diff --git a/examples/maze/stereographic_hex_maze.scad b/examples/maze/stereographic_hex_maze.scad index 9afc8d94..e0b6ff7f 100644 --- a/examples/maze/stereographic_hex_maze.scad +++ b/examples/maze/stereographic_hex_maze.scad @@ -25,7 +25,6 @@ module hex_maze_stereographic_projection(columns, cell_radius, wall_thickness, f // create a maze blocks = mz_square_blocks( - [1, 1], rows, columns ); diff --git a/examples/maze/torus_maze.scad b/examples/maze/torus_maze.scad index 62279fd7..1037d3f3 100644 --- a/examples/maze/torus_maze.scad +++ b/examples/maze/torus_maze.scad @@ -15,7 +15,6 @@ radius = 0.5 * leng / PI; a_step = 360 / leng; blocks = mz_square_blocks( - [1, 1], rows, columns, x_wrapping = true, y_wrapping = true ); diff --git a/examples/maze/twisted_maze.scad b/examples/maze/twisted_maze.scad index 3f4c42a8..96b63e39 100644 --- a/examples/maze/twisted_maze.scad +++ b/examples/maze/twisted_maze.scad @@ -13,7 +13,6 @@ axis = "X_AXIS"; // [X_AXIS, Y_AXIS] // $fn = 24; blocks = mz_square_blocks( - [1, 1], rows, columns ); diff --git a/src/maze/mz_hamiltonian.scad b/src/maze/mz_hamiltonian.scad index 5c05af0f..ed533281 100644 --- a/src/maze/mz_hamiltonian.scad +++ b/src/maze/mz_hamiltonian.scad @@ -6,8 +6,7 @@ use <../util/dedup.scad>; function mz_hamiltonian(rows, columns, start, seed) = let( - blocks = mz_square_blocks( - [1, 1], + blocks = mz_square_blocks( rows, columns, seed = seed ), diff --git a/src/maze/mz_square_blocks.scad b/src/maze/mz_square_blocks.scad index d6fc096c..1644aa2c 100644 --- a/src/maze/mz_square_blocks.scad +++ b/src/maze/mz_square_blocks.scad @@ -1,7 +1,7 @@ use <_impl/_mz_blocks_impl.scad>; use ; -function mz_square_blocks(start, rows, columns, maze, x_wrapping = false, y_wrapping = false, seed) = +function mz_square_blocks(rows, columns, start = [1, 1], maze, x_wrapping = false, y_wrapping = false, seed) = go_maze( start[0], start[1], // starting point is_undef(maze) ? mz_square_initialize(rows, columns) : maze,