Procházet zdrojové kódy

Add hinge drum joining tilted epd_case to flat lid plate

- pie_slice swept through EPD_ANGLE along the hinge line, radius sized
  WALL past the flat-plate FPC slot edge for a future cable path
- inset CORNER_R from each end to stay clear of corner rounding
- derive CLR_XP so main case width matches epd_case_w
- raise epd_case pivot to LID_T+LIP
ZiB před 3 měsíci
rodič
revize
37dce60d77
2 změnil soubory, kde provedl 24 přidání a 6 odebrání
  1. 21 4
      lid.scad
  2. 3 2
      params.scad

+ 21 - 4
lid.scad

@@ -7,6 +7,12 @@ use <GDEY0583T81.scad>
 /* [Preview] */
 SHOW_DISP = true;
 
+// Hinge drum — EPD_ANGLE-swept partial cylinder filling the gap between the flat
+// plate and the tilted epd_case back. Radius reaches WALL past the Y- edge of the
+// flat-plate FPC slot so a cable path can later be cut inside it.
+FPC_SLOT_Y0 = LID_Y_LEN - 3 - FPC_U_DEPTH + FPC_U_T;
+HINGE_R     = (OUT_W - WALL) - FPC_SLOT_Y0 + WALL;
+
 // ============================================================
 //  LID  (slide-on; enters from Y- face, closes toward Y+)
 //  Flanges sit inside cavity and ride on base retention flange hypotenuses.
@@ -93,15 +99,26 @@ module lid() {
   difference() {
     union() {
       // Flat ceiling plate for EPD_ANGLE > 0
-      color("#004B49")
+      color("#2C3863")
       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, LID_T + WALL])
+      if (EPD_IS_LID) {
+        translate([OUT_L/2 - epd_case_w/2, OUT_W - WALL, LID_T + LIP])
           rotate([-EPD_ANGLE, 0, 0])
             translate([0, -epd_case_d, 0])
               epd_case();
 
+        // Hinge drum — axis along X at the epd_case pivot line; swept from the
+        // flat-plate plane up through EPD_ANGLE to sit flush against the case back.
+        // Inset CORNER_R from each end so it stays clear of the corner rounding.
+        if (EPD_ANGLE > 0)
+          color("#004B49")
+          translate([OUT_L/2 - epd_case_w/2 + CORNER_R, OUT_W - WALL, LID_T + WALL])
+            rotate([0, 90, 0])
+              pie_slice(ang=EPD_ANGLE, l=epd_case_w - 2*CORNER_R, r=HINGE_R,
+                        spin=270 - EPD_ANGLE, anchor=BOT, $fn=96);
+      }
+
       // Y- lip — same rounded_box profile clipped to the Y- wall zone so the
       // lip corners match the base exterior corners
       color("#004B49")
@@ -115,7 +132,7 @@ module lid() {
 
     // FPC cable slot — through flat ceiling plate (test-fit lid only; EPD_IS_LID uses epd_case slot)
     translate([PCB_OX + FPC_CX - FPC_NOTCH_W/2,
-               LID_Y_LEN - 3 - FPC_U_DEPTH + FPC_U_T,
+               FPC_SLOT_Y0,
                FLANGE_H - 0.1])
       cube([FPC_NOTCH_W, FPC_SLOT_W, LID_T + 0.2]);
   }

+ 3 - 2
params.scad

@@ -109,7 +109,7 @@ PCB_BOSS_Y2 = PCB_W - 2.5;
 
 /* [Interior Clearances] */
 CLR_XN   = 2.0;
-CLR_XP   = 44.0;
+CLR_XP   = epd_case_w - 2*WALL - CLR_XN - PCB_L;  // sized so OUT_L == epd_case_w (39.6; was 44.0 — battery zone has slack)
 CLR_YN   = 15.0;
 CLR_YP   = 1.77;
 CLR_LID  = 3.5;
@@ -139,6 +139,7 @@ FPC_U_DEPTH = FPC_U_T - WALL - 3 + (epd_case_d - (BEZEL_Y + DISP_D));
 /* [Shared Helper] */
 // Corner-anchored box (origin at the -X,-Y,-Z corner) with rounded vertical edges,
 // matching the pre-BOSL2 hull-of-cylinders convention used throughout this project.
+$fn = $preview ? 64 : 128;
 module rounded_box(l, w, h, r) {
-    cuboid([l, w, h], rounding=r, edges="Z", anchor=BOTTOM+FRONT+LEFT, $fn=32);
+    cuboid([l, w, h], rounding=r, edges="Z", anchor=BOTTOM+FRONT+LEFT, $fn=$fn);
 }