Compare commits

..

1 Commits
trunk ... screw

Author SHA1 Message Date
Remi Rampin 5520709de7 Screw hole 2024-04-22 17:55:20 -04:00
1 changed files with 24 additions and 26 deletions

View File

@ -8,14 +8,17 @@ top_height = 20;
opening_sep = 0.1; opening_sep = 0.1;
screw_hole_diam = 2;
screw_hole_depth = 12;
screw_diam = 3;
screw_spacer_diam = 10;
border = 1; border = 1;
funnel_size = 1; funnel_size = 1;
part = 0; part = 0;
part_sep = 0.4;
module _end_of_customizer() {} module _end_of_customizer() {}
assert(part >= 0 && part <= 2); assert(part >= 0 && part <= 2);
@ -41,15 +44,17 @@ overall_cylinder();
module bottom() { module bottom() {
difference() { difference() {
union() { union()
for(i = [0:5]) { for(i = [0:5]) {
rotate([0, 0, i / 6 * 360]) rotate([0, 0, i / 6 * 360])
bottom_part(); bottom_part();
}
} }
translate([0, 0, bottom_height]) translate([0, 0, -1])
connection(true); cylinder(d = screw_diam + 1, h = bottom_height + 2);
translate([0, 0, -1])
cylinder(d = screw_spacer_diam, h = 2 + 1);
} }
} }
@ -89,12 +94,16 @@ color("#dd08")
bottom(); bottom();
module top() { module top() {
for(i = [0:5]) { difference() {
rotate([0, 0, i / 6 * 360]) union()
top_part(); for(i = [0:5]) {
} rotate([0, 0, i / 6 * 360])
top_part();
}
connection(false); translate([0, 0, -1])
cylinder(d = screw_hole_diam, h = screw_hole_depth + 1);
}
} }
module top_part() { module top_part() {
@ -129,20 +138,9 @@ module top_part_hollow() {
if(part == 0 || part == 2) if(part == 0 || part == 2)
color("#4d48") color("#4d48")
translate([0, 0, bottom_height + part_sep]) translate([0, 0, bottom_height])
top(); top();
module connection(hole) {
sep_hole = hole?part_sep:0;
sep_screw = hole?0:part_sep;
translate([0, 0, -1.5 - sep_screw * 2])
cylinder(d = 4 + sep_hole, h = 1.5 + sep_screw * 2);
translate([0, 0, -3 - sep_screw * 2])
cylinder(d1 = 8 + sep_hole, d2 = 4 + sep_hole, h = 1.5);
}
if($preview && part == 1) if($preview && part == 1)
color("#f008") color("#f008")
for(i = [0:5]) { for(i = [0:5]) {