Initial import of inserts.scad
Also gave it a simple README.txt
This commit is contained in:
88
inserts.scad
Normal file
88
inserts.scad
Normal file
@@ -0,0 +1,88 @@
|
||||
|
||||
|
||||
function is_die() = (!is_undef($die) && $die);
|
||||
function in_color() = (!is_undef($co) && $co);
|
||||
|
||||
module thread_insertM3(bl=4, bz=-4, invertRim=false) {
|
||||
fd=5.5;
|
||||
fh=.45;
|
||||
rd=5.75;
|
||||
rh=.8;
|
||||
td= is_die() ? 4.8 : 5.15;
|
||||
th=(fh+2*(rh+.5));
|
||||
ic = in_color() ? "gold" : undef;
|
||||
|
||||
// Bolt
|
||||
bd = is_die() ? 3.5 : 2.9;
|
||||
bhd = is_die() ? 6.5 : 5.7;
|
||||
bhh = is_die() ? 3.5 : 3;
|
||||
bc = in_color() ? "silver" : undef;
|
||||
|
||||
color(bc) {
|
||||
translate([0,0,bl+bz]) cylinder(d=bhd, h=bhh); // bolt head
|
||||
translate([0,0,bz-.01]) cylinder(d=bd, h=bl+.02); // bolt
|
||||
}
|
||||
|
||||
color(ic) difference() {
|
||||
union() {
|
||||
if (! is_die() ) {
|
||||
// Grip Rings
|
||||
translate([0,0,invertRim ? -(rh+th+.05) : -fh])
|
||||
cylinder(d=fd,h=fh+.01);
|
||||
translate([0,0,-(fh+rh+.5)]) cylinder(d=rd,h=rh);
|
||||
translate([0,0, invertRim ? -(th) : -th]) cylinder(d=rd,h=rh);
|
||||
} else {
|
||||
// top bezel for die
|
||||
translate([0,0,invertRim ? -(rh+th+.05) : -fh])
|
||||
cylinder(d=5.6, h=fh);
|
||||
}
|
||||
|
||||
translate([0,0,-(3.9)]) cylinder(d=td,h=3.91);
|
||||
}
|
||||
if (! is_die()) // xxx: threaded hole stand in
|
||||
translate([0,0,-3.95]) cylinder(d=2.9,h=4);
|
||||
}
|
||||
}
|
||||
|
||||
module thread_insertM25(bl=4, bz=-4, invertRim=false) {
|
||||
fd=4.44;
|
||||
fh=.45;
|
||||
rd=4.4;
|
||||
rh=.8;
|
||||
td= is_die() ? 3.8 : 4.1;
|
||||
th=(fh+2*(rh+.5));
|
||||
ic = in_color() ? "gold" : undef;
|
||||
|
||||
// Bolt
|
||||
bd = is_die() ? 2.75 : 2.5;
|
||||
bhd = 1.5 * bd;
|
||||
bhh = is_die() ? 3 : 2.5;
|
||||
bc = in_color() ? "silver" : undef;
|
||||
|
||||
color(bc) {
|
||||
translate([0,0,bl+bz]) cylinder(d=bhd, h=bhh); // bolt head
|
||||
translate([0,0,bz-.01]) cylinder(d=bd, h=bl+.02); // bolt
|
||||
}
|
||||
|
||||
color(ic) difference() {
|
||||
union() {
|
||||
if (! is_die() ) {
|
||||
// Grip Rings
|
||||
translate([0,0,invertRim ? -(rh+th+.05) : -fh])
|
||||
cylinder(d=fd,h=fh+.01);
|
||||
translate([0,0,-(fh+rh+.5)]) cylinder(d=rd,h=rh);
|
||||
translate([0,0, invertRim ? -(th) : -th]) cylinder(d=rd,h=rh);
|
||||
} else {
|
||||
// top bezel for die
|
||||
translate([0,0,invertRim ? -(rh+th+.05) : -fh])
|
||||
cylinder(d=fd+.1, h=fh);
|
||||
}
|
||||
|
||||
translate([0,0,-5.56]) cylinder(d=td,h=5.56);
|
||||
}
|
||||
if (! is_die()) // xxx: threaded hole stand in
|
||||
translate([0,0,-3.95]) cylinder(d=bd+.1,h=4);
|
||||
}
|
||||
}
|
||||
|
||||
thread_insertM25(bl=10, $die=true, $co=false, $fs=1);
|
||||
Reference in New Issue
Block a user