aboutsummaryrefslogtreecommitdiff
path: root/Case.scad
blob: 810c781ffc999d66c6db907caaad7c2b8bd124b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
// If you don't want additional space above the USB Ports for a SATA cable make this false
SATA_CUTOUT=true;

$fn=50;

// Board dimensions
B_L=126.9;
B_W=79.4;
B_H=1.4;

// Screw holes
HOLE_R=1.5;
// Distance from edges is
// 2.7+1.5 = 4.2
HOLE_DISTANCE=4.2;


// Box

union() {
    translate([0,0,-5])
    difference() {
        translate([1.8,1.8,0])
        linear_extrude(50)
        minkowski() {
            square([B_L-3.6, B_W-3.6]);
            circle(6);
        };
        translate([1.8,1.8,3])
        linear_extrude(50)
        minkowski() {
            square([B_L-3.6, B_W-3.6]);
            circle(4);
        };
        // USB cutouts
        translate([0,37.5,5])
        cube([B_L+50, 33, 18.5]);
        
        // SATA Cutout
        if(SATA_CUTOUT) {
            translate([B_L,54,23.4])
            rotate([0,0,45])
            cylinder(6,23.4,16,$fn=4);
        }
            
        // Button / Audio cutout
        translate([0,9,5])
        cube([B_L+50, 27, 9.5]);
        
        // Ethernet cutout
        translate([-10,31.5,5]) {
            cube([50,17,16]);
        }
        
        // DC Cutout
        translate([-10,11,5])
        cube([50,10.5,9.5]);

        // HDMI cutout
        translate([-10,52.5,5])
        cube([50,16,8.2]);
        
        // SD Cutout
        translate([99,-5,3])
        cube([13,16,2.5]);
        
        // Power Symbol
        translate([B_L+5.5,23,18.8])
        rotate([0,270,0])
        linear_extrude(2)
        {
            difference() {
                circle(3);
                circle(2);
                translate([4,0,0])
                square([10,3], center = true);
            }
            translate([2.5,0,0])
            square([3,1], center = true);
        }

        // Reset symbol
        translate([B_L+5.5,32.5,18.8])
        rotate([90,0,0])
        rotate([0,270,0])
        linear_extrude(2)
        {
            difference() {
                circle(3);
                circle(2);
                square(4);
            }
            translate([0.7,2.5,0])
            circle(r=1.5, $fn=3);
        }
        
        // DC Symbol
        translate([-5.5,12.25,16])
        mirror([0,0,1])
        rotate([0,90,0])
        linear_extrude(2)
        {
            translate([2, 0 ,0])
            square([1,8]);
            
            square([1,1.6]);
            translate([0,3.2,0])
            square([1,1.6]);
            translate([0,6.4,0])
            square([1,1.6]);
        }
    }

    translate([HOLE_DISTANCE,HOLE_DISTANCE,-5])
    pin();
    translate([B_L - HOLE_DISTANCE,HOLE_DISTANCE,-5])
    pin();
    translate([HOLE_DISTANCE,B_W - HOLE_DISTANCE,-5])
    pin();
    translate([B_L - HOLE_DISTANCE,B_W - HOLE_DISTANCE,-5])
    pin();
}


translate([0,-20,42.5])
rotate([180,0,0])
// Cap
difference() {
    translate([1.8,1.8,42.5])
    linear_extrude(5)
    minkowski() {
        square([B_L-3.6, B_W-3.6]);
        circle(8);
    };
    translate([1.8,1.8,1])
    linear_extrude(45)
    minkowski() {
        square([B_L-3.6, B_W-3.6]);
        circle(6.07);
    };

    // Fan Holes
    translate([45,22,0]) {
        translate([6,4,0])
        for( i = [0:1:23] ) {
            translate([i%6*4.6,floor(i/6)*7.8,0])
            rotate([0,0, floor(i / 6) % 2 ? - 45 : 45])
            linear_extrude(100)
            minkowski() {
                square([7,0.1], center = true);
                circle(r=1.2);
            }
        }
        
        translate([0,0,40]) {
            cylinder(15,d=4);
            translate([32,0,0])
            cylinder(15,d=4);
            translate([32,32,0])
            cylinder(15,d=4);
            translate([0,32,0])
            cylinder(15,d=4);
        }
    }
}


module pin() {
    cylinder(10, r=HOLE_R-0.1);
    cylinder(5, r=3);
}

use <Quartz64.scad>
if($preview) {
    board();
}
Jeremias Stotters git repositories generated by CGIT