summaryrefslogtreecommitdiff
path: root/mixer.scad
authorMichael Krelin <hacker@klever.net>2018-07-31 19:31:44 (UTC)
committer Michael Krelin <hacker@klever.net>2018-07-31 19:31:44 (UTC)
commit04f03386761d24bf28759d2dbefa7c9bd10a3726 (patch) (unidiff)
treeb0fcc721ee33730af7c0e5572df020442abad815 /mixer.scad
parentda262d91847673cd90269f164fc8ca5081333e3b (diff)
downloadextrudery-04f03386761d24bf28759d2dbefa7c9bd10a3726.zip
extrudery-04f03386761d24bf28759d2dbefa7c9bd10a3726.tar.gz
extrudery-04f03386761d24bf28759d2dbefa7c9bd10a3726.tar.bz2
mixer: committing narrow-channel version
but basically I abandon this design
Diffstat (limited to 'mixer.scad') (more/less context) (ignore whitespace changes)
-rw-r--r--mixer.scad77
1 files changed, 49 insertions, 28 deletions
diff --git a/mixer.scad b/mixer.scad
index 3740ae5..c298482 100644
--- a/mixer.scad
+++ b/mixer.scad
@@ -21,101 +21,122 @@ module the_mixer(
21 pushfit_insert_d = 8, // diameter of pushfit insert legs hole 21 pushfit_insert_d = 8, // diameter of pushfit insert legs hole
22 pushfit_legspace_h = 3.2, // the height of legspace for embeddest variant 22 pushfit_legspace_h = 3.2, // the height of legspace for embeddest variant
23 pushfit_inlet_ch = 1, // inlet chamfer 23 pushfit_inlet_ch = 1, // inlet chamfer
24 liner_d = 4, liner_id = 2, // ptfe liner inner and outer diameters 24 liner_d = 4, liner_id = 2, // ptfe liner inner and outer diameters
25 filament_d = 1.75, 25 filament_d = 1.75,
26 join_angle = 30, 26 join_angle = 30,
27 joint = "wide", // wide|narrow
27 28
28 interpushfit = 2*extrusion_width, // space between two pushfit holes 29 interpushfit = 2*extrusion_width, // space between two pushfit holes
29 pushfit_s = 2, // shell around pushfit holes 30 pushfit_s = 2, // shell around pushfit holes
30 output_l = 4, // length of output after before pushfit 31 output_l = 4, // length of output liner after before pushfit
31 outer_r = 3, // outer radius 32 outer_r = 3, // outer radius
32 33
33 liner_d_tolerance = .2, 34 liner_d_tolerance = .2,
35 filament_d_tolerance = .25
34) { 36) {
35 fnd = PI*2*2; fnr = fnd*2; 37 fnd = PI*2*2; fnr = fnd*2;
36 module liner(l,in) { 38
37 inh=ld-liner_id; 39 ld = liner_d+liner_d_tolerance;
38 union() { 40 fd = filament_d+filament_d_tolerance;
39 translate([0,0,inh]) 41 linero = ld/2/tan(join_angle/2); // liner offset
40 cylinder(d=ld,h=l-inh,$fn=ld*fnd); 42
41 translate([0,0,-epsilon]) 43 jd = (joint=="narrow") ? fd : ld; // joint diameter
42 cylinder(d1=ld+epsilon,d2=liner_id-epsilon,h=inh+2*epsilon,$fn=ld*fnd); 44 jo = (joint=="narrow") ? jd/2/tan(join_angle/2) : linero; // joint offset
45
46 pfrx = interpushfit/2/cos(join_angle/2); // radial margin
47 pfR = pushfit_d/2+pfrx; // radius of pushfit with margin
48 // offset of pushfit offset
49 pfoo = (pushfit_type=="threaded") ? 0 :
50 (pushfit_type=="embedded") ? (pushfit_h-pushfit_ring_h) :
51 (pushfit_type=="embeddest") ? 0 : undef;
52 pfo = pfR/tan(join_angle/2)-pfoo; // pushfit thread ofset
53
54 h = pushfit_d+pushfit_s*2;
55
56 module liner(l,in,offset=0,linero) {
57 lo = linero==undef ? l/2 : linero;
58 translate([0,0,offset])
59 if(joint=="narrow") {
60 $fn = max(fd,ld,jd)*fnd;
61 cylinder(d=fd,h=l);
62 //if(in=="top") cylinder(d1=jd,d2=fd,h=(jd-fd)/2);
63 translate([0,0,lo])
64 cylinder(d=ld,h=l-lo);
65 if(in=="bottom") translate([0,0,lo+epsilon]) mirror([0,0,1])
66 cylinder(d1=(liner_id+ld)/2,d2=fd,h=(liner_id+ld-fd)/2);
67 }else{
68 inh=ld-liner_id;
69 union() {
70 translate([0,0,inh])
71 cylinder(d=ld,h=l-inh,$fn=ld*fnd);
72 translate([0,0,-epsilon])
73 cylinder(d1=ld+epsilon,d2=liner_id-epsilon,h=inh+2*epsilon,$fn=ld*fnd);
74 }
43 } 75 }
44 } 76 }
45 module pushfit() { 77 module pushfit() {
46 if(pushfit_type=="threaded") { 78 if(pushfit_type=="threaded") {
47 pushfit_thread(h=pushfit_h); 79 pushfit_thread(h=pushfit_h);
48 }else if(pushfit_type=="embedded") { 80 }else if(pushfit_type=="embedded") {
49 translate([0,0,pushfit_h-pushfit_ring_h]) 81 translate([0,0,pushfit_h-pushfit_ring_h])
50 cylinder(d=pushfit_d,h=pushfit_ring_h,$fn=fnd); 82 cylinder(d=pushfit_d,h=pushfit_ring_h,$fn=fnd);
51 cylinder(d=pushfit_insert_d,h=pushfit_h,$fn=pushfit_insert_d*fnd); 83 cylinder(d=pushfit_insert_d,h=pushfit_h,$fn=pushfit_insert_d*fnd);
52 }else if(pushfit_type=="embeddest") { 84 }else if(pushfit_type=="embeddest") {
53 cylinder(d=pushfit_id,h=pushfit_h+1,$fn=pushfit_insert_d*fnd); 85 cylinder(d=pushfit_id,h=pushfit_h+1,$fn=pushfit_insert_d*fnd);
54 cylinder(d=pushfit_d,h=pushfit_legspace_h,$fn=pushfit_d*fnd); 86 cylinder(d=pushfit_d,h=pushfit_legspace_h,$fn=pushfit_d*fnd);
55 dd = pushfit_d-pushfit_id; 87 dd = (pushfit_d-pushfit_id)/2;
56 translate([0,0,pushfit_legspace_h-epsilon]) 88 translate([0,0,pushfit_legspace_h-epsilon])
57 cylinder(d1=pushfit_d,d2=pushfit_id-2*epsilon,h=dd+epsilon,$fn=pushfit_d*fnd); 89 cylinder(d1=pushfit_d,d2=pushfit_id-2*epsilon,h=dd+epsilon,$fn=pushfit_d*fnd);
58 translate([0,0,pushfit_h-pushfit_inlet_ch-epsilon]) 90 translate([0,0,pushfit_h-pushfit_inlet_ch-epsilon])
59 cylinder(d1=pushfit_id-2*epsilon,d2=pushfit_id+2*pushfit_inlet_ch+2,h=pushfit_inlet_ch+epsilon+1,$fn=(pushfit_id+2*pushfit_inlet_ch+2)*fnd); 91 cylinder(d1=pushfit_id-2*epsilon,d2=pushfit_id+2*pushfit_inlet_ch+2,h=pushfit_inlet_ch+epsilon+1,$fn=(pushfit_id+2*pushfit_inlet_ch+2)*fnd);
60 } 92 }
61 } 93 }
62 94
63 ld = liner_d+liner_d_tolerance;
64 linero = ld/2/tan(join_angle/2); // liner offset
65 pfrx = interpushfit/2/cos(join_angle/2); // radial margin
66 pfR = pushfit_d/2+pfrx; // radius of pushfit with margin
67 // offset of pushfit offset
68 pfoo = (pushfit_type=="threaded") ? 0 :
69 (pushfit_type=="embedded") ? (pushfit_h-pushfit_ring_h) :
70 (pushfit_type=="embeddest") ? 0 : undef;
71 pfo = pfR/tan(join_angle/2)-pfoo; // pushfit thread ofset
72
73 h = pushfit_d+pushfit_s*2;
74 difference() { 95 difference() {
75 hull() { 96 hull() {
76 for(s=[-1,1]) { 97 for(s=[-1,1]) {
77 rotate([0,0,s*join_angle/2]) 98 rotate([0,0,s*join_angle/2])
78 for(ss=[-1,1]) 99 for(ss=[-1,1])
79 translate([ss*pushfit_d/2,pfo+pushfit_h-outer_r-epsilon]) 100 translate([ss*pushfit_d/2,pfo+pushfit_h-outer_r-epsilon])
80 cylinder(r=outer_r,h=h,center=true,$fn=outer_r*fnr); 101 cylinder(r=outer_r,h=h,center=true,$fn=outer_r*fnr);
81 translate([s*pushfit_d/2,-output_l-pushfit_h+outer_r+epsilon,0]) 102 translate([s*pushfit_d/2,-output_l-pushfit_h+outer_r+epsilon,0])
82 cylinder(r=outer_r,h=h,center=true,$fn=outer_r*fnr); 103 cylinder(r=outer_r,h=h,center=true,$fn=outer_r*fnr);
83 } 104 }
84 } 105 }
85 for(s=[-1,1]) rotate([0,0,s*join_angle/2]) { 106 for(s=[-1,1]) rotate([0,0,s*join_angle/2]) {
86 translate([0,linero,0]) rotate([-90,0,0]) 107 rotate([-90,0,0])
87 liner(l=pfo-linero+epsilon,in="bottom"); 108 liner(l=pfo-jo+epsilon,in="bottom",offset=jo);
88 //cylinder(d=ld,h=pfo-linero+1,$fn=ld*fnd);
89 translate([0,pfo,0]) rotate([-90,0,0]) 109 translate([0,pfo,0]) rotate([-90,0,0])
90 pushfit(); 110 pushfit();
91 } 111 }
92 rotate([90,0,0]) { 112 rotate([90,0,0]) {
93 liner(l=output_l+epsilon,in="top"); 113 liner(l=output_l+epsilon,in="top",linero=0);
94 //cylinder(d=ld,h=output_l+1,$fn=ld*fnd); 114 //cylinder(d=ld,h=output_l+1,$fn=ld*fnd);
95 translate([0,0,output_l]) 115 translate([0,0,output_l])
96 pushfit(); 116 pushfit();
97 } 117 }
98 hull() { 118 hull() {
99 for(s=[-1,1]) rotate([0,0,s*join_angle/2]) { 119 for(s=[-1,1]) rotate([0,0,s*join_angle/2]) {
100 rotate([-90,0,0]) 120 rotate([-90,0,0])
101 translate([0,0,linero]) 121 translate([0,0,jo])
102 cylinder(d=ld,h=epsilon,$fn=ld*fnd); 122 cylinder(d=jd,h=epsilon,$fn=jd*fnd);
103 } 123 }
104 rotate([90,0,0]) 124 rotate([90,0,0])
105 cylinder(d=ld,h=epsilon,$fn=ld*fnd); 125 cylinder(d=jd,h=epsilon,$fn=jd*fnd);
106 } 126 }
107 } 127 }
108} 128}
109 129
110module this() { 130module this() {
111 the_mixer( 131 the_mixer(
112 pushfit_type="embeddest", 132 pushfit_type="embeddest",
113 pushfit_d = 8, 133 pushfit_d = 8,
114 pushfit_h = 7, 134 pushfit_h = 7,
115 interpushfit = extrusion_width 135 interpushfit = extrusion_width,
136 joint = "narrow"
116 ); 137 );
117} 138}
118 139
119if(!false) { 140if(!false) {
120 difference() { 141 difference() {
121 this(); 142 this();