author | Michael Krelin <hacker@klever.net> | 2018-07-31 19:27:53 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2018-07-31 19:27:53 (UTC) |
commit | bbac3cfec8ebd99cd19e7165855572a06ddfcf75 (patch) (unidiff) | |
tree | 135ff1f11235cd6ed08835be4907201bc103a62d | |
parent | d9b12712aad96c583cc10406f00b0383eb7b7ab2 (diff) | |
download | extrudery-bbac3cfec8ebd99cd19e7165855572a06ddfcf75.zip extrudery-bbac3cfec8ebd99cd19e7165855572a06ddfcf75.tar.gz extrudery-bbac3cfec8ebd99cd19e7165855572a06ddfcf75.tar.bz2 |
pushfittery: more epsilony epsilon
-rw-r--r-- | pushfittery.scad | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pushfittery.scad b/pushfittery.scad index ee3bbd0..6b6ec2e 100644 --- a/pushfittery.scad +++ b/pushfittery.scad | |||
@@ -1,7 +1,7 @@ | |||
1 | layer_height=.2; | 1 | layer_height=.2; epsilon=.01; |
2 | draft = true; | 2 | draft = true; |
3 | 3 | ||
4 | use <threads.scad>; | 4 | use <threads.scad>; |
5 | 5 | ||
6 | function pf_(d,k) = d[search([k],d)[0]][1]; | 6 | function pf_(d,k) = d[search([k],d)[0]][1]; |
7 | function pf_d(pf) = pf_(pf,"d"); | 7 | function pf_d(pf) = pf_(pf,"d"); |
@@ -12,13 +12,13 @@ module pushfit(pf,draft=draft) { | |||
12 | h = pf_h(pf); | 12 | h = pf_h(pf); |
13 | if(type=="threaded") { | 13 | if(type=="threaded") { |
14 | minch = 25.4; | 14 | minch = 25.4; |
15 | d = (pf_d(pf) + pf_(pf,"d_tolerance"))/minch; | 15 | d = (pf_d(pf) + pf_(pf,"d_tolerance"))/minch; |
16 | tpi = pf_(pf,"tpi"); | 16 | tpi = pf_(pf,"tpi"); |
17 | if(draft) cylinder(d=d*minch,h=h+epsilon); | 17 | if(draft) cylinder(d=d*minch,h=h+epsilon); |
18 | else english_thread(diameter=d,threads_per_inch=tpi,length=h/minch+epsilon,internal=true); | 18 | else english_thread(diameter=d,threads_per_inch=tpi,length=(h+epsilon)/minch,internal=true); |
19 | slitl = d*minch+layer_height; | 19 | slitl = d*minch+layer_height; |
20 | slitw = 0.8*d*minch/2; | 20 | slitw = 0.8*d*minch/2; |
21 | echo(slitw,slitl); | 21 | echo(slitw,slitl); |
22 | translate([-slitw/2,-slitl/2,0]) cube([slitw,slitl,h+epsilon]); | 22 | translate([-slitw/2,-slitl/2,0]) cube([slitw,slitl,h+epsilon]); |
23 | }else if(type=="embedded") { | 23 | }else if(type=="embedded") { |
24 | d = pf_d(pf); | 24 | d = pf_d(pf); |