mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-07 07:16:36 +02:00
add params
This commit is contained in:
@@ -11,7 +11,7 @@ shadow = "YES"; // [YES, NO]
|
||||
wall_height = 1;
|
||||
|
||||
// build a hex maze
|
||||
module build_hex_maze(y_cells, x_cells, maze_vector, cell_radius, wall_thickness) {
|
||||
module build_hex_maze(y_cells, x_cells, maze_vector, cell_radius, wall_thickness, left_border = true, bottom_border = true) {
|
||||
function cell_position(x_cell, y_cell) =
|
||||
let(
|
||||
grid_h = 2 * cell_radius * sin(60),
|
||||
@@ -75,15 +75,16 @@ module build_hex_maze(y_cells, x_cells, maze_vector, cell_radius, wall_thickness
|
||||
}
|
||||
}
|
||||
|
||||
// build left border
|
||||
if(left_border) {
|
||||
for(y = [0:y_cells - 1]) {
|
||||
translate(cell_position(0, y)) {
|
||||
up_left_wall();
|
||||
down_left_wall();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// build bottom border
|
||||
if(bottom_border) {
|
||||
for(x = [0:x_cells - 1]) {
|
||||
translate(cell_position(x, 0)) {
|
||||
down_wall();
|
||||
@@ -93,6 +94,7 @@ module build_hex_maze(y_cells, x_cells, maze_vector, cell_radius, wall_thickness
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module hex_maze_stereographic_projection(x_cells, cell_radius, wall_thickness, fn, wall_height, shadow) {
|
||||
|
Reference in New Issue
Block a user