60 lines
1.6 KiB
OpenSCAD
60 lines
1.6 KiB
OpenSCAD
|
// Parameters
|
||
|
$diameter_hole =3.2;
|
||
|
$indent_width = 1;
|
||
|
$diameter_z = 6;
|
||
|
$length_base= 7;
|
||
|
$length_hat= 2;
|
||
|
$length_blocker = 5;
|
||
|
$diameter_blocker = 10;
|
||
|
$radial_indent = 1;
|
||
|
$slack = 0.1;
|
||
|
$mini_slack = 0.001;
|
||
|
|
||
|
// base
|
||
|
difference() {
|
||
|
cylinder($length_base, $diameter_z / 2, $diameter_z / 2);
|
||
|
translate([0, 0 , 4]) rotate([90, 0, 0])
|
||
|
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() {
|
||
|
cylinder($length_blocker, $diameter_blocker / 2, $diameter_blocker / 2);
|
||
|
translate([0, 0, -$mini_slack])
|
||
|
cylinder($length_blocker + $slack, $diameter_z / 2 + $slack, $diameter_z / 2 + $slack);
|
||
|
}
|