-rw-r--r-- | multimixer.scad | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/multimixer.scad b/multimixer.scad index 80f41f1..c7b3489 100644 --- a/multimixer.scad +++ b/multimixer.scad | |||
@@ -11,27 +11,30 @@ module multimixer( | |||
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 = 0, // how many inputs -1 the debug cutout spans | 15 | debug = 0, // how many inputs -1 the debug cutout spans |
16 | print = false, | 16 | print = false, |
17 | |||
18 | liner_d_tolerance=.2 | ||
17 | ) { | 19 | ) { |
18 | fnd = 4*PI; fnr = 2*fnd; | 20 | fnd = 4*PI; fnr = 2*fnd; |
19 | 21 | ||
20 | pushfit_d = pf_d(pf); | 22 | pushfit_d = pf_d(pf); |
21 | pushfit_h = pf_h(pf); | 23 | pushfit_h = pf_h(pf); |
22 | 24 | ||
23 | angular_step = 360/inputs; | 25 | angular_step = 360/inputs; |
24 | inputogon_angle = 180*(inputs-2)/inputs; | 26 | inputogon_angle = 180*(inputs-2)/inputs; |
27 | lod = liner_od+liner_d_tolerance; // effective liner diameter | ||
25 | 28 | ||
26 | sinsin = sin(angle)*sin(angular_step/2); | 29 | sinsin = sin(angle)*sin(angular_step/2); |
27 | function l_to(d) = d*cos(asin(sinsin))/sinsin; | 30 | function l_to(d) = d*cos(asin(sinsin))/sinsin; |
28 | l_output = liner_od; | 31 | l_output = lod; |
29 | l_input = l_to(pushfit_d/2+minshell); | 32 | l_input = l_to(pushfit_d/2+minshell); |
30 | l_fork = l_to(liner_id/2); | 33 | l_fork = l_to(liner_id/2); |
31 | l_narrow = l_to(liner_od/2+minshell); | 34 | l_narrow = l_to(lod/2+minshell); |
32 | 35 | ||
33 | module forinputs() { | 36 | module forinputs() { |
34 | for(zr=[0:angular_step:359]) rotate([0,0,zr]) rotate([0,angle,0]) children(); | 37 | for(zr=[0:angular_step:359]) rotate([0,0,zr]) rotate([0,angle,0]) children(); |
35 | }//forinputs module | 38 | }//forinputs module |
36 | module foroutput() { | 39 | module foroutput() { |
37 | rotate([180,0,0]) children(); | 40 | rotate([180,0,0]) children(); |
@@ -73,21 +76,21 @@ module multimixer( | |||
73 | cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd); | 76 | cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd); |
74 | } | 77 | } |
75 | } | 78 | } |
76 | forinputs() { | 79 | forinputs() { |
77 | translate([0,0,l_input]) pushfit(pf); | 80 | translate([0,0,l_input]) pushfit(pf); |
78 | translate([0,0,l_narrow]) { | 81 | translate([0,0,l_narrow]) { |
79 | cylinder(d=liner_od,h=l_input+1-l_narrow,$fn=liner_od*fnd); | 82 | cylinder(d=lod,h=l_input+1-l_narrow,$fn=lod*fnd); |
80 | mirror([0,0,1]) translate([0,0,-epsilon]) | 83 | mirror([0,0,1]) translate([0,0,-epsilon]) |
81 | cylinder(d1=(liner_id+liner_od)/2,d2=liner_id,h=liner_id,$fn=liner_od*fnd); | 84 | cylinder(d1=(liner_id+lod)/2,d2=liner_id,h=liner_id,$fn=lod*fnd); |
82 | } | 85 | } |
83 | cylinder(d=liner_id,h=l_input+epsilon,$fn=liner_id*fnd); | 86 | cylinder(d=liner_id,h=l_input+epsilon,$fn=liner_id*fnd); |
84 | } | 87 | } |
85 | foroutput() { | 88 | foroutput() { |
86 | translate([0,0,l_output]) pushfit(pf); | 89 | translate([0,0,l_output]) pushfit(pf); |
87 | cylinder(d=liner_od,h=l_input+1,$fn=liner_od*fnd); | 90 | cylinder(d=lod,h=l_output+1,$fn=lod*fnd); |
88 | } | 91 | } |
89 | hull() { | 92 | hull() { |
90 | forinputs() | 93 | forinputs() |
91 | translate([0,0,l_fork]) cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd); | 94 | translate([0,0,l_fork]) cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd); |
92 | foroutput() | 95 | foroutput() |
93 | cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd); | 96 | cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd); |