summaryrefslogtreecommitdiff
path: root/mixer.scad
Unidiff
Diffstat (limited to 'mixer.scad') (more/less context) (ignore whitespace changes)
-rw-r--r--mixer.scad88
1 files changed, 88 insertions, 0 deletions
diff --git a/mixer.scad b/mixer.scad
new file mode 100644
index 0000000..3200023
--- a/dev/null
+++ b/mixer.scad
@@ -0,0 +1,88 @@
1layer_height=0.2; extrusion_width=0.4;
2epsilon=0.01;
3$fs=0.125;
4
5draft=true;
6
7use <threads.scad>;
8module pushfit_thread(h=10) {
9 thr = 3/8 + .5/25.4;
10 slit = 25.4*thr/2 + 0.2;
11 if(draft) cylinder(d=thr*25.4,h=h);
12 else english_thread(diameter=thr,threads_per_inch=28,length=h/25.4,internal=true);
13 translate([-2,-slit,0]) cube([4,2*slit,h]);
14}
15
16module the_mixer(
17 pushfit_d = 10, pushfit_h = 10,
18 liner_d = 4, liner_id = 2,
19 filament_d = 1.75,
20 join_angle = 30,
21
22 interpushfit = 2*extrusion_width, // space between two pushfit's threads
23 pushfit_s = 2, // shell around pushfit threads
24 output_l = 4, // length of output after before pushfit
25 outer_r = 3, // outer radius
26
27 liner_d_tolerance = .2,
28) {
29 module liner(l,in) {
30 inh=ld-liner_id;
31 union() {
32 translate([0,0,inh])
33 cylinder(d=ld,h=l-inh,$fn=ld*PI*2);
34 translate([0,0,-epsilon])
35 cylinder(d1=ld+epsilon,d2=liner_id-epsilon,h=inh+2*epsilon);
36 }
37 }
38
39 ld = liner_d+liner_d_tolerance;
40 linero = ld/2/tan(join_angle/2); // liner offset
41 pfrx = interpushfit/2/cos(join_angle/2); // radial margin
42 pfR = pushfit_d/2+pfrx; // radius of pushfit with margin
43 pfo = pfR/tan(join_angle/2); // pushfit thread ofset
44
45 h = pushfit_d+pushfit_s*2;
46 difference() {
47 hull() {
48 for(s=[-1,1]) {
49 rotate([0,0,s*join_angle/2])
50 for(ss=[-1,1])
51 translate([ss*pushfit_d/2,pfo+pushfit_h-outer_r-epsilon])
52 cylinder(r=outer_r,h=h,center=true,$fn=outer_r*PI*4);
53 translate([s*pushfit_d/2,-output_l-pushfit_h+outer_r+epsilon,0])
54 cylinder(r=outer_r,h=h,center=true,$fn=outer_r*PI*4);
55 }
56 }
57 for(s=[-1,1]) rotate([0,0,s*join_angle/2]) {
58 translate([0,linero,0]) rotate([-90,0,0])
59 liner(l=pfo-linero+1,in="bottom");
60 //cylinder(d=ld,h=pfo-linero+1,$fn=ld*PI*4);
61 translate([0,pfo,0]) rotate([-90,0,0])
62 pushfit_thread(h=pushfit_h);
63 }
64 rotate([90,0,0]) {
65 liner(l=output_l+1,in="top");
66 //cylinder(d=ld,h=output_l+1,$fn=ld*PI*4);
67 translate([0,0,output_l])
68 pushfit_thread(h=pushfit_h);
69 }
70 hull() {
71 for(s=[-1,1]) rotate([0,0,s*join_angle/2]) {
72 rotate([-90,0,0])
73 translate([0,0,linero])
74 cylinder(d=ld,h=epsilon,$fn=ld*PI*4);
75 }
76 rotate([90,0,0])
77 cylinder(d=ld,h=epsilon,$fn=ld*PI*4);
78 }
79 }
80}
81
82if(false) {
83 difference() {
84 the_mixer();
85 cylinder(d=100,h=100);
86 }
87}else
88 the_mixer();