include <../lib/pressfit.scad> // All values in mm. // Enclosure outside. // Using orientation of it hanging from antenna and // original enclosure top toward us, and y-axis // pointing away from us. // f = dx // g = dy // h = dz // $fn = 50; $fn = 40; //////////////////////////////////////////// // enclosure dimensions. //////////////////////////////////////////// // foxo1 enc_mx1 = 62.5; enc_my1 = 31.0; enc_mz1 = 37.0; // overlap enc_mz2 = 30.0; // skirt below enclosure //////////////////////////////////////////// // foxo2 /******************************* enc_mx1 = 26.0; enc_my1 = 29.0; enc_mz1 = 34.0; // overlap enc_mz2 = 30.0; // skirt below enclosure *******************************/ //////////////////////////////////////////// space1 = 0.5; // space between enclosure and skirt. // On each side. extra = 10; //////////////////////^^^^^^^^^^^^^^^^^^^^^^ // Needed for pressfit spines. ////////////////////// // xw xy are the size of the inside area. // h is then length of the spine. ////////////////////// // xw: enc_mx1 + 2 * space1 // xy: enc_my1 + 2 * space1 // h: enc_mz1 * 0.7 // intrusion: space1 // exglue: 0.1 // /////////////////// // After creation, position... // dz: enc_mz2 + enc_mz1 * 0.3 - mx201 ////////////////////// // Notes. // enc_mx1 and enc_my1 are the enclosure dims. // enc_mz1 is the overlap length of the skirt // with the enclosure. // enc_mz2 is the skirt length below the enclosure. // space1 is the open space between the enclosure // and the skirt (except for the spines). // mx201 was used as the radius of the cutout // sphere to hold sealant at the top of the skirt. //////////////////////^^^^^^^^^^^^^^^^^^^^^^ //////////////////////////////////////////// skirt def dims - // S0a mx101 = enc_mx1 + space1*2; // inside space where enclosure goes. mx2 = 2; // flange extension (enclosure rests on this length) mx3 = 2; // wall thickness my101 = enc_my1 + space1*2; // inside space where enclosure goes. mz102 = enc_mz1; // length of overlap with enclosure mz2 = 3; // square length of flange mz101 = enc_mz2; // skirt length ang1 = 30; // degrees mx201 = 1.5; mz201 = 1.5; //////////////////////////////////////////// skirt def dims - // S0b my2 = mx2; // flange extension (enclosure rests on this length) my3 = mx3; // wall thickness my201 = mx201; // S1a mx103 = mx101 + 2* mx3; // outside of box mx1 = mx101/2 - mx2; // center to flange inner edge my103 = my101 + 2* my3; // outside of box my1 = my101/2 - my2; mz1 = mz101 - mz2; mz7 = mz101 + mz102; ang2 = 90 - ang1; mx202 = mx3 - mx201; my202 = my3 - my201; mx203 = mx101 + 2 * mx201; my203 = my101 + 2 * my201; // S1b mx4 = mx1 + mx2; my4 = my1 + my2; // S2 mz3 = my2 * tan( ang2 ); mz4 = my4 * tan( ang2 ); // S3 mx5 = mz4 / tan(ang2); mz5 = mz1 - mz3; // S4 mx6 = mx4 - mx5; mz6 = mz4 + mz5; //////////////////////////////////////////// SSS- // inside5 -- the bottom inside with angled walls at top. Mzb = 10; // inside5Points = [ [ -mx4, -my4, -Mzb ], // 0 [ mx4, -my4, -Mzb ], // 1 [ mx4, my4, -Mzb ], // 2 [ -mx4, my4, -Mzb ], // 3 [ -mx4, -my4, mz5 ], // 4 [ mx4, -my4, mz5 ], // 5 [ mx4, my4, mz5 ], // 6 [ -mx4, my4, mz5 ], // 7 [ -mx6, 0, mz6 ], // 8 [ mx6, 0, mz6 ]]; // 9 inside5Faces = [ [0,3,2,1], [0,1,5,4], [2,3,7,6], [0,4,7,3], [1,2,6,5], [4,8,7], [5,6,9], [4,5,9,8], [6,7,8,9]]; module inside5() { color( [1.0,0.7,0.0] ) polyhedron( inside5Points, inside5Faces ); } //////////////////////////////////////////// SSS- // This block would pass through the center // just touching the flange. module inside1() { translate( [-mx1,-my1,-extra] ) { color( [0.7, 0.7, 1.0] ) cube( [2*mx1, 2*my1, mz7+2*extra] ); } } // bottom inside if the flange didn't // have a slope to it. module inside2() { translate( [-mx101/2,-my101/2,-extra] ) { cube( [mx101, my101, mz1+extra] ); } } // top module inside3() { translate( [-mx101/2,-my101/2,mz101] ) { cube( [mx101, my101, mz102+extra] ); } } // extra space at very top for bead of sealant. module inside4() { translate( [-mx203/2,-my203/2,mz7-mz201] ) { cube( [mx203, my203, mz201+extra] ); } } // same as 4a but using culinders to make inside rounded. module inside4b() { union() { translate( [mx101/2, my101/2, mz7] ) { sphere( r=mx201, center=true ); } translate( [mx101/2, -my101/2, mz7] ) { sphere( r=mx201, center=true ); } translate( [-mx101/2, my101/2, mz7] ) { sphere( r=mx201, center=true ); } translate( [-mx101/2, -my101/2, mz7] ) { sphere( r=mx201, center=true ); } translate( [0, my101/2, mz7] ) { rotate( 90, [0,1,0] ) { cylinder( h=mx101, r=my201, center=true ); } } translate( [0, -my101/2, mz7] ) { rotate( 90, [0,1,0] ) { cylinder( h=mx101, r=my201, center=true ); } } translate( [mx101/2, 0, mz7] ) { rotate( 90, [1,0,0] ) { cylinder( h=my101, r=mx201, center=true ); } } translate( [-mx101/2, 0, mz7] ) { rotate( 90, [1,0,0] ) { cylinder( h=my101, r=mx201, center=true ); } } }//union } module outside1() { translate( [-mx103/2, -my103/2, 0] ) { color( [0.0,0.7,0.5] ) cube( [mx103, my103, mz7] ); } }// module case_bot /////////////////////////////////////////////////////// module skirt1() { difference() { outside1(); inside1(); // very center inside3(); // top inside inside4b(); // very-top inside for bead of sealant. inside5(); // bottom inside } /// translate( [0,0,20] ) /// { /// inside4b(); // very-top inside for bead of sealant. /// } // inside5(); }// module case_bot /////////////////////////////////////////////////////// // inside2b(); //translate( [0,0,-mz7/2] ) { //// difference() // To help visualization //// { union() { skirt1(); translate([0,0,enc_mz2+enc_mz1*0.3-mx201]) spine1_set1( enc_mx1+2*space1, enc_my1+2*space1, enc_mz1*0.7, space1, 0.1); }// union //// // To help visualization //// translate( [-200, -400, -200 ] ) //// { //// cube( [400, 400, 400] ); //// } //// //// /// // To help visualization //// translate( [-200, 2, -200 ] ) //// { //// cube( [400, 400, 400] ); //// } //// translate( [-200, -402, -200 ] ) //// { //// cube( [400, 400, 400] ); //// } //// } // difference - To help visualization }