author | Michael Krelin <hacker@klever.net> | 2018-07-25 21:24:06 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2018-07-25 21:39:03 (UTC) |
commit | cd3c9592b1b26ed98eda97fbf5b098bdcf4c1abd (patch) (unidiff) | |
tree | 03feb0efc71bc9a063c481f65ab6a4cada31ed05 /multimixer.scad | |
parent | a24158645c0156f5b55c9adce15e16a8eb908ba1 (diff) | |
download | extrudery-cd3c9592b1b26ed98eda97fbf5b098bdcf4c1abd.zip extrudery-cd3c9592b1b26ed98eda97fbf5b098bdcf4c1abd.tar.gz extrudery-cd3c9592b1b26ed98eda97fbf5b098bdcf4c1abd.tar.bz2 |
more flexible debug cutout
-rw-r--r-- | multimixer.scad | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/multimixer.scad b/multimixer.scad index 0893457..21f71e4 100644 --- a/multimixer.scad +++ b/multimixer.scad | |||
@@ -1,39 +1,39 @@ | |||
1 | layer_height=.2; extrusion_width=.5; | 1 | layer_height=.2; extrusion_width=.5; |
2 | epsilon=.01; | 2 | epsilon=.01; |
3 | 3 | ||
4 | use <pushfittery.scad>; | 4 | use <pushfittery.scad>; |
5 | include <pushfit_data.scad>; | 5 | include <pushfit_data.scad>; |
6 | 6 | ||
7 | module multimixer( | 7 | module multimixer( |
8 | filament_d = 1.75, | 8 | filament_d = 1.75, |
9 | liner_od = 4, liner_id = 2, | 9 | liner_od = 4, liner_id = 2, |
10 | angle = 15, // to the vertical (output) axis | 10 | angle = 15, // to the vertical (output) axis |
11 | inputs = 4, | 11 | inputs = 4, |
12 | minshell = 2*extrusion_width, | 12 | minshell = 2*extrusion_width, |
13 | shell = 5*extrusion_width, | 13 | shell = 5*extrusion_width, |
14 | pf = pushfit_embeddest, | 14 | pf = pushfit_embeddest, |
15 | debug = true | 15 | debug = 0, // how many inputs -1 the debug cutout spans |
16 | ) { | 16 | ) { |
17 | fnd = 4*PI; fnr = 2*fnd; | 17 | fnd = 4*PI; fnr = 2*fnd; |
18 | 18 | ||
19 | pushfit_d = pf_d(pf); | 19 | pushfit_d = pf_d(pf); |
20 | pushfit_h = pf_h(pf); | 20 | pushfit_h = pf_h(pf); |
21 | 21 | ||
22 | angular_step = 360/inputs; | 22 | angular_step = 360/inputs; |
23 | inputogon_angle = 180*(inputs-2)/inputs; | 23 | inputogon_angle = 180*(inputs-2)/inputs; |
24 | 24 | ||
25 | sinsin = sin(angle)*sin(angular_step/2); | 25 | sinsin = sin(angle)*sin(angular_step/2); |
26 | function l_to(d) = d*cos(asin(sinsin))/sinsin; | 26 | function l_to(d) = d*cos(asin(sinsin))/sinsin; |
27 | l_output = liner_od; | 27 | l_output = liner_od; |
28 | l_input = l_to(pushfit_d/2+minshell); | 28 | l_input = l_to(pushfit_d/2+minshell); |
29 | l_fork = l_to(liner_id/2); | 29 | l_fork = l_to(liner_id/2); |
30 | l_narrow = l_to(liner_od/2+minshell); | 30 | l_narrow = l_to(liner_od/2+minshell); |
31 | 31 | ||
32 | module forinputs() { | 32 | module forinputs() { |
33 | for(zr=[0:angular_step:359]) rotate([0,0,zr]) rotate([0,angle,0]) children(); | 33 | for(zr=[0:angular_step:359]) rotate([0,0,zr]) rotate([0,angle,0]) children(); |
34 | }//forinputs module | 34 | }//forinputs module |
35 | module foroutput() { | 35 | module foroutput() { |
36 | rotate([180,0,0]) children(); | 36 | rotate([180,0,0]) children(); |
37 | } | 37 | } |
38 | 38 | ||
39 | //translate([pf_d(pf)/2+shell,0,0]) | 39 | //translate([pf_d(pf)/2+shell,0,0]) |
@@ -69,32 +69,32 @@ module multimixer( | |||
69 | cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd); | 69 | cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd); |
70 | } | 70 | } |
71 | } | 71 | } |
72 | forinputs() { | 72 | forinputs() { |
73 | translate([0,0,l_input]) pushfit(pf); | 73 | translate([0,0,l_input]) pushfit(pf); |
74 | translate([0,0,l_narrow]) { | 74 | translate([0,0,l_narrow]) { |
75 | cylinder(d=liner_od,h=l_input+1-l_narrow,$fn=liner_od*fnd); | 75 | cylinder(d=liner_od,h=l_input+1-l_narrow,$fn=liner_od*fnd); |
76 | mirror([0,0,1]) translate([0,0,-epsilon]) | 76 | mirror([0,0,1]) translate([0,0,-epsilon]) |
77 | cylinder(d1=(liner_id+liner_od)/2,d2=liner_id,h=liner_id,$fn=liner_od*fnd); | 77 | cylinder(d1=(liner_id+liner_od)/2,d2=liner_id,h=liner_id,$fn=liner_od*fnd); |
78 | } | 78 | } |
79 | cylinder(d=liner_id,h=l_input+epsilon,$fn=liner_id*fnd); | 79 | cylinder(d=liner_id,h=l_input+epsilon,$fn=liner_id*fnd); |
80 | } | 80 | } |
81 | foroutput() { | 81 | foroutput() { |
82 | translate([0,0,l_output]) pushfit(pf); | 82 | translate([0,0,l_output]) pushfit(pf); |
83 | cylinder(d=liner_od,h=l_input+1,$fn=liner_od*fnd); | 83 | cylinder(d=liner_od,h=l_input+1,$fn=liner_od*fnd); |
84 | } | 84 | } |
85 | hull() { | 85 | hull() { |
86 | forinputs() | 86 | forinputs() |
87 | translate([0,0,l_fork]) cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd); | 87 | translate([0,0,l_fork]) cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd); |
88 | foroutput() | 88 | foroutput() |
89 | cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd); | 89 | cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd); |
90 | } | 90 | } |
91 | if(debug) { | 91 | if(debug) { |
92 | translate([0,0,-20/*TODO:*/]) | 92 | translate([0,0,-20/*TODO:*/]) |
93 | rotate_extrude(angle=angular_step) | 93 | rotate_extrude(angle=angular_step*debug) |
94 | square([50,100]/*TODO:*/); | 94 | square([50,100]/*TODO:*/); |
95 | } | 95 | } |
96 | } | 96 | } |
97 | 97 | ||
98 | } | 98 | } |
99 | 99 | ||
100 | multimixer(debug=true); | 100 | multimixer(debug=2); |