Skip to content

Commit

Permalink
4" displays
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra committed Feb 2, 2025
1 parent f3c8158 commit db03617
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 15 deletions.
20 changes: 10 additions & 10 deletions cases/case1.scad
Original file line number Diff line number Diff line change
Expand Up @@ -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 =[
Expand Down Expand Up @@ -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 =[
Expand All @@ -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([
Expand All @@ -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,
])
Expand All @@ -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([
Expand Down
5 changes: 2 additions & 3 deletions cases/waveshare.10in3.scad
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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]
Expand Down
75 changes: 75 additions & 0 deletions cases/waveshare.4in01f.desk.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// Minimal overrides for Waveshare 7.3" E case
include <case1.scad>;

/* [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;
71 changes: 71 additions & 0 deletions cases/waveshare.4in0e.desk.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// Minimal overrides for Waveshare 7.3" E case
include <case1.scad>;

/* [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;
3 changes: 2 additions & 1 deletion cases/waveshare.7in3e.scad
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion cases/waveshare.7in5.scad
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit db03617

Please sign in to comment.