mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-09-01 10:42:57 +02:00
format
This commit is contained in:
@@ -32,8 +32,9 @@ module cargo_container_landmark() {
|
||||
|
||||
module cargoL1() {
|
||||
translate([cargo_height, 0, -cargo20ft_len])
|
||||
rotate([0, -90, 0])
|
||||
cargo20ft();
|
||||
rotate([0, -90, 0])
|
||||
cargo20ft();
|
||||
|
||||
cargo40ft();
|
||||
}
|
||||
|
||||
@@ -41,8 +42,9 @@ module cargo_container_landmark() {
|
||||
translate([-40, -10, 38.75])
|
||||
rotate([18.315, 17.75, 0]) {
|
||||
translate([cargo40ft_len + cargo_width, cargo_width - cargo20ft_len, 0])
|
||||
rotate(90)
|
||||
cargo20ft();
|
||||
rotate(90)
|
||||
cargo20ft();
|
||||
|
||||
translate([cargo20ft_len + cargo_width, -cargo20ft_len, 0])
|
||||
cargo20ft();
|
||||
|
||||
@@ -52,21 +54,22 @@ module cargo_container_landmark() {
|
||||
|
||||
translate([cargo_width, cargo20ft_len, -cargo20ft_len]) {
|
||||
translate([cargo20ft_len, 0, cargo_height])
|
||||
rotate([0, -90, 0])
|
||||
cargo40ft();
|
||||
rotate([0, -90, 0])
|
||||
cargo40ft();
|
||||
|
||||
cargo20ft();
|
||||
}
|
||||
|
||||
cargoL1();
|
||||
translate([cargo_width, cargo_width, -cargo20ft_len])
|
||||
rotate([0, 0, 90])
|
||||
cargo20ft();
|
||||
rotate([0, 0, 90])
|
||||
cargo20ft();
|
||||
}
|
||||
|
||||
if(platform == "YES") {
|
||||
color("black")
|
||||
box_extrude(height = 2, shell_thickness = 1)
|
||||
circle(75, $fn = 96);
|
||||
box_extrude(height = 2, shell_thickness = 1)
|
||||
circle(75, $fn = 96);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,10 +89,11 @@ module cargo_container(leng, width, height) {
|
||||
step_x = leng / nums;
|
||||
half_step_x = step_x * 0.5;
|
||||
points = [for(i = [0:nums - 1]) [-half_leng + i * step_x + half_step_x, 0]];
|
||||
|
||||
along_with(points)
|
||||
rotate([-90, 90, 0])
|
||||
linear_extrude(thickness, scale = [0.7, 0.9], center = true)
|
||||
square([half_step_x, height - edge], center = true);
|
||||
rotate([-90, 90, 0])
|
||||
linear_extrude(thickness, scale = [0.7, 0.9], center = true)
|
||||
square([half_step_x, height - edge], center = true);
|
||||
}
|
||||
|
||||
module door() {
|
||||
@@ -99,8 +103,8 @@ module cargo_container(leng, width, height) {
|
||||
|
||||
for(i = [-1:1]) {
|
||||
translate([-height / 4.25 * i, 0, z])
|
||||
linear_extrude(h, scale = 0.95)
|
||||
square(size, center = true);
|
||||
linear_extrude(h, scale = 0.95)
|
||||
square(size, center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -112,8 +116,8 @@ module cargo_container(leng, width, height) {
|
||||
|
||||
module side() {
|
||||
translate([half_leng, half_w - half_thickness + d_offset, half_h])
|
||||
rotate([90, 0, 0])
|
||||
railing(rails, leng, thickness);
|
||||
rotate([90, 0, 0])
|
||||
railing(rails, leng, thickness);
|
||||
|
||||
}
|
||||
|
||||
@@ -125,9 +129,9 @@ module cargo_container(leng, width, height) {
|
||||
union() {
|
||||
// front
|
||||
translate([-d_offset, 0, half_h])
|
||||
rotate([0, 90, 0])
|
||||
linear_extrude(thickness, scale = 0.95)
|
||||
square([height * 0.95, width * 0.95], center = true);
|
||||
rotate([0, 90, 0])
|
||||
linear_extrude(thickness, scale = 0.95)
|
||||
square([height * 0.95, width * 0.95], center = true);
|
||||
|
||||
// back
|
||||
translate([leng - half_thickness + d_offset, 0, half_h])
|
||||
@@ -136,9 +140,9 @@ module cargo_container(leng, width, height) {
|
||||
|
||||
// top
|
||||
translate([half_leng, 0, height - half_thickness + d_offset])
|
||||
rotate([180, 0, 0])
|
||||
scale([1, (width - edge) / height, 1])
|
||||
railing(rails, leng, thickness);
|
||||
rotate([180, 0, 0])
|
||||
scale([1, (width - edge) / height, 1])
|
||||
railing(rails, leng, thickness);
|
||||
|
||||
side();
|
||||
mirror([0, 1, 0])
|
||||
@@ -147,8 +151,8 @@ module cargo_container(leng, width, height) {
|
||||
|
||||
// bottom
|
||||
translate([half_leng, half_w, -height / 400])
|
||||
linear_extrude(height / 80, scale = 0.95)
|
||||
square([leng * 0.975, width * 0.9], center = true);
|
||||
linear_extrude(height / 80, scale = 0.95)
|
||||
square([leng * 0.975, width * 0.9], center = true);
|
||||
}
|
||||
|
||||
translate([0, 0, half_h])
|
||||
|
@@ -59,9 +59,9 @@ module dancing_formosan(x1, x2, x3, y1, y2, y3, twist, t_step) {
|
||||
}
|
||||
|
||||
translate([0, 0, -2])
|
||||
linear_extrude(2)
|
||||
rotate(twist - twist / len(sections))
|
||||
polygon(taiwan);
|
||||
linear_extrude(2)
|
||||
rotate(twist - twist / len(sections))
|
||||
polygon(taiwan);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -135,8 +135,9 @@ levels = [
|
||||
dots = px_gray(levels, center = true, invert = true, normalize = true);
|
||||
linear_extrude(1.5) difference() {
|
||||
translate([6.5, -10])
|
||||
rotate(22.5)
|
||||
polygon(shape_taiwan(250));
|
||||
rotate(22.5)
|
||||
polygon(shape_taiwan(250));
|
||||
|
||||
render() for(dot = dots) {
|
||||
translate(dot[0])
|
||||
square(0.7 * dot[1]);
|
||||
|
@@ -13,32 +13,33 @@ module spiral_cube(leng, leng_diff, min_leng) {
|
||||
|
||||
if(current_leng > min_leng && current_leng > leng_diff && half_leng > pre_height) {
|
||||
translate([0, 0, pre_height])
|
||||
scale([factor, factor, 1])
|
||||
children();
|
||||
scale([factor, factor, 1])
|
||||
children();
|
||||
|
||||
rotate(atan2(leng_diff, current_leng - leng_diff))
|
||||
spiral_stack(
|
||||
sqrt(pow_leng_diff + pow(current_leng - leng_diff, 2)),
|
||||
thickness + pre_height,
|
||||
i + 1
|
||||
) children();
|
||||
spiral_stack(
|
||||
sqrt(pow_leng_diff + pow(current_leng - leng_diff, 2)),
|
||||
thickness + pre_height,
|
||||
i + 1
|
||||
) children();
|
||||
}
|
||||
else if(half_leng > pre_height) {
|
||||
translate([0, 0, pre_height])
|
||||
scale([factor, factor, (half_leng - pre_height) / thickness])
|
||||
children();
|
||||
scale([factor, factor, (half_leng - pre_height) / thickness])
|
||||
children();
|
||||
}
|
||||
}
|
||||
|
||||
module spiral_squares() {
|
||||
difference() {
|
||||
translate([0, 0, -half_leng])
|
||||
spiral_stack(leng)
|
||||
translate([0, 0, thickness / 2])
|
||||
cube([leng , leng, thickness], center = true);
|
||||
spiral_stack(leng)
|
||||
translate([0, 0, thickness / 2])
|
||||
cube([leng , leng, thickness], center = true);
|
||||
|
||||
translate([0, 0, 0.001])
|
||||
linear_extrude(leng)
|
||||
square(leng, center = true);
|
||||
linear_extrude(leng)
|
||||
square(leng, center = true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,13 +67,14 @@ module base(leng) {
|
||||
difference() {
|
||||
difference() {
|
||||
sphere(r);
|
||||
|
||||
translate([0, 0, -r])
|
||||
linear_extrude(r)
|
||||
square(r * 2, center = true);
|
||||
linear_extrude(r)
|
||||
square(r * 2, center = true);
|
||||
}
|
||||
translate([0, 0, leng * sqrt(3) / 2 + leng / 15])
|
||||
rotate([45, atan2(1, sqrt(2)), 0])
|
||||
cube(leng * 0.99, center = true);
|
||||
rotate([45, atan2(1, sqrt(2)), 0])
|
||||
cube(leng * 0.99, center = true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user