author | Michael Krelin <hacker@klever.net> | 2018-07-27 16:36:45 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2018-07-27 16:36:45 (UTC) |
commit | 86fca7bf690279eadea33252e75227cd494cc34c (patch) (unidiff) | |
tree | fad0e1af295d6c994210dac6567da648bd0f25bd | |
parent | 0f0a1eea0e62532ecf537f3b1c51749728763aa5 (diff) | |
download | extrudery-86fca7bf690279eadea33252e75227cd494cc34c.zip extrudery-86fca7bf690279eadea33252e75227cd494cc34c.tar.gz extrudery-86fca7bf690279eadea33252e75227cd494cc34c.tar.bz2 |
add some layer_height value to pushfittery
-rw-r--r-- | pushfittery.scad | 1 |
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 @@ | |||
1 | layer_height=.2; | ||
1 | draft = true; | 2 | draft = true; |
2 | 3 | ||
3 | use <threads.scad>; | 4 | use <threads.scad>; |
4 | 5 | ||
5 | function pf_(d,k) = d[search([k],d)[0]][1]; | 6 | function pf_(d,k) = d[search([k],d)[0]][1]; |
6 | function pf_d(pf) = pf_(pf,"d"); | 7 | function pf_d(pf) = pf_(pf,"d"); |
7 | function pf_h(pf) = pf_(pf,"h"); | 8 | function pf_h(pf) = pf_(pf,"h"); |
8 | module pushfit(pf,draft=draft) { | 9 | module pushfit(pf,draft=draft) { |
9 | fnd = 2*PI; epsilon=.01; | 10 | fnd = 2*PI; epsilon=.01; |
10 | type = pf_(pf,"type"); | 11 | type = pf_(pf,"type"); |
11 | h = pf_h(pf); | 12 | h = pf_h(pf); |
12 | if(type=="threaded") { | 13 | if(type=="threaded") { |
13 | minch = 25.4; | 14 | minch = 25.4; |
14 | d = (pf_d(pf) + pf_(pf,"d_tolerance"))/minch; | 15 | d = (pf_d(pf) + pf_(pf,"d_tolerance"))/minch; |
15 | tpi = pf_(pf,"tpi"); | 16 | tpi = pf_(pf,"tpi"); |
16 | if(draft) cylinder(d=d*minch,h=h+epsilon); | 17 | if(draft) cylinder(d=d*minch,h=h+epsilon); |
17 | 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/minch+epsilon,internal=true); |
18 | slitl = d*minch+layer_height; | 19 | slitl = d*minch+layer_height; |
19 | slitw = 0.8*d*minch/2; | 20 | slitw = 0.8*d*minch/2; |
20 | echo(slitw,slitl); | 21 | echo(slitw,slitl); |
21 | translate([-slitw/2,-slitl/2,0]) cube([slitw,slitl,h+epsilon]); | 22 | translate([-slitw/2,-slitl/2,0]) cube([slitw,slitl,h+epsilon]); |
22 | }else if(type=="embedded") { | 23 | }else if(type=="embedded") { |
23 | d = pf_d(pf); | 24 | d = pf_d(pf); |
24 | h_ring = pf_(pf,"h_ring"); | 25 | h_ring = pf_(pf,"h_ring"); |