$fn=60; include include include ; include include include base_l=190; base_e=3; b_height=5; r_height=200; hdd=1; module screw(x) { translate([0,-5,0]) rotate([90,90,0]) { nutcatch_parallel("M4", clh=0.1); hole_through(name="M4", l=x, cld=0.1, h=0, hcld=0.4); } } module corner() { difference() { union() { cuboid([30,3,30], rounding=3, edges=[LEFT+TOP,LEFT+BOT]); translate([50,0,-10]) cuboid([100,3,10]); } translate([15,0,15]) ycyl(l=3.5, d=40); translate([-10,0,10]) screw(10.5); translate([-10,0,-10]) screw(10.5); translate([30,0,-10]) screw(10.5); } } module s_height_corner() { difference() { union() { cuboid([30,3,10], rounding=3, edges=[LEFT+TOP,LEFT+BOT]); translate([50,0,0]) cuboid([100,3,10]); } translate([-10,0,0]) screw(10.5); translate([-10,0,-10]) screw(10.5); translate([30,0,0]) screw(10.5); } } module base_plate() { /*[front]*/ translate([0,0,13]) { union() { translate([-90,-97,0]) corner(); translate([90,-97,0]) mirror([1,0,0]) corner(); } union() { translate([-90,97,0]) corner(); translate([90,97,0]) mirror([1,0,0]) corner(); } } /*[plate]*/ translate([0,0,3]) rect_tube(7, size=[base_l,base_l+7], wall=base_e, center=true) { attach(BOT) rect_tube(base_e, size=[base_l,base_l+7], wall=base_e*5, irounding=10, center=true); } } module s_height_plate() { /*[front]*/ translate([0,0,3]) { union() { translate([-90,-97,0]) s_height_corner(); translate([90,-97,0]) mirror([1,0,0]) s_height_corner(); } union() { translate([-90,97,0]) s_height_corner(); translate([90,97,0]) mirror([1,0,0]) s_height_corner(); } } /*[plate]*/ translate([0,0,3]) rect_tube(7, size=[base_l,base_l+7], wall=base_e, center=true) { attach(BOT) rect_tube(base_e, size=[base_l,base_l+7], wall=base_e*5, irounding=10, center=true); } } module rail(h) { difference() { color("grey") cuboid([10,10,h], rounding=1); color("red") for(i=[-90 : 20 : 90]) translate([0,0,i]) screw(10.5); } } module rail2(h) { difference() { color("grey") cuboid([20,10,h], rounding=1); color("red") for(i=[-90 : 20 : 90]) { translate([5,0,i]) screw(10.5); translate([-5,0,i]) screw(10.5); } } } module b_connector() { mirror ([0,0,1]) difference() { union() { cuboid([33,16,30], rounding=1); translate([50,0,-10]) cuboid([100,16,10], rounding=1); } translate([20,0,15]) ycyl(l=16.5, d=40, rounding=-1.5); translate([-12,0,0]) cuboid([12,11,30], rounding=-1); translate([-3,0,10]) rotate([0,0,90]) screw(20); translate([-11,0,5]) ycyl(l=20, d=2); translate([-11,0,-5]) ycyl(l=20, d=2); } *difference() { translate([-5,0,10]) rotate([0,90,0]) nutcatch_parallel("M4", clh=0.1); translate([-3,0,10]) rotate([0,0,90]) screw(20); } } module m_connector() { mirror ([0,0,1]) difference() { union() { translate([0,-1.5,-20]) { translate([-7,0,0]) cuboid([17,13,40], rounding=1); translate([50,0,0]) cuboid([110,13,10], rounding=1); } } translate([-12,0,-20]) cuboid([12,11,40], rounding=-1); translate([-3,0,0]) { translate([0,0,-10]) rotate([0,0,90]) screw(20); translate([0,0,-30]) rotate([0,0,90]) screw(20); } translate([-11,0,0]) { translate([0,0,-5]) ycyl(l=20, d=2); translate([0,0,-15]) ycyl(l=20, d=2); translate([0,0,-25]) ycyl(l=20, d=2); translate([0,0,-35]) ycyl(l=20, d=2); } } *difference() { translate([-5,0,10]) rotate([0,90,0]) nutcatch_parallel("M4", clh=0.1); translate([-3,0,10]) rotate([0,0,90]) screw(20); } } module walls() { difference() { union() { translate([0,0,19]) cuboid([3,85,38], rounding=3, edges=[TOP+FRONT,TOP+BACK]); for(i=[2:13:28]) translate([-1.5,0,i]) ycyl(l=85, d=3); } for(i=[7:13:33]) { translate([0,-38.5,i]) xcyl(l=3, d=3.5); translate([0,38.5,i]) xcyl(l=3, d=3.5); } } } // holes_positions color("red") { translate([-60,0,-10]) ycyl(l=220, d=1); translate([60,0,-10]) ycyl(l=220, d=1); translate([-100,0,-10]) ycyl(l=220, d=1); translate([100,0,-10]) ycyl(l=220, d=1); } /*[rails]*/ // 1 U translate([-130,90,-40]) rail(120); // 1.5 U translate([100,90,180]) rail(160); translate([100,-90,180]) mirror([0,1,0]) rail(160); // 2U translate([100,-90,0]) mirror([0,1,0]) rail(200); translate([100,90,0]) rail(200); // 2U double translate([-105,-90,0]) mirror([0,1,0]) rail2(200); translate([-105,90,0]) rail2(200); /*connectors*/ color("green") { translate([0,0,-80]) rotate([0,0,90]) { translate([-79,-100,0]) b_connector(); translate([79,-100,0]) mirror([1,0,0]) b_connector(); } rotate([0,0,90]) { translate([-79,-100,80]) m_connector(); translate([79,-100,80]) mirror([1,0,0]) m_connector(); } } /*[plates_and_accessories]*/ translate([0,0,-53]) { color("cyan") base_plate(); rotate([0,0,90]) { color("cyan") ssd_plate_addon(); color("orange") translate([0,0,-3]) mirror([0,0,1]) mount(); } } translate([0,0,8]) { color("pink") { s_height_plate(); rotate([0,0,90]) { translate([0,0,-0.5]) { *ssd_plate_addon(); fan_mount(); } } } } translate([0,0,92.5]) { mirror([0,0,1]) { color("cyan") base_plate(); color("cyan") translate([0,0,-0.5]) fan_mount(); } } // addon color("red") { union() { translate([-90,97,40]) corner(); translate([90,97,40]) mirror([1,0,0]) corner(); } }