summaryrefslogtreecommitdiff
path: root/pushfittery.scad
Side-by-side diff
Diffstat (limited to 'pushfittery.scad') (more/less context) (ignore whitespace changes)
-rw-r--r--pushfittery.scad1
1 files changed, 1 insertions, 0 deletions
diff --git a/pushfittery.scad b/pushfittery.scad
index adebec2..ee3bbd0 100644
--- a/pushfittery.scad
+++ b/pushfittery.scad
@@ -1,24 +1,25 @@
+layer_height=.2;
draft = true;
use <threads.scad>;
function pf_(d,k) = d[search([k],d)[0]][1];
function pf_d(pf) = pf_(pf,"d");
function pf_h(pf) = pf_(pf,"h");
module pushfit(pf,draft=draft) {
fnd = 2*PI; epsilon=.01;
type = pf_(pf,"type");
h = pf_h(pf);
if(type=="threaded") {
minch = 25.4;
d = (pf_d(pf) + pf_(pf,"d_tolerance"))/minch;
tpi = pf_(pf,"tpi");
if(draft) cylinder(d=d*minch,h=h+epsilon);
else english_thread(diameter=d,threads_per_inch=tpi,length=h/minch+epsilon,internal=true);
slitl = d*minch+layer_height;
slitw = 0.8*d*minch/2;
echo(slitw,slitl);
translate([-slitw/2,-slitl/2,0]) cube([slitw,slitl,h+epsilon]);
}else if(type=="embedded") {
d = pf_d(pf);
h_ring = pf_(pf,"h_ring");