1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-17 20:11:50 +02:00
This commit is contained in:
Justin Lin
2021-07-18 09:20:14 +08:00
parent 7b6e873b2a
commit bed658178e

View File

@@ -54,7 +54,7 @@ module maze_tower() {
} }
} }
arc(r, [0, 360], wall_thickness); arc(r, 360, wall_thickness);
} }
module maze_floors() { module maze_floors() {
@@ -78,9 +78,7 @@ module maze_tower() {
} }
last_rows = mz[mz_leng - 1]; last_rows = mz[mz_leng - 1];
i = find_index(last_rows, function(cell) cell[2] == CCW_WALL || cell[2] == INWARD_CCW_WALL); i = find_index(last_rows, function(cell) cell[2] == CCW_WALL || cell[2] == INWARD_CCW_WALL);
ci = last_rows[i][1]; theta1 = outThetaStep * last_rows[i][1];
theta1 = outThetaStep * ci;
theta2 = outThetaStep * (ci + 1);
linear_extrude(wall_height) linear_extrude(wall_height)
arc(r * 0.9999, [theta1 + outThetaStep * 0.1, theta1 + outThetaStep * 0.75], wall_thickness); arc(r * 0.9999, [theta1 + outThetaStep * 0.1, theta1 + outThetaStep * 0.75], wall_thickness);
} }
@@ -88,26 +86,20 @@ module maze_tower() {
module d_stairs() { module d_stairs() {
num_stairs = 4; num_stairs = 4;
half_wall_thickness = wall_thickness / 2; half_wall_thickness = wall_thickness / 2;
stair_thickness = wall_thickness / 3;
or = r + half_wall_thickness; or = r + half_wall_thickness;
for(ri = [0:2:rows * 2]) { for(ri = [0:2:rows * 2]) {
for(si = [0:2]) { for(si = [0:2]) {
r_off = wall_thickness / 3 * si; r = or - stair_thickness * si - wall_thickness * ri;
r1 = or - wall_thickness / 3 * si - wall_thickness * ri;
r2 = or - wall_thickness / 3 * (si + 1) - wall_thickness * ri;
translate([0, 0, wall_height * ri / 2 + wall_height / num_stairs * (si + 1)]) translate([0, 0, wall_height * ri / 2 + wall_height / num_stairs * (si + 1)])
linear_extrude(wall_height / num_stairs * (3 - si)) linear_extrude(wall_height / num_stairs * (3 - si))
arc(r, 360, stair_thickness, width_mode = "LINE_INWARD");
difference() {
circle(r1);
circle(r2);
}
} }
} }
} }
difference() { difference() {
maze_floors(); maze_floors();
d_stairs(); d_stairs();
} }
} }