From 0d6c302f5e23490aec29d6e8cc2dffc0adce8602 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 25 Jul 2018 05:59:03 +0000 Subject: draft of the more materials mixer --- 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 @@ +layer_height=.2; extrusion_width=.5; +epsilon=.01; + +use ; +include ; + +module multimixer( + filament_d = 1.75, + liner_od = 4, liner_id = 2, + angle = 15, // to the vertical (output) axis + inputs = 4, + minshell = 2*extrusion_width, + shell = 5*extrusion_width, + pf = pushfit_embeddest, + debug = true +) { + fnd = 4*PI; fnr = 2*fnd; + + pushfit_d = pf_d(pf); + pushfit_h = pf_h(pf); + + angular_step = 360/inputs; + inputogon_angle = 180*(inputs-2)/inputs; + + sinsin = sin(angle)*sin(angular_step/2); + function l_to(d) = d*cos(asin(sinsin))/sinsin; + l_output = liner_od; + l_input = l_to(pushfit_d/2+minshell); + l_fork = l_to(liner_id/2); + l_narrow = l_to(liner_od/2+minshell); + + module forinputs() { + for(zr=[0:angular_step:359]) rotate([0,0,zr]) rotate([0,angle,0]) children(); + }//forinputs module + module foroutput() { + rotate([180,0,0]) children(); + } + + //translate([pf_d(pf)/2+shell,0,0]) + //translate([0,0,l_output+pushfit_h]) + difference() { + hull() { + forinputs() + translate([0,0,l_input+pushfit_h]) mirror([0,0,1]) + cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd); + foroutput() + translate([0,0,l_output+pushfit_h]) { + cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd); + } + } + forinputs() { + translate([0,0,l_input]) pushfit(pf); + translate([0,0,l_narrow]) { + cylinder(d=liner_od,h=l_input+1-l_narrow,$fn=liner_od*fnd); + mirror([0,0,1]) translate([0,0,-epsilon]) + cylinder(d1=(liner_id+liner_od)/2,d2=liner_id,h=liner_id,$fn=liner_od*fnd); + } + cylinder(d=liner_id,h=l_input+epsilon,$fn=liner_id*fnd); + } + foroutput() { + translate([0,0,l_output]) pushfit(pf); + cylinder(d=liner_od,h=l_input+1,$fn=liner_od*fnd); + } + hull() { + forinputs() + translate([0,0,l_fork]) cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd); + foroutput() + cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd); + } + if(debug) { + translate([0,0,-20/*TODO:*/]) + rotate_extrude(angle=angular_step) + square([50,100]/*TODO:*/); + } + } + +} + +multimixer(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 @@ +pushfit_embeddest = [ ["type", "embeddest"], + ["d", 8], // outer diameter of legspace + ["id", 6], // inner diameter, the narrow passage + ["h", 7], // total height + ["h_legspace", 3.2], // the height of legspace + ["ch", 1] // inlet chamfer +]; +pushfit_embedded = [ ["type", "embedded"], + ["d", 12], // outer diameter + ["h", 7 ], // total height + ["h_ring", 4.7], // height of embedded pushfit ring + ["d_insert", 8], // diameter of pushfit insert legs hole +]; +pushfit_threaded = [ ["type", "threaded"], + ["h", 10], // total height + ["d", 25.4*3/8 ], // the diameter to return + ["d_tolerance", 0.5], // the diameter tolerance + ["tpi", 28] // threads per inch +]; + + 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 @@ +draft = true; + +use ; + +function pf_(d,k) = d[search([k],d)[0]][1]; +function pf_d(pf) = pf_(pf,"d"); +function pf_h(pf) = pf_(pf,"h"); +module pushfit(pf,draft=draft) { + fnd = 2*PI; epsilon=.01; + type = pf_(pf,"type"); + h = pf_h(pf); + if(type=="threaded") { + minch = 25.4; + d = (pf_d(pf) + pf_(pf,"d_tolerance"))/minch; + tpi = pf_(pf,"tpi"); + if(draft) cylinder(d=d*minch,h=h+epsilon); + else english_thread(diameter=d,threads_per_inch=tpi,length=h/minch+epsilon,internal=true); + slitl = d*minch+layer_height; + slitw = 0.8*d*minch/2; + echo(slitw,slitl); + translate([-slitw/2,-slitl/2,0]) cube([slitw,slitl,h+epsilon]); + }else if(type=="embedded") { + d = pf_d(pf); + h_ring = pf_(pf,"h_ring"); + d_insert = pf_(pf,"d_insert"); + $fn = d*fnd; + translate([0,0,h-h_ring]) cylinder(d=d,h=h_ring+epsilon); + cylinder(d=d_insert,h=h); + }else if(type=="embeddest") { + d = pf_d(pf); + id = pf_(pf,"id"); + h_legspace = pf_(pf,"h_legspace"); + ch = pf_(pf,"ch"); + $fn = d*fnd; + cylinder(d=id,h=h+1); + cylinder(d=d,h=h_legspace); + dd = (d-id)/2; + translate([0,0,h_legspace-epsilon]) + cylinder(d1=d,d2=id-2*epsilon,h=dd+epsilon); + translate([0,0,h-ch-epsilon]) + cylinder(d1=id-2*epsilon,d2=id+2*ch+2,h=ch+epsilon+1); + } +}//pushfit module -- cgit v0.9.0.2