diff --git a/cases/case1.scad b/cases/case1.scad index 3bcc024..981016c 100644 --- a/cases/case1.scad +++ b/cases/case1.scad @@ -537,8 +537,8 @@ module case() { if (usb_cutout) { cubeWithAngledTopBottom( loc=[ - frame_full_width * usb_cutout_offset_x_percentage / 100, - frame_full_height * usb_cutout_offset_y_percentage / 100, + (frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2) * usb_cutout_offset_x_percentage / 100, + (frame_full_height - usb_cutout_box_height - usb_cutout_box_wall_thickness * 2) * usb_cutout_offset_y_percentage / 100, back_depth + case_depth - (usb_cutout_box_depth + usb_cutout_box_wall_thickness), ], size =[ @@ -592,8 +592,8 @@ module case() { // Cutout into box cubeWithAngledTopBottom( loc=[ - frame_full_width * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness, - frame_full_height * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness, + (frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2) * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness, + (frame_full_height - usb_cutout_box_height - usb_cutout_box_wall_thickness * 2) * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness, back_depth + case_depth - usb_cutout_box_depth, ], size =[ @@ -608,9 +608,9 @@ module case() { // Hole into what's remaining if (usb_cutout_hole_position == "left" || usb_cutout_hole_position == "right") { translate([ - frame_full_width * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness - usb_cutout_box_wall_thickness - 0.11 + (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 + (usb_cutout_hole_position == "right" ? usb_cutout_box_width + usb_cutout_box_wall_thickness : 0), - frame_full_height * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness + (usb_cutout_box_height - usb_cutout_hole_width) / 2, + (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, back_depth + case_depth - usb_cutout_box_depth + (usb_cutout_box_depth - usb_cutout_hole_height) / 2, ]) cube([ @@ -620,8 +620,8 @@ module case() { ]); } else if (usb_cutout_hole_position == "top" || usb_cutout_hole_position == "bottom") { translate([ - frame_full_width * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness + (usb_cutout_box_width - usb_cutout_hole_width) / 2, - frame_full_height * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness - usb_cutout_box_wall_thickness - 0.11 + (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, + (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_hole_position == "bottom" ? usb_cutout_box_height + usb_cutout_box_wall_thickness : 0), back_depth + case_depth - usb_cutout_box_depth + (usb_cutout_box_depth - usb_cutout_hole_height) / 2, ]) @@ -632,8 +632,8 @@ module case() { ]); } else if (usb_cutout_hole_position == "back") { translate([ - frame_full_width * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness + (usb_cutout_box_width - usb_cutout_hole_width) / 2, - 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, + (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, + (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, back_depth + case_depth - usb_cutout_box_depth - usb_cutout_box_wall_thickness - 0.11, ]) cube([ diff --git a/cases/waveshare.10in3.scad b/cases/waveshare.10in3.scad index bf6fbf4..7c14160 100644 --- a/cases/waveshare.10in3.scad +++ b/cases/waveshare.10in3.scad @@ -56,7 +56,7 @@ kickstand_leg_bridge_offset_percentage = 5; /* [USB cutout] */ usb_cutout = true; -usb_cutout_offset_x_percentage = 10; +usb_cutout_offset_x_percentage = 8; usb_cutout_offset_y_percentage = 12; usb_cutout_box_width = 70; usb_cutout_box_height = 20; @@ -66,10 +66,9 @@ usb_cutout_hole_position = "right"; // [top, bottom, left, right] usb_cutout_hole_width = 14; usb_cutout_hole_height = 6.0; - /* [Hanging hole] */ hanging_hole = true; -hanging_hole_offset = 50; +hanging_hole_offset = 30; /* [Debug] */ cross_section_percentage = 0; // [0:100] diff --git a/cases/waveshare.4in01f.desk.scad b/cases/waveshare.4in01f.desk.scad new file mode 100644 index 0000000..cd5f111 --- /dev/null +++ b/cases/waveshare.4in01f.desk.scad @@ -0,0 +1,75 @@ +// Minimal overrides for Waveshare 7.3" E case +include ; + +/* [View Settings] */ +view_mode="print_horizontal"; // [print_vertical, print_horizontal, stacked] + +/* [Panel dimensions] */ +panel_width = 69.7; +panel_height = 98.5; +panel_depth = 6.8; + +panel_bezel_left = 10.5; +panel_bezel_right = 6.5; +panel_bezel_top = 6.5; +panel_bezel_bottom = 6.5; + +/* [Border and inner padding] */ +panel_border_right = 6.0; +panel_border_left = 3.0; +panel_border_top = 6.0; +panel_border_bottom = 6.0; + +case_inner_padding_left = 2.0; +case_inner_padding_right = 2.0; +case_inner_padding_top = 2.0; +case_inner_padding_bottom = 1.0; + +/* [Cable gap] */ +panel_cable_gap_right = 30; +panel_cable_gap_size = 0.8; // How into the border to cut + +/* [Case depth] */ +case_depth = 6.0; + +/* [Screws] */ +screw_offset_left = 4.0; +screw_offset_right = 4.0; +screw_offset_top = 4.0; +screw_offset_bottom = 4.0; + +extra_screws_top = [0, 0, 0, 0, 0]; +extra_screws_bottom = [0, 0, 0, 0, 0]; +extra_screws_left = [0, 0, 0, 0, 0]; +extra_screws_right = [0, 0, 0, 0, 0]; + +/* [Center support] */ +case_center_support_vertical = false; +case_center_support_horizontal = false; + +/* [Kickstand] */ +kickstand = true; +kickstand_width = 64; +kickstand_leg_width = 6; +kickstand_leg_bridge_height = 7; +kickstand_leg_bridge_offset_percentage = 0; +kickstand_depth = 6.7; + +/* [USB cutout] */ +usb_cutout = true; +usb_cutout_hole_position = "back"; // [top, bottom, left, right, back] +usb_cutout_offset_x_percentage = 50; +usb_cutout_offset_y_percentage = 82; +usb_cutout_box_width = 17; +usb_cutout_box_height = 11; +usb_cutout_box_depth = 2.2; +usb_cutout_hole_height = 5.8; + +/* [Hanging hole] */ +hanging_hole = false; +hanging_hole_offset = 4; + +/* [Debug] */ +cross_section_percentage = 0; // [0:100] +vertical_print_scale = 1.004; // 0.4mm shrinkage for every 100mm +kickstand_rotation = 0; diff --git a/cases/waveshare.4in0e.desk.scad b/cases/waveshare.4in0e.desk.scad new file mode 100644 index 0000000..f456a9a --- /dev/null +++ b/cases/waveshare.4in0e.desk.scad @@ -0,0 +1,71 @@ +// Minimal overrides for Waveshare 7.3" E case +include ; + +/* [View Settings] */ +view_mode="print_horizontal"; // [print_vertical, print_horizontal, stacked] + +/* [Panel dimensions] */ +panel_width = 67.8; +panel_height = 101.1; +panel_depth = 6.8; + +panel_bezel_left = 6.2; +panel_bezel_right = 6.2; +panel_bezel_top = 6.2; +panel_bezel_bottom = 10.8; + +/* [Border and inner padding] */ +panel_border_left = 6.6; +panel_border_right = 6.6; +panel_border_top = 6.6; +panel_border_bottom = 2.0; + +case_inner_padding_left = 2.0; +case_inner_padding_right = 2.0; +case_inner_padding_top = 2.0; +case_inner_padding_bottom = 2.0; + +/* [Case depth] */ +case_depth = 6.0; + +/* [Screws] */ +screw_offset_left = 4.2; +screw_offset_right = 4.2; +screw_offset_top = 4.2; +screw_offset_bottom = 4.2; + +extra_screws_top = [0, 0, 0, 0, 0]; +extra_screws_bottom = [0, 0, 0, 0, 0]; +extra_screws_left = [0, 0, 0, 0, 0]; +extra_screws_right = [0, 0, 0, 0, 0]; + +/* [Center support] */ +case_center_support_vertical = false; +case_center_support_horizontal = false; + +/* [Kickstand] */ +kickstand = true; +kickstand_width = 64; +kickstand_leg_width = 6; +kickstand_leg_bridge_height = 7; +kickstand_leg_bridge_offset_percentage = 0; +kickstand_depth = 6.7; + +/* [USB cutout] */ +usb_cutout = true; +usb_cutout_hole_position = "back"; // [top, bottom, left, right, back] +usb_cutout_offset_x_percentage = 50; +usb_cutout_offset_y_percentage = 82; +usb_cutout_box_width = 17; +usb_cutout_box_height = 11; +usb_cutout_box_depth = 2.2; +usb_cutout_hole_height = 5.8; + +/* [Hanging hole] */ +hanging_hole = false; +hanging_hole_offset = 4; + +/* [Debug] */ +cross_section_percentage = 0; // [0:100] +vertical_print_scale = 1.004; // 0.4mm shrinkage for every 100mm +kickstand_rotation = 0; diff --git a/cases/waveshare.7in3e.scad b/cases/waveshare.7in3e.scad index febb425..46d703b 100644 --- a/cases/waveshare.7in3e.scad +++ b/cases/waveshare.7in3e.scad @@ -60,7 +60,8 @@ kickstand_depth = 6.7; /* [USB cutout] */ usb_cutout = true; -usb_cutout_offset_y_percentage = 28; +usb_cutout_offset_x_percentage = 92; +usb_cutout_offset_y_percentage = 50; usb_cutout_box_depth = 6.4; usb_cutout_hole_height = 5.8; diff --git a/cases/waveshare.7in5.scad b/cases/waveshare.7in5.scad index d8c0fc3..5d3cd7e 100644 --- a/cases/waveshare.7in5.scad +++ b/cases/waveshare.7in5.scad @@ -60,7 +60,8 @@ kickstand_depth = 6.7; /* [USB cutout] */ usb_cutout = true; -usb_cutout_offset_y_percentage = 28; +usb_cutout_offset_x_percentage = 92; +usb_cutout_offset_y_percentage = 50; usb_cutout_box_depth = 6.4; usb_cutout_hole_height = 5.8;