Skip to content

Commit 0b106c0

Browse files
committed
imporve pinholes
1 parent d4b34eb commit 0b106c0

File tree

4 files changed

+112
-75
lines changed

4 files changed

+112
-75
lines changed

cases/case1.scad

Lines changed: 95 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ case_inner_padding_bottom = 4;
3939

4040
/* [Case dimensions] */
4141

42-
// How round to make the case
43-
// fillet_radius = 0;
42+
// How round to make the case. Disabled if thick_border=true
4443
fillet_radius = 2.5;
4544

4645
// Panel cover thickness
@@ -167,17 +166,17 @@ usb_cutout_box_height = 50;
167166
usb_cutout_box_depth = 7;
168167
usb_cutout_left_wall_thickness = 1.4;
169168
usb_cutout_right_wall_thickness = 1.4;
170-
usb_cutout_top_wall_thickness = 1.4;
171169
usb_cutout_bottom_wall_thickness = 1.4;
172170
usb_cutout_back_wall_thickness = 0.8;
173171
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;
177176
// 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;
181180

182181
/* [Hanging hole] */
183182

@@ -214,7 +213,9 @@ rear_cooling_offset = 5;
214213

215214
/* [Raspberry Pi Zero Pinholes] */
216215
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]
218219
pi_pinholes_x_percentage = 5.5;
219220
pi_pinholes_y_percentage = 15;
220221
pi_pinholes_diameter = 2.5;
@@ -268,6 +269,8 @@ frame_full_depth = panel_depth
268269
+ case_depth
269270
+ back_depth;
270271

272+
fillet_radius_in_use = thick_border ? 0 : fillet_radius;
273+
271274
kickstand_height = frame_full_height * kickstand_height_percentage / 100;
272275
kickstand_full_width = kickstand_width + 2 * kickstand_wall_thickness + 2 * kickstand_gap_thickness;
273276
kickstand_leg_full_width = kickstand_leg_width + 2 * kickstand_wall_thickness + 2 * kickstand_gap_thickness;
@@ -893,6 +896,11 @@ module case() {
893896
rearCooling();
894897
}
895898

899+
if (pi_pinholes && pi_pinholes_cooling) {
900+
color(case_color)
901+
piPinholesCooling();
902+
}
903+
896904
color(case_color)
897905
sideButtonHoles();
898906
}
@@ -1154,7 +1162,7 @@ module caseWithKickstand() {
11541162
/*****************************************************************************/
11551163

11561164

1157-
module filletBox(x, y, z, r = fillet_radius, fn=64) {
1165+
module filletBox(x, y, z, r = fillet_radius_in_use, fn=64) {
11581166
// Optional sanity check (warn if the fillet is too large):
11591167
if (x < 2*r || y < 2*r || z < 2*r) {
11601168
echo("WARNING: fillet radius is too large for box dimensions!");
@@ -1173,52 +1181,52 @@ module filletBox(x, y, z, r = fillet_radius, fn=64) {
11731181
}
11741182
}
11751183

1176-
module filletBoxTop(x, y, z, r = fillet_radius, fn=64) {
1184+
module filletBoxTop(x, y, z, r = fillet_radius_in_use, fn=64) {
11771185
intersection() {
11781186
cube([x, y, z]);
11791187
filletBox(x, y, z * 2, r, fn);
11801188
}
11811189
}
11821190

1183-
module filletBoxMiddle(x, y, z, r = fillet_radius, fn=64) {
1191+
module filletBoxMiddle(x, y, z, r = fillet_radius_in_use, fn=64) {
11841192
intersection() {
11851193
cube([x, y, z]);
11861194
translate([0, 0, -z])
11871195
filletBox(x, y, z * 3, r, fn);
11881196
}
11891197
}
11901198

1191-
module filletBoxBottom(x, y, z, r = fillet_radius, fn=64) {
1199+
module filletBoxBottom(x, y, z, r = fillet_radius_in_use, fn=64) {
11921200
intersection() {
11931201
cube([x, y, z]);
11941202
translate([0, 0, -z])
11951203
filletBox(x, y, z * 2, r, fn);
11961204
}
11971205
}
11981206

1199-
module filletBoxLeft(x, y, z, r = fillet_radius, fn=64) {
1207+
module filletBoxLeft(x, y, z, r = fillet_radius_in_use, fn=64) {
12001208
intersection() {
12011209
cube([x, y, z]);
12021210
filletBox(x * 2, y, z, r, fn);
12031211
}
12041212
}
12051213

1206-
module filletBoxRight(x, y, z, r = fillet_radius, fn=64) {
1214+
module filletBoxRight(x, y, z, r = fillet_radius_in_use, fn=64) {
12071215
intersection() {
12081216
cube([x, y, z]);
12091217
translate([-x, 0, 0])
12101218
filletBox(x * 2, y, z, r, fn);
12111219
}
12121220
}
12131221

1214-
module filletBoxUp(x, y, z, r = fillet_radius, fn=64) {
1222+
module filletBoxUp(x, y, z, r = fillet_radius_in_use, fn=64) {
12151223
intersection() {
12161224
cube([x, y, z]);
12171225
filletBox(x, y * 2, z, r, fn);
12181226
}
12191227
}
12201228

1221-
module filletBoxDown(x, y, z, r = fillet_radius, fn=64) {
1229+
module filletBoxDown(x, y, z, r = fillet_radius_in_use, fn=64) {
12221230
intersection() {
12231231
cube([x, y, z]);
12241232
translate([0, -y, 0])
@@ -1338,41 +1346,78 @@ module sdCardAdapterBase() {
13381346
}
13391347
}
13401348

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+
13411370
// Draw tiny holes into the back panel for cooling
13421371
module rearCooling() {
13431372
rear_cooling_x_start = rear_cooling_x_start_percentage / 100 * frame_full_width;
13441373
rear_cooling_x_end = rear_cooling_x_end_percentage / 100 * frame_full_width;
13451374
rear_cooling_y_start = rear_cooling_y_start_percentage / 100 * frame_full_height;
13461375
rear_cooling_y_end = rear_cooling_y_end_percentage / 100 * frame_full_height;
13471376

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);
13521403
}
13531404
}
13541405
}
13551406

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+
);
13761421
}
13771422
}
13781423

@@ -1388,7 +1433,7 @@ module sideButtonHoles() {
13881433
panel_border_left + case_inner_padding_left + side_button_base + side_button_extrude,
13891434
side_button_width + side_button_hole_gap * 2,
13901435
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)
13921437
);
13931438
}
13941439

@@ -1403,7 +1448,7 @@ module sideButtonHoles() {
14031448
panel_border_right + case_inner_padding_right + side_button_base + side_button_extrude,
14041449
side_button_width + side_button_hole_gap * 2,
14051450
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)
14071452
);
14081453
}
14091454

@@ -1418,7 +1463,7 @@ module sideButtonHoles() {
14181463
side_button_width + side_button_hole_gap * 2,
14191464
panel_border_top + case_inner_padding_top + side_button_base + side_button_extrude,
14201465
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)
14221467
);
14231468
}
14241469

@@ -1433,7 +1478,7 @@ module sideButtonHoles() {
14331478
side_button_width + side_button_hole_gap * 2,
14341479
panel_border_bottom + case_inner_padding_bottom + side_button_base + side_button_extrude,
14351480
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)
14371482
);
14381483
}
14391484
}
@@ -1451,7 +1496,7 @@ module sideButtons() {
14511496
side_button_width,
14521497
side_button_height,
14531498
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)
14551500
);
14561501

14571502
translate([
@@ -1478,7 +1523,7 @@ module sideButtons() {
14781523
side_button_width,
14791524
side_button_height,
14801525
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)
14821527
);
14831528

14841529
translate([
@@ -1505,7 +1550,7 @@ module sideButtons() {
15051550
side_button_width,
15061551
side_button_height,
15071552
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)
15091554
);
15101555

15111556
translate([
@@ -1532,7 +1577,7 @@ module sideButtons() {
15321577
side_button_width,
15331578
side_button_height,
15341579
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)
15361581
);
15371582

15381583
translate([

cases/waveshare.13in3e.scad

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ case_center_support_vertical = false;
4848
case_center_support_horizontal = false;
4949

5050
/* [Kickstand] */
51-
kickstand = true;
51+
kickstand = false;
5252
kickstand_width = 115;
5353
kickstand_height_percentage = 74;
5454
kickstand_leg_bridge_offset_percentage = 14;
@@ -59,13 +59,6 @@ kickstand_depth = 6.7;
5959
/* [USB cutout] */
6060
usb_cutout = true;
6161
usb_cutout_box_depth = 6.5;
62-
63-
// // Vertical hole
64-
// usb_cutout_offset_x_percentage = 10;
65-
// usb_cutout_offset_y_percentage = 18;
66-
// usb_cutout_box_height = 55;
67-
68-
// Horizontal hole
6962
usb_cutout_offset_x_percentage = 50;
7063
usb_cutout_offset_y_percentage = 50;
7164
usb_cutout_box_width = 20;
@@ -87,17 +80,17 @@ sd_card_in_usb_cutout_side = "left"; // [left, right]
8780
sd_card_in_usb_cutout_y_percentage = 80;
8881

8982
/* [Rear cooling] */
90-
rear_cooling = true;
91-
rear_cooling_x_start_percentage = 41.2;
83+
rear_cooling = false;
84+
rear_cooling_x_start_percentage = 41.7;
9285
rear_cooling_x_end_percentage = 58;
9386
rear_cooling_y_start_percentage = 73.6;
9487
rear_cooling_y_end_percentage = 81;
9588

9689
/* [Raspberry Pi Zero Pinholes] */
9790
pi_pinholes = true;
98-
pi_pinholes_ordientation = "horizontal"; // [horizontal, vertical]
99-
pi_pinholes_x_percentage = 40;
100-
pi_pinholes_y_percentage = 72;
91+
pi_pinholes_orientation = "horizontal"; // [horizontal, vertical]
92+
pi_pinholes_x_percentage = 50;
93+
pi_pinholes_y_percentage = 85;
10194

10295
/* [Side buttons] */
10396
side_buttons_left = [];

cases/waveshare.7in3e.scad

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ usb_cutout = true;
6464
usb_cutout_offset_x_percentage = 92;
6565
usb_cutout_offset_y_percentage = 70;
6666
usb_cutout_box_depth = 6.4;
67-
usb_cutout_hole_height = 5.8;
68-
usb_cutout_hole_width = 14;
67+
// usb_cutout_hole_height = 5.8;
68+
// usb_cutout_hole_width = 14;
6969

7070
/* [Hanging hole] */
7171
hanging_hole = true;
@@ -77,18 +77,11 @@ sd_card_in_leg_side = "left"; // [left, right]
7777
sd_card_in_leg_side_side = "left"; // [left, right]
7878
sd_card_in_leg_y_percentage = 74;
7979

80-
/* [Rear cooling] */
81-
rear_cooling = true;
82-
rear_cooling_x_start_percentage = 6.3;
83-
rear_cooling_x_end_percentage = 20;
84-
rear_cooling_y_start_percentage = 18;
85-
rear_cooling_y_end_percentage = 60;
86-
8780
/* [Raspberry Pi Zero Pinholes] */
8881
pi_pinholes = true;
89-
pi_pinholes_ordientation = "vertical"; // [horizontal, vertical]
90-
pi_pinholes_x_percentage = 5.5;
91-
pi_pinholes_y_percentage = 15;
82+
pi_pinholes_orientation = "vertical"; // [horizontal, vertical]
83+
pi_pinholes_x_percentage = 6.2;
84+
pi_pinholes_y_percentage = 29;
9285

9386
/* [Side buttons] */
9487
side_buttons_left = [];

0 commit comments

Comments
 (0)