From b8295ab5f1618d820f9671b7ce6104d139f2c8a6 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Tue, 10 Sep 2019 13:30:48 +0800 Subject: [PATCH] refactor --- examples/maze/pyramid_maze.scad | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/maze/pyramid_maze.scad b/examples/maze/pyramid_maze.scad index ed2cfbd8..c2ac831a 100644 --- a/examples/maze/pyramid_maze.scad +++ b/examples/maze/pyramid_maze.scad @@ -8,7 +8,8 @@ wall_thickness = 1; module pyramid_maze(maze_rows, block_width, wall_thickness) { module pyramid(leng) { height = leng / 1.4142135623730950488016887242097; - linear_extrude(height, scale = 0) square(leng, center = true); + linear_extrude(height, scale = 0) + square(leng, center = true); } maze_blocks = go_maze( @@ -18,11 +19,10 @@ module pyramid_maze(maze_rows, block_width, wall_thickness) { ); leng = maze_rows * block_width ; - height = (leng + wall_thickness) / 1.4142135623730950488016887242097; half_leng = leng / 2; - + intersection() { - linear_extrude(height) + linear_extrude(leng * 2) translate([-half_leng, -half_leng]) build_square_maze( maze_rows, maze_rows,