1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-31 02:10:28 +02:00
This commit is contained in:
Justin Lin
2022-04-03 14:16:17 +08:00
parent fb4a626707
commit 8ce96f9128
5 changed files with 66 additions and 75 deletions

View File

@@ -10,11 +10,9 @@ module pyramid_hex_maze(columns, cell_radius, wall_thickness) {
module bottom(rows, columns, cell_radius, wall_thickness) {
grid_h = 2 * cell_radius * sin(60);
grid_w = cell_radius + cell_radius * cos(60);
for(x_cell = [0:columns - 1]) {
for(y_cell = [0:rows - 1]) {
translate([grid_w * x_cell, grid_h * y_cell + (x_cell % 2 == 0 ? 0 : grid_h / 2), 0])
circle(cell_radius + wall_thickness, $fn = 6);
}
for(x_cell = [0:columns - 1], (y_cell = [0:rows - 1]) {
translate([grid_w * x_cell, grid_h * y_cell + (x_cell % 2 == 0 ? 0 : grid_h / 2), 0])
circle(cell_radius + wall_thickness, $fn = 6);
}
}
@@ -35,17 +33,17 @@ module pyramid_hex_maze(columns, cell_radius, wall_thickness) {
intersection() {
linear_extrude(pyramid_height)
for(wall = walls) {
polyline2d(
wall,
wall_thickness,
startingStyle = "CAP_ROUND", endingStyle = "CAP_ROUND"
);
}
for(wall = walls) {
polyline2d(
wall,
wall_thickness,
startingStyle = "CAP_ROUND", endingStyle = "CAP_ROUND"
);
}
translate([square_offset_x, square_offset_y, 0])
linear_extrude(pyramid_height, scale = 0)
square([square_w, square_h], center = true);
linear_extrude(pyramid_height, scale = 0)
square([square_w, square_h], center = true);
}
linear_extrude(wall_thickness)