-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBrain-Duino-Box.scad
More file actions
262 lines (250 loc) · 11.7 KB
/
Brain-Duino-Box.scad
File metadata and controls
262 lines (250 loc) · 11.7 KB
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
/* [Credits] */
// 6 Oct 2016
// www.brain-duino.com
// License CC-BY-SA 4.0
// Silver Kuusik - silver.kuusik@gmail.com
// Big thanks to:
// FB Aka Heartman/Hearty 2016
// http://www.thingiverse.com/thing:1264391
/* [Version info] */
Version = "brain-duino-box v0.8";
/* [Box dimensions] */
// length
Length = 102;
// width
Width = 56;
// height
Height = 21;
// wall thickness
Thick = 1.5; // [2:5]
/* [Box options] */
// filet diameter
Filet = 2; // [0.1:12]
// filet smoothness
Resolution = 50; // [1:100]
// round_box module
module round_box($a=Length, $b=Width, $c=Height) {
$fn=Resolution;
translate([0, Filet, Filet]) {
minkowski() {
cube([$a-(Filet/2), $b-(2*Filet), $c-(2*Filet)]);
rotate([0, 90, 0]) {
cylinder(r=Filet);
}
rotate([0, 0, 90]) {
cylinder(r=Filet);
}
rotate([90, 0, 0]) {
cylinder(r=Filet);
}
}
}
} // end of round_box module
// box module
module box() {
$fn=Resolution;
// DC/DC fixation wall
translate([Length, Width, 0]) {
rotate([0, 0, 180]) {
translate([0.5, 15.5, 1.5]) {
cube([25, 1.5, 1.5]);
}
}
}
// front panel fixation
difference() {
union() {
// support
intersection() {
translate([1.5, Width-3.5, 1.5]) {
minkowski() {
cube([1, 3, 3]);
rotate([0, 90, 0]) {
cylinder(r=Filet);
}
}
}
translate([1, Width-5.5, 1.5]) {
cube([2, 5, 5]);
}
}
intersection() {
translate([1.5, 1.5, Height-4.5]) {
minkowski() {
cube([1, 3, 3]);
rotate([0, 90, 0]) {
cylinder(r=Filet);
}
}
}
translate([1, 1.5, Height-6.5]) {
cube([2, 5, 5]);
}
}
}
// screw holes
translate([0.5, 4, Height-4]) {
rotate([0, 90, 0]) {
cylinder(d=3, 3);
}
}
translate([0.5, Width-3, 4]) {
rotate([0, 90, 0]) {
cylinder(d=3, 3);
}
}
}
// assemble box and it's holes
difference() {
// make a rounded box
translate([Filet+2, Filet+1, Filet]) {
round_box(Length-7, Width-4, Height-5);
}
// make the rounded box empty inside
translate([Thick, Thick, Thick]) {
translate([0, 0, 0]) {
minkowski() {
cube([Length-2, Width-2, Height-3]);
}
}
// make the front opening corners round
translate([-1.5, 2, 2]) {
minkowski() {
cube([1.5, Width-6, Height-7]);
rotate([0, 90, 0]) {
cylinder(r=Filet);
}
}
}
}
// version substracted from bottom part
mirror([0, 1, 0]) {
rotate([0, 0, -90]) {
linear_extrude(height=0.3) {
translate([11, 5, 0]) {
text(text=Version, size=3);
}
}
}
}
// logo substracted from top part
rotate([180, 0, 0]) {
translate([Length/2, -Width/2, -Height]) {
rotate([0, 0, -90]) {
mirror([1, 0, 0]) {
logo(0.3);
}
}
}
}
// DC/DC usb charging hole
translate([Length-15, 2, 4]) {
rotate([90, 0, 0]) {
minkowski() {
cylinder(d=Filet);
cube([5, 1, 1]);
}
}
}
// DC/DC charging status LED hole
translate([Length-1, 12.5, 3.5]) {
rotate([90, 0, 0]) {
rotate([90, 0, 90]) {
minkowski() {
cube([0.25, 5, 1]);
cylinder(d=Filet/2);
}
}
}
}
// DC/DC power LED hole
translate([Length-1, 37, 3.5]) {
rotate([90, 0, 0]) {
rotate([90, 0, 90]) {
minkowski() {
cube([0.25, 2, 1]);
cylinder(d=Filet/2);
}
}
}
}
} // end of difference holes
} // end of module shell
// logo module
module logo(h) {
scale([25.4/90, -25.4/90, 1]) {
union() {
linear_extrude(height=h) {
polygon([[1.972725,30.118110],[-1.513255,30.118110],[-1.989391,30.021940],[-2.378289,29.759701],[-2.640532,29.370805],[-2.736705,28.894660],[-2.640532,28.418512],[-2.378289,28.029609],[-1.989391,27.767364],[-1.513255,27.671190],[1.972725,27.671190],[2.448859,27.767364],[2.837760,28.029609],[3.100009,28.418512],[3.196185,28.894660],[3.100009,29.370805],[2.837760,29.759701],[2.448859,30.021940]]);
polygon([[11.882805,22.350380],[-12.156045,22.350380],[-12.631912,22.254205],[-13.020850,21.991956],[-13.283256,21.603050],[-13.379525,21.126900],[-13.283256,20.650742],[-13.020850,20.261836],[-12.631912,19.999592],[-12.156045,19.903420],[11.882805,19.903420],[12.358959,19.999592],[12.747865,20.261836],[13.010111,20.650742],[13.106285,21.126900],[13.010111,21.603050],[12.747865,21.991956],[12.358959,22.254205]]);
polygon([[5.949825,26.118670],[-6.100455,26.118670],[-6.576593,26.022495],[-6.965494,25.760246],[-7.227740,25.371340],[-7.323915,24.895190],[-7.227740,24.419032],[-6.965494,24.030126],[-6.576593,23.767882],[-6.100455,23.671710],[5.949825,23.671710],[6.425979,23.767882],[6.814885,24.030126],[7.077131,24.419032],[7.173305,24.895190],[7.077131,25.371340],[6.814885,25.760246],[6.425979,26.022495]]);
polygon([[16.469885,18.312950],[-16.437805,18.312950],[-16.913953,18.216777],[-17.302856,17.954533],[-17.565101,17.565632],[-17.661275,17.089490],[-17.565101,16.613335],[-17.302856,16.224425],[-16.913953,15.962175],[-16.437805,15.866000],[16.469885,15.866000],[16.946031,15.962175],[17.334931,16.224425],[17.597173,16.613335],[17.693345,17.089490],[17.597173,17.565632],[17.334931,17.954533],[16.946031,18.216777]]);
polygon([[-1.263475,9.250060],[-0.832795,9.198660],[-0.220880,8.928285],[0.265531,8.465103],[0.596094,7.849546],[0.740465,7.122050],[3.179165,-19.066108],[8.983145,-4.889150],[9.415530,-4.186742],[9.981590,-3.655806],[10.647827,-3.319940],[11.380745,-3.202740],[18.674945,-3.202740],[19.150815,-3.298915],[19.539749,-3.561164],[19.802149,-3.950070],[19.898415,-4.426220],[19.802149,-4.902380],[19.539749,-5.291289],[19.150815,-5.553536],[18.674945,-5.649710],[11.380745,-5.649710],[11.211365,-5.900710],[4.622835,-21.809349],[4.244882,-22.390774],[3.737968,-22.799057],[3.142850,-23.011499],[2.500285,-23.005401],[1.848395,-22.752579],[1.330627,-22.288737],[0.979004,-21.654641],[0.825545,-20.891058],[-1.630345,5.605720],[-6.484475,-3.346800],[-7.046390,-4.093512],[-7.730146,-4.651719],[-8.503275,-5.001356],[-9.333305,-5.122360],[-17.633595,-5.122360],[-18.109760,-5.026183],[-18.498673,-4.763930],[-18.760921,-4.375017],[-18.857095,-3.898860],[-18.760921,-3.422711],[-18.498673,-3.033815],[-18.109760,-2.771579],[-17.633595,-2.675410],[-9.333305,-2.675410],[-8.947194,-2.522642],[-8.594015,-2.107540],[-2.916225,8.248810],[-2.197590,8.987843],[-1.263435,9.250070]]);
}
difference() {
linear_extrude(height=h) {
polygon([[19.184025,14.399540],[-19.181965,14.399540],[-19.546155,13.998370],[-21.107020,12.109857],[-22.476769,10.100642],[-23.650163,7.984265],[-24.621961,5.774269],[-25.386925,3.484195],[-25.939815,1.127584],[-26.275392,-1.282021],[-26.388415,-3.731080],[-26.251912,-6.425079],[-25.851314,-9.042154],[-25.199988,-11.568939],[-24.311302,-13.992063],[-23.198623,-16.298160],[-21.875318,-18.473862],[-20.354754,-20.505799],[-18.650299,-22.380604],[-16.775319,-24.084909],[-14.743182,-25.605345],[-12.567255,-26.928545],[-10.260906,-28.041140],[-7.837501,-28.929762],[-5.310408,-29.581043],[-2.692993,-29.981615],[0.001375,-30.118110],[2.695597,-29.981615],[5.312838,-29.581043],[7.839737,-28.929762],[10.262931,-28.041140],[12.569057,-26.928545],[14.744754,-25.605345],[16.776660,-24.084909],[18.651411,-22.380604],[20.355647,-20.505799],[21.876004,-18.473862],[23.199120,-16.298160],[24.311634,-13.992063],[25.200182,-11.568939],[25.851403,-9.042154],[26.251935,-6.425079],[26.388415,-3.731080],[26.275421,-1.282421],[25.939928,1.126997],[25.387167,3.483584],[24.622372,5.773747],[23.650775,7.983899],[22.477608,10.100446],[21.108104,12.109800],[19.547495,13.998370],[19.184025,14.399540]]);
}
translate([0, 0, -0.1]) {
linear_extrude(height=h+2*0.1) {
polygon([[-18.090175,11.952590],[18.091535,11.952590],[19.426836,10.265659],[20.598308,8.478008],[21.601569,6.600922],[22.432241,4.645685],[23.085944,2.623582],[23.558297,0.545897],[23.844920,-1.576085],[23.941435,-3.731080],[23.817616,-6.175294],[23.454239,-8.549708],[22.863425,-10.842196],[22.057297,-13.040629],[21.047975,-15.132879],[19.847581,-17.106821],[18.468236,-18.950325],[16.922061,-20.651265],[15.221179,-22.197513],[13.377710,-23.576941],[11.403776,-24.777423],[9.311498,-25.786830],[7.112997,-26.593035],[4.820396,-27.183911],[2.445814,-27.547330],[0.001375,-27.671165],[-2.443211,-27.547330],[-4.817967,-27.183911],[-7.110766,-26.593035],[-9.309480,-25.786830],[-11.401985,-24.777423],[-13.376153,-23.576941],[-15.219858,-22.197513],[-16.920974,-20.651265],[-18.467373,-18.950325],[-19.846929,-17.106821],[-21.047516,-15.132879],[-22.057008,-13.040629],[-22.863277,-10.842196],[-23.454197,-8.549708],[-23.817642,-6.175294],[-23.941485,-3.731080],[-23.844967,-1.575686],[-23.558322,0.546484],[-23.085914,2.624193],[-22.432107,4.646206],[-21.601266,6.601288],[-20.597754,8.478203],[-19.425936,10.265716]]);
}
}
}
}
}
}
module front_panel() {
$fn=Resolution;
difference() {
// front panel
translate([0, 3.5+0.15, Height+3.15]) {
minkowski() {
cube([0.5, Width-6.3, Height-7.3]);
rotate([0, 90, 0]) {
cylinder(r=Filet);
}
}
}
// screw holes
translate([-0.1, 4, (2*Height)-4.5]) {
rotate([0, 90, 0]) {
cylinder(d=3, 3);
}
}
translate([-0.1, Width-3, Height+3.5]) {
rotate([0, 90, 0]) {
cylinder(d=3, 3);
}
}
// button hole
translate([-0.1, 5, Height+1.5]) {
minkowski() {
cube([1, 4, 1.5]);
rotate([0, 90, 0]) {
cylinder(d=10, 3);
}
}
}
// headpad hole
translate([-0.1, Width-11, Height+12]) {
minkowski() {
cube([1, 6.5, 4]);
rotate([0, 90, 0]) {
cylinder(d=Filet, 3);
}
}
}
// 200Hz LED hole
translate([-0.1, 6, Height+11.5]) {
minkowski() {
cube([1, 2, 0.25]);
rotate([0, 90, 0]) {
cylinder(d=Filet/2, 3);
}
}
}
}
}
box();
front_panel();