mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-06 14:56:47 +02:00
refactor
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
use <stereographic_extrude.scad>;
|
||||
use <experimental/mz_blocks.scad>;
|
||||
use <experimental/mz_walls.scad>;
|
||||
use <square_maze.scad>;
|
||||
|
||||
maze_rows = 10;
|
||||
block_width = 40;
|
||||
@@ -10,25 +9,11 @@ shadow = "YES"; // [YES, NO]
|
||||
wall_height = 2;
|
||||
|
||||
module stereographic_projection_maze2(maze_rows, block_width, wall_thickness, fn, wall_height, shadow) {
|
||||
blocks = mz_blocks(
|
||||
[1, 1],
|
||||
maze_rows, maze_rows
|
||||
);
|
||||
|
||||
walls = mz_walls(blocks, maze_rows, maze_rows, block_width);
|
||||
|
||||
length = block_width * maze_rows + wall_thickness;
|
||||
|
||||
module maze() {
|
||||
translate([-block_width * maze_rows / 2, -block_width * maze_rows / 2, 0])
|
||||
for(wall = walls) {
|
||||
for(i = [0:len(wall) - 2]) {
|
||||
hull() {
|
||||
translate(wall[i]) square(wall_thickness, center = true);
|
||||
translate(wall[i + 1]) square(wall_thickness, center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
square_maze([1, 1], maze_rows, block_width, wall_thickness);
|
||||
}
|
||||
|
||||
stereographic_extrude(shadow_side_leng = length, $fn = fn)
|
||||
|
Reference in New Issue
Block a user