2024-07-06 12:21:25 +00:00
|
|
|
// Parameters
|
|
|
|
$diameter_hole =3.2;
|
|
|
|
$indent_width = 1;
|
|
|
|
$diameter_z = 6;
|
|
|
|
$length_base= 7;
|
|
|
|
$length_hat= 2;
|
2024-07-11 08:29:03 +00:00
|
|
|
$delta_hole = 4;
|
|
|
|
$diameter_shaft = 2.5;
|
2024-07-06 12:21:25 +00:00
|
|
|
$length_blocker = 5;
|
2024-07-11 08:29:03 +00:00
|
|
|
$height_blocker = $length_blocker + ($length_base - ($delta_hole + ($diameter_hole/2))) + ($diameter_hole-$diameter_shaft);
|
2024-07-06 12:21:25 +00:00
|
|
|
$diameter_blocker = 10;
|
|
|
|
$radial_indent = 1;
|
|
|
|
$slack = 0.1;
|
|
|
|
$mini_slack = 0.001;
|
|
|
|
|
2024-07-06 12:32:21 +00:00
|
|
|
// rendering precision
|
|
|
|
$fn = $preview ? 32 : 64;
|
|
|
|
|
2024-07-06 12:21:25 +00:00
|
|
|
// base
|
|
|
|
difference() {
|
|
|
|
cylinder($length_base, $diameter_z / 2, $diameter_z / 2);
|
2024-07-11 08:29:03 +00:00
|
|
|
translate([0, 0 , $delta_hole]) rotate([90, 0, 0])
|
2024-07-06 12:21:25 +00:00
|
|
|
cylinder(6,$diameter_hole/2, $diameter_hole/2, center=true);
|
|
|
|
}
|
|
|
|
|
|
|
|
// first half-top
|
|
|
|
translate([0, 0, $length_base - $mini_slack])
|
|
|
|
difference() {
|
|
|
|
cylinder($length_blocker, $diameter_z / 2, $diameter_z / 2);
|
|
|
|
translate([-$indent_width / 2,-5, -$mini_slack])
|
|
|
|
cube(10);
|
|
|
|
}
|
|
|
|
|
|
|
|
// second half-top
|
|
|
|
translate([0,0,$length_base - $mini_slack])
|
|
|
|
rotate([0,0,180])
|
|
|
|
difference() {
|
|
|
|
cylinder($length_blocker, $diameter_z / 2, $diameter_z / 2);
|
|
|
|
translate([-$indent_width / 2,-5, -$mini_slack])
|
|
|
|
cube(10);
|
|
|
|
}
|
|
|
|
|
|
|
|
// first half-hat
|
|
|
|
translate([0,0,$length_base + $length_blocker - $mini_slack])
|
|
|
|
rotate([0,0,180])
|
|
|
|
difference() {
|
|
|
|
cylinder(2, $radial_indent + $diameter_z / 2,$diameter_z / 2);
|
|
|
|
translate([-$indent_width / 2,-5, -$mini_slack])
|
|
|
|
cube(10);
|
|
|
|
}
|
|
|
|
|
|
|
|
// second half-hat
|
|
|
|
translate([0,0,$length_base + $length_blocker - $mini_slack])
|
|
|
|
difference() {
|
|
|
|
cylinder($length_hat, $diameter_z / 2 + $radial_indent, $diameter_z / 2);
|
|
|
|
translate([-$indent_width / 2, -5, -$mini_slack])
|
|
|
|
cube(10);
|
|
|
|
}
|
|
|
|
|
|
|
|
// blocking piece
|
|
|
|
translate([20,0,0])
|
|
|
|
difference() {
|
2024-07-11 08:29:03 +00:00
|
|
|
cylinder($height_blocker, $diameter_blocker / 2, $diameter_blocker / 2);
|
2024-07-06 12:21:25 +00:00
|
|
|
translate([0, 0, -$mini_slack])
|
2024-07-11 08:29:03 +00:00
|
|
|
cylinder($height_blocker + $slack, $diameter_z / 2 + $slack, $diameter_z / 2 + $slack);
|
2024-07-06 12:21:25 +00:00
|
|
|
}
|