/* manifold.scad * by Michael Shearn * * Description: * Makes a manifold I use for distributing nitrogen gas. Default parameters generate * sections that fit on a Makerbot Thing-o-matic. * * Usage: * Modify parameters at top of to adjust number of holes, sizes, length of sections, etc. * Generate models using functions at bottom of file: * manifold() - To make single section manifold * view() - To view empty area inside the block * left_manifold() - To make three section manifold (1 left, N center, 1 right) * center_manifold() - To make three section manifold (1 left, N center, 1 right) * right_manifold() - To make three section manifold (1 left, N center, 1 right) * * Parent modules used: * Uses module from "Symmetric Keyed Connectors / Spans / Tiles" * by relet * http://www.thingiverse.com/thing:6214 */ //Manifold Parameters manifold_width = 25; manifold_length =93; manifold_height =20; //Distributor parameters //Cavity is the distribution channel in center cavity_radius = manifold_height/3; cavity_offset = 4; cavity_length = manifold_length-cavity_offset; //Holes are the outlets from distribution channel hole_radius = 2; hole_relative_spacing = 2; //distance between edges relative to radius hole_repeat = 15; //Inlet is where the air comes in //For 1/4" O.D. tubing, I.D. is 0.17" = 4.318 mm //Taper from I.D/2 to I.D.*1.25, originally //Taper from I.D*0.8 to I.D.*1.2, originally tubing_inner_radius = 4.318/2; inlet_radius = 6.35/2; //inlet_radius = tubing_inner_radius*0.8; inlet_offset = 3; //distance to edge of wall //Nozzle parameters nozzle_radius = inlet_radius*1.5; nozzle_radius2 = inlet_radius*1.5; nozzle_length = 18; //Key Parameters for joining segments key_width=manifold_width/2; key_length=10; key_height=4; key_slope=0.2; //from http://www.thingiverse.com/thing:6214 //Start Derivative module trapezoidkey(base, top, height, thickness) { linear_extrude(height=thickness, center=true, convexity=10, twist=0) polygon( points=[ [-base/2, -height/2], [base/2,-height/2], [top/2, height/2], [-top/2, height/2] ], paths=[[0,1,2,3]], convexity=10); } //end Derivative module left_key() { // translate([key_length/2, 0, manifold_height-key_height/2]) translate([key_length/2, manifold_width/2-key_height/2, manifold_height/2]) rotate(a=90,v=[1,0,0]) rotate(a=270,v=[0,0,1]) trapezoidkey(key_width*(1-key_slope), key_width*(1+key_slope), key_length, key_height); } module right_key() { // translate([manifold_length+key_length/2, 0, manifold_height-key_height/2]) translate([manifold_length+key_length/2, manifold_width/2-key_height/2, manifold_height/2]) rotate(a=90,v=[1,0,0]) rotate(a=270,v=[0,0,1]) trapezoidkey(key_width*(1-key_slope), key_width*(1+key_slope), key_length, key_height); } module block() { translate([0, -manifold_width/2, 0]) cube([manifold_length, manifold_width, manifold_height]); } module outlet() { for(n=[1:hole_repeat]) { translate([n*(1+hole_relative_spacing)*hole_radius,0,0]) cylinder(r=hole_radius, h = manifold_height/2, center=true); } } module cavity_right(){ translate([cavity_length/2,0,manifold_height/2]) rotate(a=90,v=[0,1,0]) cylinder(r=cavity_radius, h = cavity_length, center=true); } module cavity_left(){ translate([cavity_offset+cavity_length/2,0,manifold_height/2]) rotate(a=90,v=[0,1,0]) cylinder(r=cavity_radius, h = cavity_length, center=true); } module cavity(){ translate([manifold_length/2,0,manifold_height/2]) rotate(a=90,v=[0,1,0]) cylinder(r=cavity_radius, h = manifold_length, center=true); } module inlet(){ translate([(inlet_radius+inlet_offset),-manifold_width/4,manifold_height/2]) rotate(a=90,v=[1,0,0]) //straight cylinder //cylinder(r=inlet_radius, h = manifold_width/2, center=true); //tapered cylinder cylinder(r2=inlet_radius, r1=inlet_radius*0.09, h = manifold_width/2, center=true); } module nozzle() { translate([(inlet_radius+inlet_offset),-(nozzle_length),manifold_height/2]) rotate(a=270,v=[1,0,0]) difference() { cylinder(r1=nozzle_radius, r2=nozzle_radius2, h = nozzle_length, center=true); cylinder(r=inlet_radius, h = nozzle_length, center=true); } } module manifold() { union(){ nozzle(); difference() { block(); union() { inlet(); outlet(); intersection() { cavity_left(); cavity_right(); } } } } } module left_manifold() { union(){ nozzle(); right_key(); difference() { block(); inlet(); outlet(); cavity_left(); } } } module center_manifold() { union(){ right_key(); difference() { difference() { difference() { block(); outlet(); } cavity(); } left_key(); } } } module right_manifold() { union(){ difference() { block(); union() { outlet(); cavity_right(); left_key(); } } } } module view() { inlet(); outlet(); cavity(); nozzle(); } //Main code //To make single section Manifold: manifold(); //To view empty area of single section: //view(); //To make three section manifold (1 left, N center, 1 right): //left_manifold(); //center_manifold(); //right_manifold();