1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-01 20:40:28 +02:00
This commit is contained in:
Justin Lin
2019-09-11 14:46:58 +08:00
parent ba71c3099f
commit e327df46f3

View File

@@ -12,20 +12,21 @@ module floor_stand(width, height, thickness, joint_spacing) {
]; ];
module board_base() { module board_base() {
difference() { translate([0, -half_h, 0])
polygon(points); difference() {
translate([0, -half_h, 0]) polygon(points);
scale([0.6, 0.1]) translate([0, -half_h, 0])
polygon(points); scale([0.6, 0.1])
} polygon(points);
} }
module joint_top() {
linear_extrude(thickness / 4 + half_sc, scale = 0.1)
circle(thickness / 4 + half_sc);
} }
module joint_tops(dist) { module joint_tops(dist) {
module joint_top() {
linear_extrude(thickness / 4 + half_sc, scale = 0.1)
circle(thickness / 4 + half_sc);
}
half_d = dist / 2; half_d = dist / 2;
translate([-half_d, 0, 0]) translate([-half_d, 0, 0])
rotate([0, -90, 0]) rotate([0, -90, 0])
@@ -34,34 +35,14 @@ module floor_stand(width, height, thickness, joint_spacing) {
translate([half_d, 0, 0]) translate([half_d, 0, 0])
rotate([0, 90, 0]) rotate([0, 90, 0])
joint_top(); joint_top();
} }
module stick() {
linear_extrude(thickness * 0.75)
square([width / 12, half_w], center = true);
}
module slot_df() {
translate([0, -half_h - thickness, -half_th])
stick();
}
module border() {
translate([0, 0, half_th])
color("black") linear_extrude(half_th / 2)
hollow_out(shell_thickness = font_size / 4)
offset(half_w / 10)
scale([0.75, 0.675])
polygon(points);
}
module board1() { module board1() {
difference() { difference() {
union() { union() {
linear_extrude(thickness, center = true) linear_extrude(thickness, center = true)
difference() { difference() {
translate([0, -half_h, 0]) board_base();
board_base();
square([width / 1.5, height / 3], center = true); square([width / 1.5, height / 3], center = true);
} }
rotate([0, 90, 0]) rotate([0, 90, 0])
@@ -73,66 +54,75 @@ module floor_stand(width, height, thickness, joint_spacing) {
linear_extrude(width / 1.5, center = true) linear_extrude(width / 1.5, center = true)
circle(thickness, $fn = 24); circle(thickness, $fn = 24);
joint_tops(half_w / 1.5 * 2); joint_tops(half_w / 1.5 * 2);
slot_df();
} }
} }
module board2() { module board2() {
difference() { linear_extrude(thickness, center = true)
union() { union() {
linear_extrude(thickness, center = true) difference() {
union() { board_base();
difference() { square([width, height / 3], center = true);
translate([0, -half_h, 0]) }
board_base(); translate([0, -height / 12 - joint_spacing / 4, 0])
square([width, height / 3], center = true); difference() {
} square([width / 1.5 - joint_spacing, height / 6 + joint_spacing / 2], center = true);
translate([0, -height / 12 - joint_spacing / 4, 0]) square([width / 1.5 - thickness * 2, height / 6], center = true);
difference() {
square([width / 1.5 - joint_spacing, height / 6 + joint_spacing / 2], center = true);
square([width / 1.5 - thickness * 2, height / 6], center = true);
}
} }
rotate([0, 90, 0])
linear_extrude(width / 1.5 - joint_spacing, center = true)
circle(half_th, $fn = 24);
joint_tops(half_w / 1.5 * 2 - joint_spacing);
} }
slot_df(); rotate([0, 90, 0])
} linear_extrude(width / 1.5 - joint_spacing, center = true)
circle(half_th, $fn = 24);
joint_tops(half_w / 1.5 * 2 - joint_spacing);
} }
module ground_df() { module border() {
translate([0, 0, -height - half_th]) translate([0, 0, half_th])
linear_extrude(thickness) color("black") linear_extrude(half_th / 2)
square(width, center = true); hollow_out(shell_thickness = font_size / 4)
offset(half_w / 10)
scale([0.75, 0.675])
polygon(points);
}
module stick() {
linear_extrude(thickness * 0.75)
square([width / 12, half_w], center = true);
} }
module carve_board() { module decorate_board() {
rotate([-80, 0, 0]) rotate([-80, 0, 0])
difference() { difference() {
rotate([80, 0, 0]) union() { rotate([80, 0, 0])
color("yellow") children(); difference() {
translate([0, -height / 1.8, 0]) border(); union() {
} color("yellow") children();
ground_df(); translate([0, -height / 1.8, 0])
border();
}
// slot
translate([0, -half_h - thickness, -half_th])
stick();
}
translate([0, 0, -height - half_th])
linear_extrude(thickness)
square(width, center = true);
} }
} }
// stick // stick
translate([width, 0, 0]) translate([width, 0, 0])
stick(); stick();
translate([0, 0, thickness / 2]) translate([0, 0, half_th])
carve_board() board1(); decorate_board() board1();
translate([0, 0, thickness / 2]) translate([0, 0, half_th])
rotate(180) rotate(180)
carve_board() board2(); decorate_board() board2();
children(); children();
rotate(180) rotate(180)