/* Tool Rack for holding hexes History: -------- 2015-04-11, 16:15, h: 1st try. 2015-04-12, 10:51, h: Oh my. v3 hat 125MB G-Code und würde 20h drucken...das taugt nicht. 2015-04-12, 11:03, h: Vereinfachen.... -> nur 2 levels -> weibliche connetoren so hoch wie Level Uuund: -> männliche Connector anbringen 2015-04-13, 20:40, h: Make modifications for wider levels and bigger holes, ans parametric row count... ToDo: ----- - create module for level(s) (parametric) */ /* Modules */ include <../Modules/Module_Rounded_Cube.scad>; include <../Modules/Module_Steckverbinder.scad>; /* Globals */ $fn=50; //$fn=100; /* Two - Level - Configuration, 40mm, 10mm holes, short */ gLevels=2; // 1-3 gLength=80.0; gWidth1=40.0; // Width of 1st level gWidth2=40.0; // Width of 2nd level gWidth3=25.0; // Width of 3rd level gHeight0=45; // Height of back gHeight1=35; // Height of 1st level gHeight2=7; // Height of 2nd level gHeight3=5; // Height of 3rd level and thickness of back gHoleMount=3.0; gHoleLevel1=10; //gHoleLevel1=7.5; //gHoleLevel1=5.0; gHoleLevel2=gHoleLevel1; gHoleLevel3=gHoleLevel2; gHoleYRows=3; //gHoleXRows=10; gHoleXRows=gLength/(gHoleLevel1*1.3); /* Two - Level - Configuration, 40mm, 5mm holes, short * / gLevels=2; // 1-3 gLength=80.0; gWidth1=40.0; // Width of 1st level gWidth2=40.0; // Width of 2nd level gWidth3=25.0; // Width of 3rd level gHeight0=45; // Height of back gHeight1=35; // Height of 1st level gHeight2=7; // Height of 2nd level gHeight3=5; // Height of 3rd level and thickness of back gHoleMount=3.0; gHoleLevel1=5; //gHoleLevel1=7.5; //gHoleLevel1=5.0; gHoleLevel2=gHoleLevel1; gHoleLevel3=gHoleLevel2; gHoleYRows=4; //gHoleXRows=10; gHoleXRows=gLength/(gHoleLevel1*1.3); */ /* Two - Level - Configuration, 40mm, 5mm holes * / gLevels=2; // 1-3 gLength=150.0; gWidth1=40.0; // Width of 1st level gWidth2=40.0; // Width of 2nd level gWidth3=25.0; // Width of 3rd level gHeight0=45; // Height of back gHeight1=35; // Height of 1st level gHeight2=7; // Height of 2nd level gHeight3=5; // Height of 3rd level and thickness of back gHoleMount=3.0; gHoleLevel1=5; //gHoleLevel1=7.5; //gHoleLevel1=5.0; gHoleLevel2=gHoleLevel1; gHoleLevel3=gHoleLevel2; gHoleYRows=4; //gHoleXRows=10; gHoleXRows=gLength/(gHoleLevel1*1.5); */ /* Two - Level - Configuration, 40mm, 10mm holes gLevels=2; // 1-3 gLength=150.0; gWidth1=40.0; // Width of 1st level gWidth2=40.0; // Width of 2nd level gWidth3=25.0; // Width of 3rd level gHeight0=45; // Height of back gHeight1=35; // Height of 1st level gHeight2=7; // Height of 2nd level gHeight3=5; // Height of 3rd level and thickness of back gHoleMount=3.0; gHoleLevel1=10; //gHoleLevel1=7.5; //gHoleLevel1=5.0; gHoleLevel2=gHoleLevel1; gHoleLevel3=gHoleLevel2; gHoleYRows=3; //gHoleXRows=10; gHoleXRows=gLength/(gHoleLevel1*1.5); */ /* Two - Level - Configuration, 25mm, 5mm holes gLevels=2; // 1-3 gLength=150.0; gWidth1=25.0; // Width of 1st level gWidth2=25.0; // Width of 2nd level gWidth3=25.0; // Width of 3rd level gHeight0=35.0; // Height of back gHeight1=25; // Height of 1st level gHeight2=5; // Height of 2nd level gHeight3=5; // Height of 3rd level and thickness of back gHoleMount=3.0; gHoleLevel1=5.0; gHoleLevel2=5.0; */ /* Three - Level - Configuration gLevels=3; // 1-3 gLength=150.0; gWidth1=25.0; // Width of 1st level gWidth2=25.0; // Width of 2nd level gWidth3=25.0; // Width of 3rd level gHeight0=55.0; // Height of back gHeight1=45; // Height of 1st level gHeight2=25; // Height of 2nd level gHeight3=5; // Height of 3rd level and thickness of back gHoleMount=3.0; gHoleLevel1=5.0; gHoleLevel2=5.0;*/ difference() { /* The Rack */ union() { /* Back */ difference() { /* Back Plate */ translate([0,gHeight3/2,gHeight0/2]) rotate([90,0,0]) roundedCubeWithCornerDiameter(gLength, gHeight0, gHeight3, 0, 0, 5, 5); /* Holes in Back for Mounting */ translate([0,gHeight3,gHeight0*0.9]) rotate([90,0,0]) cylinder(d=gHoleMount, h=gHeight3); translate([gLength*0.45,gHeight3,gHeight0*0.9]) rotate([90,0,0]) cylinder(d=gHoleMount, h=gHeight3); translate([-gLength*0.45,gHeight3,gHeight0*0.9]) rotate([90,0,0]) cylinder(d=gHoleMount, h=gHeight3); } /* 1st Level Plate */ translate([0,gWidth1/2+gHeight3,gHeight1/2]) roundedCubeWithCornerDiameter(gLength, gWidth1, gHeight1, 0, 0, 5, 5); /* 2nd Level Plate */ if (gLevels>=2) { translate([0,gHeight3+gWidth1/2+gWidth2/2,gHeight2/2]) roundedCubeWithCornerDiameter(gLength, gWidth1+gWidth2, gHeight2, 0, 0, 5, 5); } /* 3rd Level Plate */ if (gLevels>=3) { translate([0,gHeight3+gWidth1/2+gWidth2/2+gWidth3/2,gHeight3/2]) roundedCubeWithCornerDiameter(gLength, gWidth1+gWidth2+gWidth3, gHeight3, 0, 0, 10, 10); } /* Male Connector */ if (1) { /* Steckverbinder, 1st Level */ translate([+gLength/2,15,gHeight1/2-0.01]) // 0.01 wegen "Object isn't a valid 2-manifold! Modify your design.." rotate([0,-90,180]) steckVerbinderMaennlich(gHeight1, 5); // lWidth, lThickness /* Steckverbinder, 2nd Level */ translate([+gLength/2,40,gHeight2/2-0.01]) rotate([0,-90,180]) steckVerbinderMaennlich(gHeight2,5); // lWidth, lThickness } } // end of Rack /* Holes for Tools, 1st Level */ yStep=gWidth2/gHoleYRows; // xRows=gLength/(gHoleLevel2*1.2); echo ("gHoleYRows", gHoleYRows); echo ("gWidth1", gWidth1); echo ("yStep", yStep); // for ( yi = [-gWidth1/2+yStep : yStep : gWidth1/2-yStep] ) #for ( yii = [1 : 1 : gHoleYRows] ) { yi=gHeight3+gWidth1+gWidth2*0+yStep-gHoleLevel1*0.75-(yii*yStep); xStep=gLength/gHoleXRows; for ( xi = [-gLength/2+xStep*1 : xStep : gLength/2-xStep] ) { // translate([xi,gHeight3+yi+gWidth1*0.6,0]) translate([xi,yi,0]) cylinder(d=gHoleLevel1, h=gHeight1); } } /* Holes for Tools, 2nd Level */ // gHoleYRows=2; // xRows=gLength/(gHoleLevel2*1.2); // yStep=gWidth2/gHoleYRows; echo ("yStep", yStep); // for ( yi = [-gWidth2/2+yStep : yStep : gWidth2/2-yStep] ) #for ( yii = [1 : 1 : gHoleYRows] ) { yi=gHeight3+gWidth1+gWidth2+yStep-gHoleLevel2*0.75-(yii*yStep); xStep=gLength/gHoleXRows; for ( xi = [-gLength/2+xStep : xStep : gLength/2-xStep] ) { // translate([xi,gHeight3+gWidth1+gWidth2*0.6+yi,0]) translate([xi,yi,0]) cylinder(d=gHoleLevel2, h=gHeight2); } } /* Holes for Tools, 3rd Level */ if (gLevels>2) { yStep=gWidth3/4; for ( yi = [-gWidth3/2+yStep : yStep : gWidth3/2-yStep] ) { xStep=gLength/20; for ( xi = [-gLength/2+xStep : xStep : gLength/2-xStep] ) { // translate([xi,gHeight3+gWidth1+gWidth2+gWidth3*0.75,0]) translate([xi,gHeight3+gWidth1+gWidth2+gWidth3*0.6+yi,0]) cylinder(d=gHoleLevel3, h=gHeight2); } } } if (1) { /* Steckverbinder, 1st Level */ translate([-gLength/2-0.01,15,(gHeight1*1.2)/2.5]) // 0.01, 1.2 und 2.5 wegen "Object isn't a valid 2-manifold! Modify your design.." rotate([0,90,0]) steckVerbinderAussparung(gHeight1*1.1, 5); // lWidth, lThickness /* Steckverbinder, 2nd Level */ translate([-gLength/2-0.01,40,gHeight2*1.2/2.5]) rotate([0,90,0]) steckVerbinderAussparung(gHeight2*1.1, 5); // lWidth, lThickness } } // diff