Commit | Line | Data |
---|---|---|
ee9500d3 LMM |
1 | // 19 to 22 inch rack adapter |
2 | ||
3 | difference() { // For adding the screw holes | |
4 | length = 80; | |
440204d0 | 5 | width = 44.23; |
ee9500d3 LMM |
6 | height = 45; |
7 | ||
8 | rack_length = 20; | |
440204d0 LMM |
9 | rack_thickness = 2.5; |
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; | |
ee9500d3 LMM |
14 | |
15 | support_thickness = 10; | |
440204d0 LMM |
16 | support_base_thickness = 2.5; |
17 | support_hole_y_offset = 18; | |
18 | support_hole_z_offset = 18; | |
ee9500d3 LMM |
19 | support_hole_r = 2; |
20 | ||
21 | support_length = length - rack_length; | |
22 | ||
23 | union(r = 0) { | |
24 | ||
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]); | |
30 | } | |
31 | difference() { // Cut our L bracket | |
32 | linear_extrude(height) square(size = [length, width]); | |
33 | ||
34 | translate([0,0, rack_thickness]) | |
35 | linear_extrude(height) | |
36 | translate([support_base_thickness, 0]) square(size = [length, width]); | |
37 | ||
38 | } | |
39 | ||
40 | } | |
41 | ||
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); | |
47 | ||
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); | |
57 | ||
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]) { | |
62 | // circle(r = 2); | |
63 | // circle(r = 2); | |
64 | // circle(r = 2); | |
65 | // circle(r = 2); | |
66 | // } | |
67 | ||
68 | ||
69 | } | |
70 | ||
33bb40e4 | 71 |