diff --git a/examples/maze/heart2heart_maze.scad b/examples/maze/heart2heart_maze.scad new file mode 100644 index 00000000..ec080889 --- /dev/null +++ b/examples/maze/heart2heart_maze.scad @@ -0,0 +1 @@ +use <>; \ No newline at end of file diff --git a/examples/maze/heart_maze.scad b/examples/maze/heart_maze.scad index 44d063e3..717a7e3d 100644 --- a/examples/maze/heart_maze.scad +++ b/examples/maze/heart_maze.scad @@ -57,15 +57,10 @@ module heart_to_heart_wall(radius, length, angle, thickness) { } } -module heart_maze(radius, cblocks, levels, thickness = 1) { +module heart_maze(maze, radius, cblocks, levels, thickness = 1) { arc_angle = 360 / cblocks; r = radius / (levels + 1); - maze = go_maze(1, 1, - starting_maze(cblocks, levels), - cblocks, levels, y_circular = true - ); - difference() { render() union() { for(i = [1 : levels + 1]) { @@ -101,6 +96,11 @@ module heart_maze(radius, cblocks, levels, thickness = 1) { } } +maze = go_maze(1, 1, + starting_maze(cblocks, levels), + cblocks, levels, y_circular = true +); + intersection() { union() { ellipse_extrude(height_of_heart / 2) @@ -112,7 +112,7 @@ intersection() { } linear_extrude(height_of_heart, center = true) - heart_maze(radius_of_heart, cblocks, levels, wall_thickness); + heart_maze(maze, radius_of_heart, cblocks, levels, wall_thickness); } linear_extrude(wall_thickness * 2, center = true)