User:Peter242/Russell 644113a

From Dallas Makerspace
Jump to: navigation, search
// Overall height = 39.20
// Overall diameter = 19.81

$fn = 100; err = 0.1;

b1=0;    h1 = 13.58; // lower body
b2=b1+h1;h2 = 15.73 - h1; // thickness of chamfer
b3=b2+h2;h3 = 7.60; // height of hex body part
b4=b3+h3;h4 = 3.42; // thickness of chamfer and lower thread area
b5=b4+h4;h5 = 7.42; // threads
b6=b5+h5;h6 = 2.38; // thickness of chamfer, lower nozzle
b7=b6+h6;h7 = 2.85; // nozzle edge

w1 = 19.82;
w2a = 19.82; // chamfer
w2b = 17.52;
w3 = 17.52; // hex head = 15.87, $fn = 6
//w4a = 14.87; // chamfer
w4a = 13.26; // chamfer
w4b = 11.26;
w4c = 12.26;
w5 = 14.10; // thread
w6 = 12.07;
w7a = 12.07;
w7b = 7.50;


c1=0;    i1 = 9.97; x1 = 14.7;
//c2=c1+i1;i2 = 13.67 - i1; x2 = 7.48;
c2=c1+i1;i2 = 3.70; x2 = 7.48;
c3=c2+i2;i3 = i2; x3 = 7.0; // O-ring
c4=c3+i3;i4 = i2; x4 = 7.48; // gap
c5=c4+i4;i5 = i2; x5 = 7.0; // O-ring
c6=c5+i5;i6 = 21.27; x6 = 7.48; // remaining internal

difference() {
 union() {
 translate([0,0,b1]) cylinder( h = h1, r = (w1/2) );
// translate([0,0,b2]) cylinder( h = h2, r1 = (w2a/2), r2 = (w2b/2) );
 union() {
  translate([0,0,b2]) cylinder( h = h2, r = (w2b/2) - (h2/2) );
  translate([0,0,b3]) cylinder_chamfer( r1 = (w2b/2), r2 = (h2/2) ); }
 translate([0,0,b3]) cylinder( h = h3, r = (w3/2), $fn=6 );
// translate([0,0,b4]) cylinder( h = h4, r1 = (w4a/2), r2 = (w4b/2) );
 union() {
  translate([0,0,b4]) cylinder( h = (w4a-w4b)/2, r=w4a/2-(w4a-w4b)/4 );
  translate([0,0,b4+(w4a-w4b)/2]) cylinder_chamfer( r1 = (w4a/2), r2 = (w4a-w4b)/4 ); }
 translate([0,0,b4+(w4a-w4b)/2]) cylinder( h = h4, r = (w4c/2) );
 translate([0,0,b5]) cylinder( h = h5, r = (w5/2) );
 translate([0,0,b6]) cylinder( h = h6, r = (w6/2) );
 translate([0,0,b7]) cylinder( h = h7, r1 = (w7a/2), r2 = (w7b/2) ); }
 
 union() {
 translate([0,0,c1]) cylinder( h = i1, r = (x1/2) );
 translate([0,0,c2-err]) cylinder( h = i2+err*2, r = (x2/2) ); 
 translate([0,0,c3]) cylinder( h = i3, r = (x3/2) ); 
 translate([0,0,c4]) cylinder( h = i4, r = (x4/2) );
 translate([0,0,c5]) cylinder( h = i5, r = (x5/2) ); 
 translate([0,0,c6]) cylinder( h = i6, r = (x6/2) );
                     cylinder( h = c6, r = (x5/2) ); }
}

// Modified cylinder_chamfer, source https://github.com/elmom/MCAD/blob/master/metric_fastners.scad
module cylinder_chamfer(r1,r2)
{
        t=r1-r2;
        p=r2*2;
        rotate_extrude()
        difference()
        {
                translate([t,-p])square([p,p]);
                translate([t+p,0])circle(p);
        }
}