1 // 19 to 22 inch rack adapter
3 difference() { // For adding the screw holes
10 rack_hole_r = 6.5 / 2;
11 // rack_hole_x_offset = (11.75 / 2) + 3.25;
12 rack_hole_x_offset = (11.75 / 2) + 5.3;
13 rack_hole_y_offset = rack_hole_r + 2.9;
15 support_thickness = 10;
16 support_base_thickness = 2.5;
17 support_hole_y_offset = 18;
18 support_hole_z_offset = 18;
21 support_length = length - rack_length;
25 difference() { // Extra triangle supports on both sides of the Y axis
26 translate([support_base_thickness, 0, 0])
27 linear_extrude(height(x, y) = (-width / support_length) * x + width) square(size = [support_length, width]);
28 translate([support_base_thickness, support_thickness, 0])
29 linear_extrude(height) square(size = [support_length, width - support_thickness * 2]);
31 difference() { // Cut our L bracket
32 linear_extrude(height) square(size = [length, width]);
34 translate([0,0, rack_thickness])
35 linear_extrude(height)
36 translate([support_base_thickness, 0]) square(size = [length, width]);
42 // Holes for rackmount
43 translate([rack_hole_x_offset + support_length, width - rack_hole_y_offset, 0])
44 linear_extrude(height) circle(r = rack_hole_r);
45 translate([rack_hole_x_offset + support_length, rack_hole_y_offset, 0])
46 linear_extrude(height) circle(r = rack_hole_r);
48 // Holes for mounting to unit
49 translate([-1, support_hole_y_offset, support_hole_z_offset]) rotate(a = [0, 90])
50 linear_extrude(height) circle(r = support_hole_r);
51 translate([-1, width - support_hole_y_offset, support_hole_z_offset]) rotate(a = [0, 90])
52 linear_extrude(height) circle(r = support_hole_r);
53 translate([-1, support_hole_y_offset, height - support_hole_z_offset]) rotate(a = [0, 90])
54 linear_extrude(height) circle(r = support_hole_r);
55 translate([-1, width - support_hole_y_offset, height - support_hole_z_offset]) rotate(a = [0, 90])
56 linear_extrude(height) circle(r = support_hole_r);
58 // TODO: Make this code work:
59 // translate([0, support_hole_y_offset, 20]) rotate(a = [0, 90])
60 // linear_extrude(height)
61 // pack(size = [10, 10]) {