ZiB 4 месяцев назад
Родитель
Сommit
9dfbaa262c
1 измененных файлов с 46 добавлено и 1 удалено
  1. 46 1
      cable_cap.scad

+ 46 - 1
cable_cap.scad

@@ -35,10 +35,17 @@ CHAM       = 1.0;
 CHAM_ANGLE = 60;
 CORNER_R   = 2.5;
 CLIP_Z     = 0;     // preview: mm to remove from Z+ (0 = full model)
-CLIP_Y     = 6;     // preview: mm to remove from Y+ (0 = full model)
+CLIP_Y     = 0;     // preview: mm to remove from Y+ (0 = full model)
 SHOW_DISP  = true;
 SCREEN_EXPLODE    = 0;     // mm to pull display toward X+ in preview
 
+// --- Slip-Fit Cap (X+ end) ---
+SHOW_CAP    = true;   // show cap in preview
+CAP_ENGAGE  = 8.0;   // sleeve engagement length over case exterior (X)
+CAP_WALL    = 1.5;   // sleeve and end-wall thickness
+CAP_TOL     = 0.2;   // per-side slip clearance between bore and case exterior
+CAP_EXPLODE = 5;     // preview: mm to pull cap away from case in X+ (0 = seated)
+
 // --- Magnetic Strip Locating Lip (rear face) ---
 MAG_L        = 1.772 * 25.4;   // strip length ≈ 45.01 mm
 MAG_W        = 0.512 * 25.4;   // strip width  ≈ 13.00 mm
@@ -62,6 +69,14 @@ win_y = WALL + TOL + ACT_Y_OFFSET;
 fpc_pkt_y  = WALL + TOL + (DISP_D - FPC_W) / 2 - FPC_POCKET_PAD;
 fpc_pkt_yw = FPC_W + 2 * FPC_POCKET_PAD;
 
+// Cap derived
+_cap_bore_w  = case_d + 2 * CAP_TOL;              // bore Y width
+_cap_bore_h  = case_h + 2 * CAP_TOL;              // bore Z height
+_cap_outer_r = CORNER_R + CAP_TOL + CAP_WALL;     // outer corner radius
+// FPC exit slot spans the full FPC pocket height (pocket floor → cavity ceiling)
+_cap_slot_w  = FPC_W + 1.0;                                       // slot Y width
+_cap_slot_h  = FPC_FLOOR_DROP + DISP_T + TOL + 2 * CAP_TOL;      // slot Z height
+
 // Magnetic strip recess geometry (centered on back face)
 _lip_il = MAG_L + 2 * MAG_TOL;
 _lip_iw = MAG_W + 2 * MAG_TOL;
@@ -118,6 +133,32 @@ module epd_case() {
     }
 }
 
+// -------------------------------------------------------------------
+// Slip-fit cap — slides over X+ end of case; FPC exits through end-wall slot
+// -------------------------------------------------------------------
+module cable_cap() {
+    // Translate so case exterior Y=0, Z=0 aligns with bore inside walls
+    translate([case_w - CAP_ENGAGE + CAP_EXPLODE, -CAP_TOL - CAP_WALL, -CAP_TOL - CAP_WALL])
+    difference() {
+        // Outer shell (rounded to match case corner radius + wall stack)
+        rounded_box(CAP_ENGAGE + CAP_WALL,
+                    _cap_bore_w + 2 * CAP_WALL,
+                    _cap_bore_h + 2 * CAP_WALL,
+                    _cap_outer_r);
+
+        // Bore — open on X- (entry) side; closed by end wall at X+ (local x = CAP_ENGAGE)
+        translate([-0.01, CAP_WALL, CAP_WALL])
+            cube([CAP_ENGAGE + 0.02, _cap_bore_w, _cap_bore_h]);
+
+        // FPC cable exit slot through end wall
+        // Y: centered on case; Z: from FPC pocket floor to display cavity ceiling
+        translate([CAP_ENGAGE - 0.01,
+                   CAP_WALL + CAP_TOL + case_d / 2 - _cap_slot_w / 2,
+                   CAP_WALL + CAP_TOL + WALL - FPC_FLOOR_DROP])
+            cube([CAP_WALL + 0.02, _cap_slot_w, _cap_slot_h]);
+    }
+}
+
 color("#004B49")
     intersection() {
         epd_case();
@@ -130,3 +171,7 @@ if ($preview && SHOW_DISP)
     translate([WALL + TOL + SCREEN_EXPLODE, WALL + TOL, WALL])
         EPD213B();
 
+if (SHOW_CAP)
+    color("#1A5C5B")
+        cable_cap();
+