@@ -39,8 +39,7 @@ case_inner_padding_bottom = 4;
39
39
40
40
/* [Case dimensions] */
41
41
42
- // How round to make the case
43
- // fillet_radius = 0;
42
+ // How round to make the case. Disabled if thick_border=true
44
43
fillet_radius = 2.5 ;
45
44
46
45
// Panel cover thickness
@@ -167,17 +166,17 @@ usb_cutout_box_height = 50;
167
166
usb_cutout_box_depth = 7 ;
168
167
usb_cutout_left_wall_thickness = 1.4 ;
169
168
usb_cutout_right_wall_thickness = 1.4 ;
170
- usb_cutout_top_wall_thickness = 1.4 ;
171
169
usb_cutout_bottom_wall_thickness = 1.4 ;
172
170
usb_cutout_back_wall_thickness = 0.8 ;
173
171
usb_cutout_hole_position = "top" ; // [top, bottom, left, right, back]
174
- usb_cutout_hole_width = 14 ;
175
- usb_cutout_hole_height = 6.0 ;
176
-
172
+ // Larger USB-C
173
+ // usb_cutout_hole_width = 14;
174
+ // usb_cutout_hole_height = 6.0;
175
+ // usb_cutout_top_wall_thickness = 1.4;
177
176
// Tiny USB-C
178
- // usb_cutout_hole_width = 9.1;
179
- // usb_cutout_hole_height = 3.2;
180
- // usb_cutout_top_wall_thickness = 4.0;
177
+ usb_cutout_hole_width = 9.1 ;
178
+ usb_cutout_hole_height = 3.2 ;
179
+ usb_cutout_top_wall_thickness = 4.0 ;
181
180
182
181
/* [Hanging hole] */
183
182
@@ -214,7 +213,9 @@ rear_cooling_offset = 5;
214
213
215
214
/* [Raspberry Pi Zero Pinholes] */
216
215
pi_pinholes = false ;
217
- pi_pinholes_ordientation = "vertical" ; // [horizontal, vertical]
216
+ pi_pinholes_cooling = true ;
217
+ pi_pinholes_cooling_gap = 5.7 ;
218
+ pi_pinholes_orientation = "vertical" ; // [horizontal, vertical]
218
219
pi_pinholes_x_percentage = 5.5 ;
219
220
pi_pinholes_y_percentage = 15 ;
220
221
pi_pinholes_diameter = 2.5 ;
@@ -268,6 +269,8 @@ frame_full_depth = panel_depth
268
269
+ case_depth
269
270
+ back_depth;
270
271
272
+ fillet_radius_in_use = thick_border ? 0 : fillet_radius;
273
+
271
274
kickstand_height = frame_full_height * kickstand_height_percentage / 100 ;
272
275
kickstand_full_width = kickstand_width + 2 * kickstand_wall_thickness + 2 * kickstand_gap_thickness;
273
276
kickstand_leg_full_width = kickstand_leg_width + 2 * kickstand_wall_thickness + 2 * kickstand_gap_thickness;
@@ -893,6 +896,11 @@ module case() {
893
896
rearCooling();
894
897
}
895
898
899
+ if (pi_pinholes && pi_pinholes_cooling) {
900
+ color (case_color)
901
+ piPinholesCooling();
902
+ }
903
+
896
904
color (case_color)
897
905
sideButtonHoles();
898
906
}
@@ -1154,7 +1162,7 @@ module caseWithKickstand() {
1154
1162
/** ***************************************************************************/
1155
1163
1156
1164
1157
- module filletBox(x, y, z, r = fillet_radius , fn=64) {
1165
+ module filletBox(x, y, z, r = fillet_radius_in_use , fn=64) {
1158
1166
// Optional sanity check (warn if the fillet is too large):
1159
1167
if (x < 2 * r || y < 2 * r || z < 2 * r) {
1160
1168
echo ("WARNING: fillet radius is too large for box dimensions!" );
@@ -1173,52 +1181,52 @@ module filletBox(x, y, z, r = fillet_radius, fn=64) {
1173
1181
}
1174
1182
}
1175
1183
1176
- module filletBoxTop(x, y, z, r = fillet_radius , fn=64) {
1184
+ module filletBoxTop(x, y, z, r = fillet_radius_in_use , fn=64) {
1177
1185
intersection () {
1178
1186
cube ([x, y, z]);
1179
1187
filletBox(x, y, z * 2 , r, fn);
1180
1188
}
1181
1189
}
1182
1190
1183
- module filletBoxMiddle(x, y, z, r = fillet_radius , fn=64) {
1191
+ module filletBoxMiddle(x, y, z, r = fillet_radius_in_use , fn=64) {
1184
1192
intersection () {
1185
1193
cube ([x, y, z]);
1186
1194
translate ([0 , 0 , - z])
1187
1195
filletBox(x, y, z * 3 , r, fn);
1188
1196
}
1189
1197
}
1190
1198
1191
- module filletBoxBottom(x, y, z, r = fillet_radius , fn=64) {
1199
+ module filletBoxBottom(x, y, z, r = fillet_radius_in_use , fn=64) {
1192
1200
intersection () {
1193
1201
cube ([x, y, z]);
1194
1202
translate ([0 , 0 , - z])
1195
1203
filletBox(x, y, z * 2 , r, fn);
1196
1204
}
1197
1205
}
1198
1206
1199
- module filletBoxLeft(x, y, z, r = fillet_radius , fn=64) {
1207
+ module filletBoxLeft(x, y, z, r = fillet_radius_in_use , fn=64) {
1200
1208
intersection () {
1201
1209
cube ([x, y, z]);
1202
1210
filletBox(x * 2 , y, z, r, fn);
1203
1211
}
1204
1212
}
1205
1213
1206
- module filletBoxRight(x, y, z, r = fillet_radius , fn=64) {
1214
+ module filletBoxRight(x, y, z, r = fillet_radius_in_use , fn=64) {
1207
1215
intersection () {
1208
1216
cube ([x, y, z]);
1209
1217
translate ([- x, 0 , 0 ])
1210
1218
filletBox(x * 2 , y, z, r, fn);
1211
1219
}
1212
1220
}
1213
1221
1214
- module filletBoxUp(x, y, z, r = fillet_radius , fn=64) {
1222
+ module filletBoxUp(x, y, z, r = fillet_radius_in_use , fn=64) {
1215
1223
intersection () {
1216
1224
cube ([x, y, z]);
1217
1225
filletBox(x, y * 2 , z, r, fn);
1218
1226
}
1219
1227
}
1220
1228
1221
- module filletBoxDown(x, y, z, r = fillet_radius , fn=64) {
1229
+ module filletBoxDown(x, y, z, r = fillet_radius_in_use , fn=64) {
1222
1230
intersection () {
1223
1231
cube ([x, y, z]);
1224
1232
translate ([0 , - y, 0 ])
@@ -1338,41 +1346,78 @@ module sdCardAdapterBase() {
1338
1346
}
1339
1347
}
1340
1348
1349
+ module coolingHoles(x_start, x_end, y_start, y_end, gap, radius = rear_cooling_radius, skip_corners = false) {
1350
+ let (
1351
+ x_extra = (x_end - x_start) % gap / 2 ,
1352
+ y_extra = (y_end - y_start) % gap / 2
1353
+ ) {
1354
+ for (x = [x_start : gap : x_end]) {
1355
+ for (y = [y_start : gap : y_end]) {
1356
+ if (
1357
+ ! skip_corners || ! (
1358
+ ((abs (x - x_start) < gap/2 ) || (abs (x - x_end) < gap/2 )) &&
1359
+ ((abs (y - y_start) < gap/2 ) || (abs (y - y_end) < gap/2 ))
1360
+ )
1361
+ ) {
1362
+ translate ([x + x_extra, y + y_extra, - 0.01 + case_depth])
1363
+ cylinder (d = radius, h = back_depth + 0.12 );
1364
+ }
1365
+ }
1366
+ }
1367
+ }
1368
+ }
1369
+
1341
1370
// Draw tiny holes into the back panel for cooling
1342
1371
module rearCooling() {
1343
1372
rear_cooling_x_start = rear_cooling_x_start_percentage / 100 * frame_full_width;
1344
1373
rear_cooling_x_end = rear_cooling_x_end_percentage / 100 * frame_full_width;
1345
1374
rear_cooling_y_start = rear_cooling_y_start_percentage / 100 * frame_full_height;
1346
1375
rear_cooling_y_end = rear_cooling_y_end_percentage / 100 * frame_full_height;
1347
1376
1348
- for (x = [rear_cooling_x_start : rear_cooling_gap : rear_cooling_x_end]) {
1349
- for (y = [rear_cooling_y_start : rear_cooling_gap : rear_cooling_y_end]) {
1350
- translate ([x, y, - 0.11 ])
1351
- cylinder (d = rear_cooling_radius, h = case_depth + back_depth + 0.22 );
1377
+ coolingHoles(
1378
+ rear_cooling_x_start, rear_cooling_x_end,
1379
+ rear_cooling_y_start, rear_cooling_y_end,
1380
+ rear_cooling_gap
1381
+ );
1382
+ }
1383
+
1384
+ module piPinholes() {
1385
+ let (
1386
+ width = pi_pinholes_orientation == "vertical" ? pi_pinholes_height : pi_pinholes_width,
1387
+ height = pi_pinholes_orientation == "vertical" ? pi_pinholes_width : pi_pinholes_height
1388
+ ) {
1389
+ pin_holes_x = pi_pinholes_x_percentage / 100 * (frame_full_width - width);
1390
+ pin_holes_y = pi_pinholes_y_percentage / 100 * (frame_full_height - height);
1391
+
1392
+ pin_hole_locations = [
1393
+ [pin_holes_x, pin_holes_y],
1394
+ [pin_holes_x + width, pin_holes_y],
1395
+ [pin_holes_x, pin_holes_y + height],
1396
+ [pin_holes_x + width, pin_holes_y + height]
1397
+ ];
1398
+ for (loc = pin_hole_locations) {
1399
+ translate ([loc[0 ], loc[1 ], - 0.11 ])
1400
+ cylinder (d = pi_pinholes_diameter, h = case_depth + 0.22 );
1401
+ translate ([loc[0 ], loc[1 ], case_depth - pi_pinholes_spacer_height - 0.11 ])
1402
+ cylinder (d = pi_pinholes_spacer, h = pi_pinholes_spacer_height + 0.22 );
1352
1403
}
1353
1404
}
1354
1405
}
1355
1406
1356
- module piPinholes() {
1357
- pin_holes_x = pi_pinholes_x_percentage / 100 * frame_full_width;
1358
- pin_holes_y = pi_pinholes_y_percentage / 100 * frame_full_height;
1359
-
1360
- pin_hole_locations = pi_pinholes_ordientation == "horizontal" ? [
1361
- [pin_holes_x, pin_holes_y],
1362
- [pin_holes_x + pi_pinholes_width, pin_holes_y],
1363
- [pin_holes_x, pin_holes_y + pi_pinholes_height],
1364
- [pin_holes_x + pi_pinholes_width, pin_holes_y + pi_pinholes_height]
1365
- ] : [
1366
- [pin_holes_x, pin_holes_y],
1367
- [pin_holes_x + pi_pinholes_height, pin_holes_y],
1368
- [pin_holes_x, pin_holes_y + pi_pinholes_width],
1369
- [pin_holes_x + pi_pinholes_height, pin_holes_y + pi_pinholes_width]
1370
- ];
1371
- for (loc = pin_hole_locations) {
1372
- translate ([loc[0 ], loc[1 ], - 0.11 ])
1373
- cylinder (d = pi_pinholes_diameter, h = case_depth + 0.22 );
1374
- translate ([loc[0 ], loc[1 ], case_depth - pi_pinholes_spacer_height - 0.11 ])
1375
- cylinder (d = pi_pinholes_spacer, h = pi_pinholes_spacer_height + 0.22 );
1407
+ module piPinholesCooling() {
1408
+ let (
1409
+ width = (pi_pinholes_orientation == "vertical" ? pi_pinholes_height : pi_pinholes_width),
1410
+ height = (pi_pinholes_orientation == "vertical" ? pi_pinholes_width : pi_pinholes_height)
1411
+ ) {
1412
+ pin_holes_x = pi_pinholes_x_percentage / 100 * (frame_full_width - width);
1413
+ pin_holes_y = pi_pinholes_y_percentage / 100 * (frame_full_height - height);
1414
+
1415
+ coolingHoles(
1416
+ pin_holes_x, pin_holes_x + width,
1417
+ pin_holes_y, pin_holes_y + height,
1418
+ pi_pinholes_cooling_gap,
1419
+ skip_corners= true
1420
+ );
1376
1421
}
1377
1422
}
1378
1423
@@ -1388,7 +1433,7 @@ module sideButtonHoles() {
1388
1433
panel_border_left + case_inner_padding_left + side_button_base + side_button_extrude,
1389
1434
side_button_width + side_button_hole_gap * 2 ,
1390
1435
side_button_height + side_button_hole_gap * 2 ,
1391
- min (side_button_height / 2 - 0.01 , fillet_radius )
1436
+ min (side_button_height / 2 - 0.01 , fillet_radius_in_use )
1392
1437
);
1393
1438
}
1394
1439
@@ -1403,7 +1448,7 @@ module sideButtonHoles() {
1403
1448
panel_border_right + case_inner_padding_right + side_button_base + side_button_extrude,
1404
1449
side_button_width + side_button_hole_gap * 2 ,
1405
1450
side_button_height + side_button_hole_gap * 2 ,
1406
- min (side_button_height / 2 - 0.01 , fillet_radius )
1451
+ min (side_button_height / 2 - 0.01 , fillet_radius_in_use )
1407
1452
);
1408
1453
}
1409
1454
@@ -1418,7 +1463,7 @@ module sideButtonHoles() {
1418
1463
side_button_width + side_button_hole_gap * 2 ,
1419
1464
panel_border_top + case_inner_padding_top + side_button_base + side_button_extrude,
1420
1465
side_button_height + side_button_hole_gap * 2 ,
1421
- min (side_button_height / 2 - 0.01 , fillet_radius )
1466
+ min (side_button_height / 2 - 0.01 , fillet_radius_in_use )
1422
1467
);
1423
1468
}
1424
1469
@@ -1433,7 +1478,7 @@ module sideButtonHoles() {
1433
1478
side_button_width + side_button_hole_gap * 2 ,
1434
1479
panel_border_bottom + case_inner_padding_bottom + side_button_base + side_button_extrude,
1435
1480
side_button_height + side_button_hole_gap * 2 ,
1436
- min (side_button_height / 2 - 0.01 , fillet_radius )
1481
+ min (side_button_height / 2 - 0.01 , fillet_radius_in_use )
1437
1482
);
1438
1483
}
1439
1484
}
@@ -1451,7 +1496,7 @@ module sideButtons() {
1451
1496
side_button_width,
1452
1497
side_button_height,
1453
1498
side_button_base + side_button_extrude + panel_border_left + case_inner_padding_left,
1454
- min (side_button_height / 2 - 0.01 , fillet_radius )
1499
+ min (side_button_height / 2 - 0.01 , fillet_radius_in_use )
1455
1500
);
1456
1501
1457
1502
translate ([
@@ -1478,7 +1523,7 @@ module sideButtons() {
1478
1523
side_button_width,
1479
1524
side_button_height,
1480
1525
side_button_base + side_button_extrude + panel_border_right + case_inner_padding_right,
1481
- min (side_button_height / 2 - 0.01 , fillet_radius )
1526
+ min (side_button_height / 2 - 0.01 , fillet_radius_in_use )
1482
1527
);
1483
1528
1484
1529
translate ([
@@ -1505,7 +1550,7 @@ module sideButtons() {
1505
1550
side_button_width,
1506
1551
side_button_height,
1507
1552
side_button_base + side_button_extrude + panel_border_top + case_inner_padding_top,
1508
- min (side_button_height / 2 - 0.01 , fillet_radius )
1553
+ min (side_button_height / 2 - 0.01 , fillet_radius_in_use )
1509
1554
);
1510
1555
1511
1556
translate ([
@@ -1532,7 +1577,7 @@ module sideButtons() {
1532
1577
side_button_width,
1533
1578
side_button_height,
1534
1579
side_button_base + side_button_extrude + panel_border_bottom + case_inner_padding_bottom,
1535
- min (side_button_height / 2 - 0.01 , fillet_radius )
1580
+ min (side_button_height / 2 - 0.01 , fillet_radius_in_use )
1536
1581
);
1537
1582
1538
1583
translate ([
0 commit comments