Browse Source

Add EPD_ANGLE param; rotate epd_case about its Y+Z- edge

Introduces EPD_ANGLE (default 30°) in params.scad. In lid.scad the
epd_case pivots about the Y+/Z- edge (FLANGE_H+LID_T on the ceiling
top surface) so the housing stays entirely above the lid at any angle.
Ceiling plate is now always rendered regardless of EPD_IS_LID.
ZiB 4 months ago
parent
commit
0414fd46d9
2 changed files with 13 additions and 17 deletions
  1. 12 17
      lid.scad
  2. 1 0
      params.scad

+ 12 - 17
lid.scad

@@ -106,17 +106,14 @@ module lid() {
   color("#004B49")
   difference() {
     union() {
-      if (!EPD_IS_LID)
-        // Flat ceiling plate — test fit without epd_case geometry
-        translate([0, -WALL, FLANGE_H])
-          rounded_box(OUT_L, OUT_W, LID_T, CORNER_R);
-      else
-        translate([
-          OUT_L/2 - epd_case_w/2,
-          OUT_W - epd_case_d - WALL,
-          LID_T
-        ])
-          epd_case();
+      // Flat ceiling plate — always rendered
+      translate([0, -WALL, FLANGE_H])
+        rounded_box(OUT_L, OUT_W, LID_T, CORNER_R);
+      if (EPD_IS_LID)
+        translate([OUT_L/2 - epd_case_w/2, OUT_W - WALL, FLANGE_H + LID_T])
+          rotate([-EPD_ANGLE, 0, 0])
+            translate([0, -epd_case_d, 0])
+              epd_case();
 
       // Y- lip — same rounded_box profile clipped to the Y- wall zone so the
       // lip corners match the base exterior corners
@@ -137,12 +134,10 @@ module lid() {
 
   // Display mockup — seated inside epd_case, preview only
   if ($preview && EPD_IS_LID && SHOW_DISP)
-    translate([
-      OUT_L/2 - epd_case_w/2 + WALL + TOL,
-      OUT_W - epd_case_d - WALL + BEZEL_Y,
-      LID_T + WALL
-    ])
-      GDEY0583T81(fpc_bend_start=0, fpc_bend_r=FPC_BEND_R, fpc_post_clip=2);
+    translate([OUT_L/2 - epd_case_w/2, OUT_W - WALL, FLANGE_H + LID_T])
+      rotate([-EPD_ANGLE, 0, 0])
+        translate([WALL + TOL, -epd_case_d + BEZEL_Y, WALL])
+          GDEY0583T81(fpc_bend_start=0, fpc_bend_r=FPC_BEND_R, fpc_post_clip=2);
 
   // FPC adapter — bosses always (structural); PCB/connectors shown only in $preview.
   // rotate([0,180,0]) flips Z without disturbing ±Y connector exits; +_adpt_w re-centres X.

+ 1 - 0
params.scad

@@ -18,6 +18,7 @@ ACT_W  = 118.78;
 ACT_D  = 88.22;
 
 /* [EPD Case Parameters] */
+EPD_ANGLE    = 30;    // 0 = flat/inline; 90 = display face coplanar with lid Y+ wall
 LIP          = 1.5;
 TOL          = 0.3;
 CHAM         = 1.0;