mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-21 14:04:53 +02:00
modify unit
This commit is contained in:
@@ -3,25 +3,26 @@ include <hollow_out.scad>;
|
|||||||
|
|
||||||
// The idea is from Walk Torus83 Fort.
|
// The idea is from Walk Torus83 Fort.
|
||||||
// https://sketchfab.com/3d-models/walk-torus83-fort-44dc701f676d40f7aa1bee874db6fde9
|
// https://sketchfab.com/3d-models/walk-torus83-fort-44dc701f676d40f7aa1bee874db6fde9
|
||||||
// The code works but still requires some math.
|
|
||||||
|
|
||||||
thickness = 4;
|
thickness = 4;
|
||||||
height = 15;
|
height = 15;
|
||||||
radius = 75;
|
radius = 80;
|
||||||
|
|
||||||
|
// wall_radius still requires some math.
|
||||||
|
wall_radius = radius + thickness * 3.39375;
|
||||||
walk_torus83_fort(radius, thickness, height, $fn = 36);
|
walk_torus83_fort(radius, thickness, height, $fn = 36);
|
||||||
wall(radius, height, thickness, $fn = 36);
|
wall(wall_radius, height, thickness, $fn = 36);
|
||||||
|
|
||||||
module wall(radius, height, thickness) {
|
module wall(radius, height, thickness) {
|
||||||
bk_number = 8;
|
bk_number = 8;
|
||||||
half_thickness = thickness / 2;
|
half_thickness = thickness / 2;
|
||||||
ro = radius - half_thickness;
|
ro = radius;
|
||||||
ri = ro * 0.541196;
|
ri = ro * 0.541196;
|
||||||
leng = radius * 0.458804;
|
leng = ro / 2.3;
|
||||||
|
|
||||||
bk_w = leng / bk_number / 2;
|
bk_w = leng / bk_number / 2;
|
||||||
module bk() {
|
module bk() {
|
||||||
for(i = [0:bk_number]) {
|
for(i = [0:bk_number + 2]) {
|
||||||
translate([(2 * i + 1) * bk_w, 0])
|
translate([(2 * i + 1) * bk_w, 0])
|
||||||
square(bk_w, center = true);
|
square(bk_w, center = true);
|
||||||
}
|
}
|
||||||
@@ -32,7 +33,7 @@ module wall(radius, height, thickness) {
|
|||||||
intersection() {
|
intersection() {
|
||||||
rotate(22.5)
|
rotate(22.5)
|
||||||
polygon(shape_starburst(ro, ri, 8));
|
polygon(shape_starburst(ro, ri, 8));
|
||||||
circle(r);
|
circle(ro * 0.9);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,9 +59,9 @@ module wall(radius, height, thickness) {
|
|||||||
|
|
||||||
module walk_torus83_fort(radius, thickness, height) {
|
module walk_torus83_fort(radius, thickness, height) {
|
||||||
stair_number = 13;
|
stair_number = 13;
|
||||||
leng = radius * 0.458804;
|
leng = radius * 0.56;
|
||||||
|
|
||||||
module tower(leng, radius, height) {
|
module tower(radius, height) {
|
||||||
linear_extrude(height)
|
linear_extrude(height)
|
||||||
circle(radius);
|
circle(radius);
|
||||||
translate([0, 0, height])
|
translate([0, 0, height])
|
||||||
@@ -146,9 +147,6 @@ module walk_torus83_fort(radius, thickness, height) {
|
|||||||
|
|
||||||
half_h = height / 2;
|
half_h = height / 2;
|
||||||
|
|
||||||
translate([leng, - thickness / 4])
|
|
||||||
tower(leng, thickness, height * 1.125);
|
|
||||||
|
|
||||||
road_width = thickness / 1.5;
|
road_width = thickness / 1.5;
|
||||||
translate([0, -half_thickness - road_width / 2, half_h - half_h / stair_number])
|
translate([0, -half_thickness - road_width / 2, half_h - half_h / stair_number])
|
||||||
walkway(leng, road_width, height / stair_number * (stair_number - 1), thickness, stair_number);
|
walkway(leng, road_width, height / stair_number * (stair_number - 1), thickness, stair_number);
|
||||||
@@ -159,5 +157,9 @@ module walk_torus83_fort(radius, thickness, height) {
|
|||||||
rotate(45 * i)
|
rotate(45 * i)
|
||||||
translate([offset, offset, 0])
|
translate([offset, offset, 0])
|
||||||
one_burst(leng, thickness, height, stair_number);
|
one_burst(leng, thickness, height, stair_number);
|
||||||
|
|
||||||
|
rotate(45 * i + 22.5)
|
||||||
|
translate([radius + thickness / 1.75, 0])
|
||||||
|
tower(thickness * 1.25, height * 1.125);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user