@@ -537,8 +537,8 @@ module case() {
537537 if (usb_cutout) {
538538 cubeWithAngledTopBottom(
539539 loc= [
540- frame_full_width * usb_cutout_offset_x_percentage / 100 ,
541- frame_full_height * usb_cutout_offset_y_percentage / 100 ,
540+ ( frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_x_percentage / 100 ,
541+ ( frame_full_height - usb_cutout_box_height - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_y_percentage / 100 ,
542542 back_depth + case_depth - (usb_cutout_box_depth + usb_cutout_box_wall_thickness),
543543 ],
544544 size = [
@@ -592,8 +592,8 @@ module case() {
592592 // Cutout into box
593593 cubeWithAngledTopBottom(
594594 loc= [
595- frame_full_width * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness,
596- frame_full_height * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness,
595+ ( frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness,
596+ ( frame_full_height - usb_cutout_box_height - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness,
597597 back_depth + case_depth - usb_cutout_box_depth,
598598 ],
599599 size = [
@@ -608,9 +608,9 @@ module case() {
608608 // Hole into what's remaining
609609 if (usb_cutout_hole_position == "left" || usb_cutout_hole_position == "right" ) {
610610 translate ([
611- frame_full_width * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness - usb_cutout_box_wall_thickness - 0.11
611+ ( frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness - usb_cutout_box_wall_thickness - 0.11
612612 + (usb_cutout_hole_position == "right" ? usb_cutout_box_width + usb_cutout_box_wall_thickness : 0 ),
613- frame_full_height * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness + (usb_cutout_box_height - usb_cutout_hole_width) / 2 ,
613+ ( frame_full_height - usb_cutout_box_height - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness + (usb_cutout_box_height - usb_cutout_hole_width) / 2 ,
614614 back_depth + case_depth - usb_cutout_box_depth + (usb_cutout_box_depth - usb_cutout_hole_height) / 2 ,
615615 ])
616616 cube ([
@@ -620,8 +620,8 @@ module case() {
620620 ]);
621621 } else if (usb_cutout_hole_position == "top" || usb_cutout_hole_position == "bottom" ) {
622622 translate ([
623- frame_full_width * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness + (usb_cutout_box_width - usb_cutout_hole_width) / 2 ,
624- frame_full_height * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness - usb_cutout_box_wall_thickness - 0.11
623+ ( frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness + (usb_cutout_box_width - usb_cutout_hole_width) / 2 ,
624+ ( frame_full_height - usb_cutout_box_height - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness - usb_cutout_box_wall_thickness - 0.11
625625 + (usb_cutout_hole_position == "bottom" ? usb_cutout_box_height + usb_cutout_box_wall_thickness : 0 ),
626626 back_depth + case_depth - usb_cutout_box_depth + (usb_cutout_box_depth - usb_cutout_hole_height) / 2 ,
627627 ])
@@ -632,8 +632,8 @@ module case() {
632632 ]);
633633 } else if (usb_cutout_hole_position == "back" ) {
634634 translate ([
635- frame_full_width * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness + (usb_cutout_box_width - usb_cutout_hole_width) / 2 ,
636- frame_full_height * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness - usb_cutout_box_wall_thickness - 0.11 + (usb_cutout_box_height - usb_cutout_hole_height) / 2 + usb_cutout_box_wall_thickness,
635+ ( frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness + (usb_cutout_box_width - usb_cutout_hole_width) / 2 ,
636+ ( frame_full_height - usb_cutout_box_height - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness - usb_cutout_box_wall_thickness - 0.11 + (usb_cutout_box_height - usb_cutout_hole_height) / 2 + usb_cutout_box_wall_thickness,
637637 back_depth + case_depth - usb_cutout_box_depth - usb_cutout_box_wall_thickness - 0.11 ,
638638 ])
639639 cube ([
0 commit comments