summaryrefslogtreecommitdiff
authorMichael Krelin <hacker@klever.net>2017-12-05 21:41:01 (UTC)
committer Michael Krelin <hacker@klever.net>2017-12-05 21:41:01 (UTC)
commit98f9a2d2169059542f92d6546f9979664b805788 (patch) (unidiff)
treeadb9aa215dd6806deca1c7fdb534fd7b6173c104
parent5539359e3a7a4437e043854865fc254209d1cb86 (diff)
downloadextrudery-98f9a2d2169059542f92d6546f9979664b805788.zip
extrudery-98f9a2d2169059542f92d6546f9979664b805788.tar.gz
extrudery-98f9a2d2169059542f92d6546f9979664b805788.tar.bz2
the embeddest material switch
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--mixer-embeddest.scad10
-rw-r--r--mixer.scad47
2 files changed, 41 insertions, 16 deletions
diff --git a/mixer-embeddest.scad b/mixer-embeddest.scad
new file mode 100644
index 0000000..576be47
--- a/dev/null
+++ b/mixer-embeddest.scad
@@ -0,0 +1,10 @@
1extrusion_width=.5;
2
3use <mixer.scad>;
4
5the_mixer(
6 pushfit_type="embeddest",
7 pushfit_d = 8,
8 pushfit_h = 7,
9 interpushfit = extrusion_width
10);
diff --git a/mixer.scad b/mixer.scad
index 7b2e5d4..a3510a2 100644
--- a/mixer.scad
+++ b/mixer.scad
@@ -12,93 +12,108 @@ module pushfit_thread(h=10) {
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
16module the_mixer( 16module the_mixer(
17 pushfit_d = 10, pushfit_h = 10, 17 pushfit_d = 10, pushfit_h = 10,
18 pushfit_type = "threaded", // threaded|embedded 18 pushfit_id = 6.5,
19 pushfit_type = "threaded", // threaded|embedded|embeddest
19 pushfit_ring_h = 4.7, // height of embedded pushfit ring 20 pushfit_ring_h = 4.7, // height of embedded pushfit ring
20 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
23 pushfit_inlet_ch = 1,
21 liner_d = 4, liner_id = 2, 24 liner_d = 4, liner_id = 2,
22 filament_d = 1.75, 25 filament_d = 1.75,
23 join_angle = 30, 26 join_angle = 30,
24 27
25 interpushfit = 2*extrusion_width, // space between two pushfit holes 28 interpushfit = 2*extrusion_width, // space between two pushfit holes
26 pushfit_s = 2, // shell around pushfit holes 29 pushfit_s = 2, // shell around pushfit holes
27 output_l = 4, // length of output after before pushfit 30 output_l = 4, // length of output after before pushfit
28 outer_r = 3, // outer radius 31 outer_r = 3, // outer radius
29 32
30 liner_d_tolerance = .2, 33 liner_d_tolerance = .2,
31) { 34) {
35 fnd = PI*2*2; fnr = fnd*2;
32 module liner(l,in) { 36 module liner(l,in) {
33 inh=ld-liner_id; 37 inh=ld-liner_id;
34 union() { 38 union() {
35 translate([0,0,inh]) 39 translate([0,0,inh])
36 cylinder(d=ld,h=l-inh,$fn=ld*PI*2); 40 cylinder(d=ld,h=l-inh,$fn=ld*fnd);
37 translate([0,0,-epsilon]) 41 translate([0,0,-epsilon])
38 cylinder(d1=ld+epsilon,d2=liner_id-epsilon,h=inh+2*epsilon); 42 cylinder(d1=ld+epsilon,d2=liner_id-epsilon,h=inh+2*epsilon,$fn=ld*fnd);
39 } 43 }
40 } 44 }
41 module pushfit() { 45 module pushfit() {
42 if(pushfit_type=="threaded") { 46 if(pushfit_type=="threaded") {
43 pushfit_thread(h=pushfit_h); 47 pushfit_thread(h=pushfit_h);
44 }else if(pushfit_type=="embedded") { 48 }else if(pushfit_type=="embedded") {
45 translate([0,0,pushfit_h-pushfit_ring_h]) 49 translate([0,0,pushfit_h-pushfit_ring_h])
46 cylinder(d=pushfit_d,h=pushfit_ring_h,$fn=pushfit_d*PI*2); 50 cylinder(d=pushfit_d,h=pushfit_ring_h,$fn=fnd);
47 cylinder(d=pushfit_insert_d,h=pushfit_h,$fn=pushfit_insert_d*PI*2); 51 cylinder(d=pushfit_insert_d,h=pushfit_h,$fn=pushfit_insert_d*fnd);
52 }else if(pushfit_type=="embeddest") {
53 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);
55 dd = pushfit_d-pushfit_id;
56 translate([0,0,pushfit_legspace_h-epsilon])
57 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])
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);
48 } 60 }
49 } 61 }
50 62
51 ld = liner_d+liner_d_tolerance; 63 ld = liner_d+liner_d_tolerance;
52 linero = ld/2/tan(join_angle/2); // liner offset 64 linero = ld/2/tan(join_angle/2); // liner offset
53 pfrx = interpushfit/2/cos(join_angle/2); // radial margin 65 pfrx = interpushfit/2/cos(join_angle/2); // radial margin
54 pfR = pushfit_d/2+pfrx; // radius of pushfit with margin 66 pfR = pushfit_d/2+pfrx; // radius of pushfit with margin
55 pfoo = pushfit_type=="threaded" ? 0 : (pushfit_h-pushfit_ring_h); // offset of pushfit offset 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;
56 pfo = pfR/tan(join_angle/2)-pfoo; // pushfit thread ofset 71 pfo = pfR/tan(join_angle/2)-pfoo; // pushfit thread ofset
57 72
58 h = pushfit_d+pushfit_s*2; 73 h = pushfit_d+pushfit_s*2;
59 difference() { 74 difference() {
60 hull() { 75 hull() {
61 for(s=[-1,1]) { 76 for(s=[-1,1]) {
62 rotate([0,0,s*join_angle/2]) 77 rotate([0,0,s*join_angle/2])
63 for(ss=[-1,1]) 78 for(ss=[-1,1])
64 translate([ss*pushfit_d/2,pfo+pushfit_h-outer_r-epsilon]) 79 translate([ss*pushfit_d/2,pfo+pushfit_h-outer_r-epsilon])
65 cylinder(r=outer_r,h=h,center=true,$fn=outer_r*PI*4); 80 cylinder(r=outer_r,h=h,center=true,$fn=outer_r*fnr);
66 translate([s*pushfit_d/2,-output_l-pushfit_h+outer_r+epsilon,0]) 81 translate([s*pushfit_d/2,-output_l-pushfit_h+outer_r+epsilon,0])
67 cylinder(r=outer_r,h=h,center=true,$fn=outer_r*PI*4); 82 cylinder(r=outer_r,h=h,center=true,$fn=outer_r*fnr);
68 } 83 }
69 } 84 }
70 for(s=[-1,1]) rotate([0,0,s*join_angle/2]) { 85 for(s=[-1,1]) rotate([0,0,s*join_angle/2]) {
71 translate([0,linero,0]) rotate([-90,0,0]) 86 translate([0,linero,0]) rotate([-90,0,0])
72 liner(l=pfo-linero+1,in="bottom"); 87 liner(l=pfo-linero+epsilon,in="bottom");
73 //cylinder(d=ld,h=pfo-linero+1,$fn=ld*PI*4); 88 //cylinder(d=ld,h=pfo-linero+1,$fn=ld*fnd);
74 translate([0,pfo,0]) rotate([-90,0,0]) 89 translate([0,pfo,0]) rotate([-90,0,0])
75 pushfit(); 90 pushfit();
76 } 91 }
77 rotate([90,0,0]) { 92 rotate([90,0,0]) {
78 liner(l=output_l+1,in="top"); 93 liner(l=output_l+epsilon,in="top");
79 //cylinder(d=ld,h=output_l+1,$fn=ld*PI*4); 94 //cylinder(d=ld,h=output_l+1,$fn=ld*fnd);
80 translate([0,0,output_l]) 95 translate([0,0,output_l])
81 pushfit(); 96 pushfit();
82 } 97 }
83 hull() { 98 hull() {
84 for(s=[-1,1]) rotate([0,0,s*join_angle/2]) { 99 for(s=[-1,1]) rotate([0,0,s*join_angle/2]) {
85 rotate([-90,0,0]) 100 rotate([-90,0,0])
86 translate([0,0,linero]) 101 translate([0,0,linero])
87 cylinder(d=ld,h=epsilon,$fn=ld*PI*4); 102 cylinder(d=ld,h=epsilon,$fn=ld*fnd);
88 } 103 }
89 rotate([90,0,0]) 104 rotate([90,0,0])
90 cylinder(d=ld,h=epsilon,$fn=ld*PI*4); 105 cylinder(d=ld,h=epsilon,$fn=ld*fnd);
91 } 106 }
92 } 107 }
93} 108}
94 109
95module this() { 110module this() {
96 the_mixer( 111 the_mixer(
97 pushfit_type="embedded", 112 pushfit_type="embeddest",
98 pushfit_d = 12, 113 pushfit_d = 8,
99 pushfit_h = 7, 114 pushfit_h = 7,
100 interpushfit = extrusion_width 115 interpushfit = extrusion_width
101 ); 116 );
102} 117}
103 118
104if(!false) { 119if(!false) {