Skip to content

Commit 7f2082f

Browse files
committed
sd card in usb cutout
1 parent 3e25d96 commit 7f2082f

File tree

2 files changed

+41
-12
lines changed

2 files changed

+41
-12
lines changed

cases/case1.scad

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ sd_card_in_leg_side = "left"; // [left, right]
195195
sd_card_in_leg_side_side = "left"; // [left, right]
196196
sd_card_in_leg_y_percentage = 75.5;
197197

198+
sd_card_in_usb_cutout = false;
199+
sd_card_in_usb_cutout_side = "right"; // [left, right]
200+
sd_card_in_usb_cutout_y_percentage = 75.5;
201+
198202
/* [Rear cooling] */
199203
rear_cooling = false;
200204
rear_cooling_x_start_percentage = 6.1;
@@ -281,6 +285,14 @@ hanging_hole_y = hanging_hole_edge == "top"
281285
? frame_full_height - hanging_hole_offset - hanging_hole_box_height
282286
: (frame_full_height - hanging_hole_box_width) / 2;
283287

288+
usb_cutout_x = (frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2) * usb_cutout_offset_x_percentage / 100;
289+
usb_cutout_y = (frame_full_height - usb_cutout_box_height - usb_cutout_box_wall_thickness * 2) * usb_cutout_offset_y_percentage / 100;
290+
291+
usb_sd_card_x_position = (sd_card_in_usb_cutout_side == "left" ? usb_cutout_x + 0.11 : usb_cutout_x - 0.11) +
292+
(sd_card_in_usb_cutout_side == "left" ? 0 : usb_cutout_box_width);
293+
usb_sd_card_y_position = usb_cutout_y + 12 + sd_card_in_usb_cutout_y_percentage / 100 * (usb_cutout_box_height -24);
294+
295+
284296
/*****************************************************************************/
285297
/* Utility: Corner Screw Hole Positions */
286298
/*****************************************************************************/
@@ -638,18 +650,25 @@ module case() {
638650
color(case_color)
639651
cubeWithAngledTopBottom(
640652
loc=[
641-
(frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2) * usb_cutout_offset_x_percentage / 100,
642-
(frame_full_height - usb_cutout_box_height - usb_cutout_box_wall_thickness * 2) * usb_cutout_offset_y_percentage / 100,
653+
usb_cutout_x,
654+
usb_cutout_y,
643655
back_depth + case_depth - (usb_cutout_box_depth + usb_cutout_back_wall_thickness),
644656
],
645-
size =[
657+
size=[
646658
usb_cutout_box_width + usb_cutout_box_wall_thickness * 2,
647659
usb_cutout_box_height + usb_cutout_box_wall_thickness * 2,
648660
usb_cutout_box_depth + usb_cutout_back_wall_thickness
649661
],
650662
top=(view_mode=="print_vertical" && usb_cutout_hole_position != "top") || usb_cutout_hole_position == "back",
651663
bottom=(view_mode=="print_vertical" && usb_cutout_hole_position != "bottom") || usb_cutout_hole_position == "back"
652664
);
665+
666+
if (sd_card_in_usb_cutout) {
667+
color(case_color)
668+
translate([usb_sd_card_x_position, usb_sd_card_y_position, 0])
669+
rotate([0, 0, sd_card_in_usb_cutout_side == "left" ? 90 : -90])
670+
sdCardAdapterBase();
671+
}
653672
}
654673
if (hanging_hole) {
655674
color(case_color)
@@ -729,8 +748,8 @@ module case() {
729748
color(case_color)
730749
cubeWithLeftRightGapBridge(
731750
loc=[
732-
(frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2) * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness,
733-
(frame_full_height - usb_cutout_box_height - usb_cutout_box_wall_thickness * 2) * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness,
751+
usb_cutout_x + usb_cutout_box_wall_thickness,
752+
usb_cutout_y + usb_cutout_box_wall_thickness,
734753
back_depth + case_depth - usb_cutout_box_depth,
735754
],
736755
size=[
@@ -742,6 +761,13 @@ module case() {
742761
bottom=(view_mode=="print_vertical" && usb_cutout_hole_position != "bottom") || usb_cutout_hole_position == "back"
743762
);
744763

764+
if (sd_card_in_usb_cutout) {
765+
color(case_color)
766+
translate([usb_sd_card_x_position + usb_cutout_box_wall_thickness, usb_sd_card_y_position, 0])
767+
rotate([0, 0, sd_card_in_usb_cutout_side == "left" ? 90 : -90])
768+
sdCardAdapterCutout();
769+
}
770+
745771
// Hole into what's remaining
746772
if (usb_cutout_hole_position == "left" || usb_cutout_hole_position == "right") {
747773
color(case_color)
@@ -781,7 +807,6 @@ module case() {
781807
usb_cutout_hole_height,
782808
usb_cutout_back_wall_thickness + 0.22,
783809
]);
784-
785810
}
786811
}
787812

cases/waveshare.13in3e.scad

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,33 +67,37 @@ usb_cutout_box_depth = 6.5;
6767

6868
// Horizontal hole
6969
usb_cutout_offset_x_percentage = 50;
70-
usb_cutout_offset_y_percentage = 60;
70+
usb_cutout_offset_y_percentage = 50;
7171
usb_cutout_box_width = 20;
7272
usb_cutout_box_height = 55;
7373
usb_cutout_hole_position = "top"; // [top, bottom, left, right, back]
7474

7575
/* [Hanging hole] */
7676
hanging_hole = true;
77-
hanging_hole_offset = 70;
77+
hanging_hole_offset = 50;
7878

7979
/* [SD card adapter cutout] */
80-
sd_card_in_leg = true;
80+
sd_card_in_leg = false;
8181
sd_card_in_leg_side = "left"; // [left, right]
8282
sd_card_in_leg_side_side = "left"; // [left, right]
8383
sd_card_in_leg_y_percentage = 82.0;
8484

85+
sd_card_in_usb_cutout = true;
86+
sd_card_in_usb_cutout_side = "left"; // [left, right]
87+
sd_card_in_usb_cutout_y_percentage = 80;
88+
8589
/* [Rear cooling] */
8690
rear_cooling = true;
8791
rear_cooling_x_start_percentage = 41.2;
8892
rear_cooling_x_end_percentage = 58;
89-
rear_cooling_y_start_percentage = 13.6;
90-
rear_cooling_y_end_percentage = 21;
93+
rear_cooling_y_start_percentage = 73.6;
94+
rear_cooling_y_end_percentage = 81;
9195

9296
/* [Raspberry Pi Zero Pinholes] */
9397
pi_pinholes = true;
9498
pi_pinholes_ordientation = "horizontal"; // [horizontal, vertical]
9599
pi_pinholes_x_percentage = 40;
96-
pi_pinholes_y_percentage = 12;
100+
pi_pinholes_y_percentage = 72;
97101

98102
/* [Side buttons] */
99103
side_buttons_left = [];

0 commit comments

Comments
 (0)