3d_print/Forester/key_dl/keyfob_mod.scad

52 lines
No EOL
1.2 KiB
OpenSCAD

include <BOSL2/std.scad>
include <BOSL2/screws.scad>
module hex() {
nut_trap_inline(2.5,"M3");
cyl(h=20, d=3, anchor=BOT);
}
module flare() {
cyl(h=20, d=3, anchor=BOT);
up(0.5) cyl(h=1.5, d1=6, anchor=BOT);
cyl(h=0.5, d=6, anchor=BOT);
}
$fn = 180;
hole1 = [17.6,6.3,0];
hole2 = [5,43,0];
hole3 = [25.6,43,0];
hole4 = [30,40,0]; // new hole
// over
difference() {
union() {
right(0.1) import("./key2_over.stl");
translate(hole1) cyl(h=5.5, d=6, anchor=BOT);
translate(hole2) cyl(h=2.5, d=6, anchor=BOT);
translate(hole3) cyl(h=3.5, d=6, anchor=BOT);
}
translate(hole1) flare();
translate(hole2) flare();
translate(hole4) flare();
}
// =====================
// under
hole1r = [-hole1[0], hole1[1], hole1[2]];
hole2r = [-hole2[0], hole2[1], hole2[2]];
hole3r = [-hole3[0], hole3[1], hole3[2]];
hole4r = [-hole4[0], hole4[1], hole4[2]];
difference() {
union() {
left(35.1) import("./key2_under.stl");
translate(hole1r) cyl(h=4, d=8, anchor=BOT);
translate(hole2r) cyl(h=4, d=8, anchor=BOT);
translate(hole3r) cyl(h=4, d=8, anchor=BOT);
}
translate(hole1r) hex();
translate(hole2r) hex();
translate(hole4r) hex();
}