|
|
|
h=7;
|
|
|
|
r0=3;
|
|
|
|
$fn=50;
|
|
|
|
l=60;
|
|
|
|
w=30;
|
|
|
|
magnet_play=0.5;
|
|
|
|
magnet_l=19.5+magnet_play;
|
|
|
|
magnet_w=5.8+magnet_play/5.0;
|
|
|
|
magnet_h=2.7+magnet_play;
|
|
|
|
magnet_hole_h=0.92*h;
|
|
|
|
screw_play=0.2;
|
|
|
|
// Let's give one millimeter more
|
|
|
|
screw_head_r=6.8/2 + 5*screw_play;
|
|
|
|
screw_thread_r=3.5/2 + screw_play;
|
|
|
|
screw_head_h=2.5 + screw_play;
|
|
|
|
color("white", 1.0) {
|
|
|
|
difference()
|
|
|
|
{
|
|
|
|
translate([r0, r0, 0])
|
|
|
|
hull() {
|
|
|
|
for (x=[0:1:1]) {
|
|
|
|
for (y=[0:1:1]) {
|
|
|
|
translate([(l-2*r0)*x, (w-2*r0)*y, 0])
|
|
|
|
cylinder(h, r=r0, center=true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
union() {
|
|
|
|
translate([0.1*l, w/2, 0])
|
|
|
|
cylinder(h+0.001, r=screw_thread_r, center=true);
|
|
|
|
// For screw head
|
|
|
|
translate([0.1*l, w/2, h/2-screw_head_h/2+0.001])
|
|
|
|
cylinder(screw_head_h, r1=screw_thread_r, r2=screw_head_r, center=true);
|
|
|
|
translate([0.9*l, w/2, 0])
|
|
|
|
cylinder(h+0.001, r=screw_thread_r, center=true);
|
|
|
|
// For screw head
|
|
|
|
translate([0.9*l, w/2, h/2-screw_head_h/2+0.001])
|
|
|
|
cylinder(screw_head_h, r1=screw_thread_r, r2=screw_head_r, center=true);
|
|
|
|
}
|
|
|
|
translate([l/2, 0, 0])
|
|
|
|
union() {
|
|
|
|
for (x=[-2:1:2]) {
|
|
|
|
translate([x*1.0*magnet_w-x*0.001, w/2, -h/2+magnet_hole_h/2-0.001])
|
|
|
|
rotate([0, 0, 90])
|
|
|
|
cube([magnet_l, magnet_w, magnet_hole_h], center=true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|