|
|
|
@@ -1,88 +1,110 @@ |
1 | layer_height=0.2; extrusion_width=0.4; |
1 | layer_height=0.2; extrusion_width=0.45; |
2 | epsilon=0.01; |
2 | epsilon=0.01; |
3 | $fs=0.125; |
3 | $fs=0.125; |
4 | |
4 | |
5 | draft=true; |
5 | draft=true; |
6 | |
6 | |
7 | use <threads.scad>; |
7 | use <threads.scad>; |
8 | module pushfit_thread(h=10) { |
8 | module pushfit_thread(h=10) { |
9 | thr = 3/8 + .5/25.4; |
9 | thr = 3/8 + .5/25.4; |
10 | slit = 25.4*thr/2 + 0.2; |
10 | slit = 25.4*thr/2 + 0.2; |
11 | if(draft) cylinder(d=thr*25.4,h=h); |
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); |
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]); |
13 | translate([-2,-slit,0]) cube([4,2*slit,h]); |
14 | } |
14 | } |
15 | |
15 | |
16 | module the_mixer( |
16 | module the_mixer( |
17 | pushfit_d = 10, pushfit_h = 10, |
17 | pushfit_d = 10, pushfit_h = 10, |
| |
18 | pushfit_type = "threaded", // threaded|embedded |
| |
19 | pushfit_ring_h = 4.7, // height of embedded pushfit ring |
| |
20 | pushfit_insert_d = 8, // diameter of pushfit insert legs hole |
18 | liner_d = 4, liner_id = 2, |
21 | liner_d = 4, liner_id = 2, |
19 | filament_d = 1.75, |
22 | filament_d = 1.75, |
20 | join_angle = 30, |
23 | join_angle = 30, |
21 | |
24 | |
22 | interpushfit = 2*extrusion_width, // space between two pushfit's threads |
25 | interpushfit = 2*extrusion_width, // space between two pushfit holes |
23 | pushfit_s = 2, // shell around pushfit threads |
26 | pushfit_s = 2, // shell around pushfit holes |
24 | output_l = 4, // length of output after before pushfit |
27 | output_l = 4, // length of output after before pushfit |
25 | outer_r = 3, // outer radius |
28 | outer_r = 3, // outer radius |
26 | |
29 | |
27 | liner_d_tolerance = .2, |
30 | liner_d_tolerance = .2, |
28 | ) { |
31 | ) { |
29 | module liner(l,in) { |
32 | module liner(l,in) { |
30 | inh=ld-liner_id; |
33 | inh=ld-liner_id; |
31 | union() { |
34 | union() { |
32 | translate([0,0,inh]) |
35 | translate([0,0,inh]) |
33 | cylinder(d=ld,h=l-inh,$fn=ld*PI*2); |
36 | cylinder(d=ld,h=l-inh,$fn=ld*PI*2); |
34 | translate([0,0,-epsilon]) |
37 | translate([0,0,-epsilon]) |
35 | cylinder(d1=ld+epsilon,d2=liner_id-epsilon,h=inh+2*epsilon); |
38 | cylinder(d1=ld+epsilon,d2=liner_id-epsilon,h=inh+2*epsilon); |
36 | } |
39 | } |
37 | } |
40 | } |
| |
41 | module pushfit() { |
| |
42 | if(pushfit_type=="threaded") { |
| |
43 | pushfit_thread(h=pushfit_h); |
| |
44 | }else if(pushfit_type=="embedded") { |
| |
45 | translate([0,0,pushfit_h-pushfit_ring_h]) |
| |
46 | cylinder(d=pushfit_d,h=pushfit_ring_h,$fn=pushfit_d*PI*2); |
| |
47 | cylinder(d=pushfit_insert_d,h=pushfit_h,$fn=pushfit_insert_d*PI*2); |
| |
48 | } |
| |
49 | } |
38 | |
50 | |
39 | ld = liner_d+liner_d_tolerance; |
51 | ld = liner_d+liner_d_tolerance; |
40 | linero = ld/2/tan(join_angle/2); // liner offset |
52 | linero = ld/2/tan(join_angle/2); // liner offset |
41 | pfrx = interpushfit/2/cos(join_angle/2); // radial margin |
53 | pfrx = interpushfit/2/cos(join_angle/2); // radial margin |
42 | pfR = pushfit_d/2+pfrx; // radius of pushfit with margin |
54 | pfR = pushfit_d/2+pfrx; // radius of pushfit with margin |
43 | pfo = pfR/tan(join_angle/2); // pushfit thread ofset |
55 | pfoo = pushfit_type=="threaded" ? 0 : (pushfit_h-pushfit_ring_h); // offset of pushfit offset |
| |
56 | pfo = pfR/tan(join_angle/2)-pfoo; // pushfit thread ofset |
44 | |
57 | |
45 | h = pushfit_d+pushfit_s*2; |
58 | h = pushfit_d+pushfit_s*2; |
46 | difference() { |
59 | difference() { |
47 | hull() { |
60 | hull() { |
48 | for(s=[-1,1]) { |
61 | for(s=[-1,1]) { |
49 | rotate([0,0,s*join_angle/2]) |
62 | rotate([0,0,s*join_angle/2]) |
50 | for(ss=[-1,1]) |
63 | for(ss=[-1,1]) |
51 | translate([ss*pushfit_d/2,pfo+pushfit_h-outer_r-epsilon]) |
64 | 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); |
65 | 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]) |
66 | 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); |
67 | cylinder(r=outer_r,h=h,center=true,$fn=outer_r*PI*4); |
55 | } |
68 | } |
56 | } |
69 | } |
57 | for(s=[-1,1]) rotate([0,0,s*join_angle/2]) { |
70 | for(s=[-1,1]) rotate([0,0,s*join_angle/2]) { |
58 | translate([0,linero,0]) rotate([-90,0,0]) |
71 | translate([0,linero,0]) rotate([-90,0,0]) |
59 | liner(l=pfo-linero+1,in="bottom"); |
72 | liner(l=pfo-linero+1,in="bottom"); |
60 | //cylinder(d=ld,h=pfo-linero+1,$fn=ld*PI*4); |
73 | //cylinder(d=ld,h=pfo-linero+1,$fn=ld*PI*4); |
61 | translate([0,pfo,0]) rotate([-90,0,0]) |
74 | translate([0,pfo,0]) rotate([-90,0,0]) |
62 | pushfit_thread(h=pushfit_h); |
75 | pushfit(); |
63 | } |
76 | } |
64 | rotate([90,0,0]) { |
77 | rotate([90,0,0]) { |
65 | liner(l=output_l+1,in="top"); |
78 | liner(l=output_l+1,in="top"); |
66 | //cylinder(d=ld,h=output_l+1,$fn=ld*PI*4); |
79 | //cylinder(d=ld,h=output_l+1,$fn=ld*PI*4); |
67 | translate([0,0,output_l]) |
80 | translate([0,0,output_l]) |
68 | pushfit_thread(h=pushfit_h); |
81 | pushfit(); |
69 | } |
82 | } |
70 | hull() { |
83 | hull() { |
71 | for(s=[-1,1]) rotate([0,0,s*join_angle/2]) { |
84 | for(s=[-1,1]) rotate([0,0,s*join_angle/2]) { |
72 | rotate([-90,0,0]) |
85 | rotate([-90,0,0]) |
73 | translate([0,0,linero]) |
86 | translate([0,0,linero]) |
74 | cylinder(d=ld,h=epsilon,$fn=ld*PI*4); |
87 | cylinder(d=ld,h=epsilon,$fn=ld*PI*4); |
75 | } |
88 | } |
76 | rotate([90,0,0]) |
89 | rotate([90,0,0]) |
77 | cylinder(d=ld,h=epsilon,$fn=ld*PI*4); |
90 | cylinder(d=ld,h=epsilon,$fn=ld*PI*4); |
78 | } |
91 | } |
79 | } |
92 | } |
80 | } |
93 | } |
81 | |
94 | |
82 | if(false) { |
95 | module this() { |
| |
96 | the_mixer( |
| |
97 | pushfit_type="embedded", |
| |
98 | pushfit_d = 12, |
| |
99 | pushfit_h = 7, |
| |
100 | interpushfit = extrusion_width |
| |
101 | ); |
| |
102 | } |
| |
103 | |
| |
104 | if(!false) { |
83 | difference() { |
105 | difference() { |
84 | the_mixer(); |
106 | this(); |
85 | cylinder(d=100,h=100); |
107 | cylinder(d=100,h=100); |
86 | } |
108 | } |
87 | }else |
109 | }else |
88 | the_mixer(); |
110 | this(); |
|