summaryrefslogtreecommitdiff
authorMichael Krelin <hacker@klever.net>2018-07-25 05:59:03 (UTC)
committer Michael Krelin <hacker@klever.net>2018-07-25 05:59:03 (UTC)
commit0d6c302f5e23490aec29d6e8cc2dffc0adce8602 (patch) (unidiff)
tree3337b5a77e38f0e49cb30d1fa1f9357d1699ad97
parent3f077364320ef368c4fd64d476c6e9fd9394c07a (diff)
downloadextrudery-0d6c302f5e23490aec29d6e8cc2dffc0adce8602.zip
extrudery-0d6c302f5e23490aec29d6e8cc2dffc0adce8602.tar.gz
extrudery-0d6c302f5e23490aec29d6e8cc2dffc0adce8602.tar.bz2
draft of the more materials mixer
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--multimixer.scad79
-rw-r--r--pushfit_data.scad21
-rw-r--r--pushfittery.scad43
3 files changed, 143 insertions, 0 deletions
diff --git a/multimixer.scad b/multimixer.scad
new file mode 100644
index 0000000..88fd6bf
--- a/dev/null
+++ b/multimixer.scad
@@ -0,0 +1,79 @@
1layer_height=.2; extrusion_width=.5;
2epsilon=.01;
3
4use <pushfittery.scad>;
5include <pushfit_data.scad>;
6
7module multimixer(
8 filament_d = 1.75,
9 liner_od = 4, liner_id = 2,
10 angle = 15, // to the vertical (output) axis
11 inputs = 4,
12 minshell = 2*extrusion_width,
13 shell = 5*extrusion_width,
14 pf = pushfit_embeddest,
15 debug = true
16) {
17 fnd = 4*PI; fnr = 2*fnd;
18
19 pushfit_d = pf_d(pf);
20 pushfit_h = pf_h(pf);
21
22 angular_step = 360/inputs;
23 inputogon_angle = 180*(inputs-2)/inputs;
24
25 sinsin = sin(angle)*sin(angular_step/2);
26 function l_to(d) = d*cos(asin(sinsin))/sinsin;
27 l_output = liner_od;
28 l_input = l_to(pushfit_d/2+minshell);
29 l_fork = l_to(liner_id/2);
30 l_narrow = l_to(liner_od/2+minshell);
31
32 module forinputs() {
33 for(zr=[0:angular_step:359]) rotate([0,0,zr]) rotate([0,angle,0]) children();
34 }//forinputs module
35 module foroutput() {
36 rotate([180,0,0]) children();
37 }
38
39 //translate([pf_d(pf)/2+shell,0,0])
40 //translate([0,0,l_output+pushfit_h])
41 difference() {
42 hull() {
43 forinputs()
44 translate([0,0,l_input+pushfit_h]) mirror([0,0,1])
45 cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd);
46 foroutput()
47 translate([0,0,l_output+pushfit_h]) {
48 cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd);
49 }
50 }
51 forinputs() {
52 translate([0,0,l_input]) pushfit(pf);
53 translate([0,0,l_narrow]) {
54 cylinder(d=liner_od,h=l_input+1-l_narrow,$fn=liner_od*fnd);
55 mirror([0,0,1]) translate([0,0,-epsilon])
56 cylinder(d1=(liner_id+liner_od)/2,d2=liner_id,h=liner_id,$fn=liner_od*fnd);
57 }
58 cylinder(d=liner_id,h=l_input+epsilon,$fn=liner_id*fnd);
59 }
60 foroutput() {
61 translate([0,0,l_output]) pushfit(pf);
62 cylinder(d=liner_od,h=l_input+1,$fn=liner_od*fnd);
63 }
64 hull() {
65 forinputs()
66 translate([0,0,l_fork]) cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd);
67 foroutput()
68 cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd);
69 }
70 if(debug) {
71 translate([0,0,-20/*TODO:*/])
72 rotate_extrude(angle=angular_step)
73 square([50,100]/*TODO:*/);
74 }
75 }
76
77}
78
79multimixer(debug=true);
diff --git a/pushfit_data.scad b/pushfit_data.scad
new file mode 100644
index 0000000..c0ce3d0
--- a/dev/null
+++ b/pushfit_data.scad
@@ -0,0 +1,21 @@
1pushfit_embeddest = [ ["type", "embeddest"],
2 ["d", 8], // outer diameter of legspace
3 ["id", 6], // inner diameter, the narrow passage
4 ["h", 7], // total height
5 ["h_legspace", 3.2], // the height of legspace
6 ["ch", 1] // inlet chamfer
7];
8pushfit_embedded = [ ["type", "embedded"],
9 ["d", 12], // outer diameter
10 ["h", 7 ], // total height
11 ["h_ring", 4.7], // height of embedded pushfit ring
12 ["d_insert", 8], // diameter of pushfit insert legs hole
13];
14pushfit_threaded = [ ["type", "threaded"],
15 ["h", 10], // total height
16 ["d", 25.4*3/8 ], // the diameter to return
17 ["d_tolerance", 0.5], // the diameter tolerance
18 ["tpi", 28] // threads per inch
19];
20
21
diff --git a/pushfittery.scad b/pushfittery.scad
new file mode 100644
index 0000000..adebec2
--- a/dev/null
+++ b/pushfittery.scad
@@ -0,0 +1,43 @@
1draft = true;
2
3use <threads.scad>;
4
5function pf_(d,k) = d[search([k],d)[0]][1];
6function pf_d(pf) = pf_(pf,"d");
7function pf_h(pf) = pf_(pf,"h");
8module pushfit(pf,draft=draft) {
9 fnd = 2*PI; epsilon=.01;
10 type = pf_(pf,"type");
11 h = pf_h(pf);
12 if(type=="threaded") {
13 minch = 25.4;
14 d = (pf_d(pf) + pf_(pf,"d_tolerance"))/minch;
15 tpi = pf_(pf,"tpi");
16 if(draft) cylinder(d=d*minch,h=h+epsilon);
17 else english_thread(diameter=d,threads_per_inch=tpi,length=h/minch+epsilon,internal=true);
18 slitl = d*minch+layer_height;
19 slitw = 0.8*d*minch/2;
20 echo(slitw,slitl);
21 translate([-slitw/2,-slitl/2,0]) cube([slitw,slitl,h+epsilon]);
22 }else if(type=="embedded") {
23 d = pf_d(pf);
24 h_ring = pf_(pf,"h_ring");
25 d_insert = pf_(pf,"d_insert");
26 $fn = d*fnd;
27 translate([0,0,h-h_ring]) cylinder(d=d,h=h_ring+epsilon);
28 cylinder(d=d_insert,h=h);
29 }else if(type=="embeddest") {
30 d = pf_d(pf);
31 id = pf_(pf,"id");
32 h_legspace = pf_(pf,"h_legspace");
33 ch = pf_(pf,"ch");
34 $fn = d*fnd;
35 cylinder(d=id,h=h+1);
36 cylinder(d=d,h=h_legspace);
37 dd = (d-id)/2;
38 translate([0,0,h_legspace-epsilon])
39 cylinder(d1=d,d2=id-2*epsilon,h=dd+epsilon);
40 translate([0,0,h-ch-epsilon])
41 cylinder(d1=id-2*epsilon,d2=id+2*ch+2,h=ch+epsilon+1);
42 }
43}//pushfit module