enclosure.scad (4076B)
1 // 19-inch rack chassis details 2 // =========================================================================== 3 // width: 482.6mm +/- 0.4mm 4 // 5 // heights: +/- 0.4mm 6 // units | height (mm) | h1 (mm) | h2 (mm) | h3 (mm) 7 // ------+-------------+---------+---------+-------- 8 // 1U | 44.45 | 43.65 | - | 21.83 9 // "" | "" | "" | 31.75 | 5.95 10 // 2U | 88.90 | 88.10 | 44.45 | 21.83 11 // "" | "" | "" | 76.20 | 5.95 12 // 3U | 133.35 | 132.55 | 57.15 | 37.70 13 // 4U | 177.80 | 177.00 | 101.60 | "" 14 // 5U | 222.25 | 221.45 | 146.06 | "" 15 // 6U | 266.70 | 265.90 | 190.50 | "" 16 // ------+-------------+---------+---------+------- 17 // - height : total height in mm of given rack units (including padding) 18 // - h1 : total height of front panel (excluding padding) 19 // - h2 : distance between mounting hole centres 20 // - h3 : distance between lower mounting hole centre and bottom of front panel 21 // 22 // depths: 800/1000/1200 mm 23 // 24 // faceplate mounting hole styles: 25 // castellated: 26 // width: 14.7mm +/- 1.2mm 27 // height: 6.8mm +/- 0.5mm 28 // regular: 29 // total width: 13.5mm +/- 0.4mm 30 // oval width: 10.3mm +/- 0.4mm 31 // height: 6.8mm +/- 0.5mm 32 // 33 // overall chassis: 4U, faceplate, body, spacer, lid 34 // faceplate: 35 // - mesh front, 85% porosity 36 // - dust filter 37 // - rack handles 38 // - castellated faceplate 4U mounting holes 39 // body (bottom + sides + rear): 40 // - w/h/d (mm): 483/178/800 41 // - external rack rails 42 // - 3x3 140mm fans, w/h/d (mm): 150/150/30 43 // - 6x12 3.5" disk slots, w/h/d (mm): 105/30/150 44 // spacer: 45 // - w/d (mm): 483/800 46 // lid: 47 // - tool-free (ptfe rollers and groove) 48 49 $fn = 64; 50 51 width = 482.6; 52 depth = 800; 53 54 unit_dims = [ 55 [undef, undef, undef, undef], // "0U" 56 [44.45, 43.65, 31.75, 5.95], // 1U 57 [88.90, 88.10, 44.45, 21,83], // 2U 58 [133.35, 132.55, 57.15, 37.70], // 3U 59 [177.80, 177.00, 101.60, 37.70], // 4U 60 [222.25, 221.45, 146.06, 37.70], // 5U 61 [266.70, 265.90, 190.50, 37.70], // 6U 62 ]; 63 64 mounting_hole_dims = [ 65 [14.7, 6.8], 66 [13.5, 6.8, 10.3], 67 ]; 68 69 module logo() { 70 // TODO 71 } 72 73 module front_panel_mounting_hole(castellated = true) { 74 d = 6.8; r = d / 2; 75 76 if (castellated) { 77 w = 14.7; translate([0,-r,0]) %square([w,d]); // template 78 79 r0 = w - r; 80 81 union() { 82 translate([0,-r,0]) square([w-r, d]); 83 translate([r0,0,0]) circle(r); 84 } 85 } else { 86 w = 13.5; translate([0,-r,0]) %square([w,d]); // template 87 88 o = 13.5 - 10.3; // initial offset from side 89 r0 = r; // 1st hole centre 90 r1 = 10.3 - r; // 2nd hole centre 91 92 union() { 93 translate([o,0,0]) { 94 translate([r0,0,0]) circle(r); 95 translate([r0,-r,0]) square([r, d]); 96 translate([r1,0,0]) circle(r); 97 }; 98 } 99 } 100 } 101 102 module front_panel_mesh(porosity = 0.85) { 103 // TODO 104 } 105 106 module front_panel(units = 4, mounting_holes = true, castellated = false, mesh = true, porosity = 0.85, thickness = 1.5) { 107 h0 = unit_dims[units][0]; // unit height (including padding) 108 h1 = unit_dims[units][1]; // front panel total height 109 h2 = unit_dims[units][2]; // distance between mounting hole centres 110 h3 = unit_dims[units][3]; // distance of mounting hole from panel bottom 111 112 linear_extrude(height=thickness, center=true, convexity=10) difference() { 113 square([width, h1]); // blank front panel 114 115 if (mounting_holes) { 116 translate([0,h3,0]) 117 front_panel_mounting_hole(castellated=castellated); 118 translate([0,h3+h2,0]) 119 front_panel_mounting_hole(castellated=castellated); 120 121 translate([width,h3,0]) scale([-1,1,1]) 122 front_panel_mounting_hole(castellated=castellated); 123 translate([width,h3+h2,0]) scale([-1,1,1]) 124 front_panel_mounting_hole(castellated=castellated); 125 } 126 127 if (mesh) { 128 front_panel_mesh(porosity=porosity); 129 } 130 131 logo(); // embossed logo 132 }; 133 } 134 135 module body() { 136 linear_extrude(height=1, center=true, convexity=10) square(10); 137 } 138 139 module spacer() { 140 linear_extrude(height=1, center=true, convexity=10) square(10); 141 } 142 143 module lid() { 144 linear_extrude(height=1, center=true, convexity=10) square(10); 145 } 146 147 front_panel(); 148 // body(); 149 // spacer(); 150 // lid();