@@ -195,6 +195,10 @@ sd_card_in_leg_side = "left"; // [left, right]
195195sd_card_in_leg_side_side = "left" ; // [left, right]
196196sd_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] */
199203rear_cooling = false ;
200204rear_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
0 commit comments