ZiB 4 месяцев назад
Родитель
Сommit
18c1ebc780
1 измененных файлов с 19 добавлено и 2 удалено
  1. 19 2
      cpu_case.scad

+ 19 - 2
cpu_case.scad

@@ -3,6 +3,7 @@
 //  OpenSCAD parametric model
 // ============================================================
 use <ee04.scad>
+use <epd_case.scad>
 
 /* [Preview] */
 SHOW_BOARD    = true;
@@ -10,6 +11,7 @@ SHOW_LID      = true;
 SHOW_BASE     = true;
 SHOW_PLUNGERS = true;
 SHOW_BATTERY  = true;
+SHOW_EPD_CASE = true;
 EXPLODE       = 65;      // mm to pull lid out in Y- for inspection (try 40)
 
 /* [Board Dimensions — from EE04 STL] */
@@ -32,12 +34,16 @@ SLIDE_CLEAR =  0.40;  // clearance between flange/rib and groove/channel on all
 //   _fpc_xw = 12.5 + 5.0 = 17.5 mm (cable + 2.5 mm clearance per side)
 //   slot Y-extent at z=0: sqrt(_fpc_ro² − (FPC_BEND_R−WALL)²) ≈ 4.1 mm
 //   with epd_case defaults: bend_r=4, wall=2, fpc_t=0.3, tol=0.3 → _fpc_ro=4.6
-FPC_CX      =  50.0;   // PCB-relative case_x centre
 FPC_NOTCH_W =  17.5;   // = _fpc_xw in epd_case (cable 12.5 + 2×2.5 mm clearance)
 FPC_U_T     = LID_T;   // U-rib arm and bar thickness
 FPC_U_DEPTH =  20.0;   // how far Y- the U arms extend into the lid interior
 FPC_SLOT_W  =   4.1;   // ≈ sqrt(_fpc_ro²−(FPC_BEND_R−WALL)²) at epd_case z=0
 
+// epd_case reference values for alignment (must match epd_case.scad)
+_EPD_CASE_W      = 130.0;   // case_w in epd_case (DISP_W+2×TOL+2×WALL = 125.4+0.6+4)
+_EPD_FPC_SLOT_CX =  65.98;  // _fpc_x1 + _fpc_xw/2 in epd_case (slot X centre)
+_EPD_FPC_SLOT_Y  = 102.0;   // BEZEL_Y + DISP_D in epd_case (slot Y- edge)
+
 /* [Cutout Positions — from STL geometry, PCB-origin-relative] */
 
 // ---- +Y wall: Sliding power switch ----
@@ -87,7 +93,7 @@ PCB_BOSS_Y2   =  PCB_W - 2.5;
 
 /* [Interior Clearances — PCB edge to interior wall face] */
 CLR_XN   =   2.0;   // X- side
-CLR_XP   =  42.0;   // X+ side (JST cable routing)
+CLR_XP   =  44.0;   // X+ side — sized so OUT_L == _EPD_CASE_W (130 − 2×WALL − CLR_XN − PCB_L)
 CLR_YN   =  15.0;   // Y- side (FPC routing; lid inserts from here)
 CLR_YP   =   1.77;  // Y+ side: calibrated contact(1.565) + rest clearance(0.20)
 CLR_LID  =   5.0;   // from tallest component top to lid underside
@@ -115,6 +121,9 @@ OUT_W    = CAV_W + 2*WALL;
 LID_H     = FLANGE_H + LID_T;
 LID_Y_LEN = CAV_W;   // flange length; lid Y+ end stops against Y+ interior wall
 
+// FPC notch X centre — keeps lid notch aligned with epd_case slot when centred on lid
+FPC_CX = OUT_L/2 - _EPD_CASE_W/2 + _EPD_FPC_SLOT_CX - PCB_OX;
+
 // ============================================================
 //  HELPERS
 // ============================================================
@@ -344,3 +353,11 @@ if (SHOW_PLUNGERS)
         translate([PCB_OX + bcx, OUT_W - WALL, PCB_Z + BTN_CZ])
             plunger();
 
+if (SHOW_EPD_CASE)
+    translate([
+        OUT_L/2 - _EPD_CASE_W/2,
+        WALL - EXPLODE + LID_Y_LEN - 3 - FPC_U_DEPTH + FPC_U_T - _EPD_FPC_SLOT_Y,
+        BASE_H + LID_T
+    ])
+        epd_case();
+