Browse Source

Simplify display mockup usage

ZiB 3 tháng trước cách đây
mục cha
commit
4efd56eb4a
2 tập tin đã thay đổi với 16 bổ sung và 27 xóa
  1. 13 12
      epd_case.scad
  2. 3 15
      lid.scad

+ 13 - 12
epd_case.scad

@@ -10,6 +10,7 @@ EPD_EXPLODE = 0;   // mm to pull display mockup toward Y- for inspection
 CLIP_Z    = 0;     // mm to remove from Z+ (0 = full model; LIP reveals cavity; LIP+DISP_T reveals floor)
 
 module epd_case() {
+  color("#004B49") {
   difference() {
     // Solid case body — open at Y=0 (no Y- wall) by construction
     rounded_box(epd_case_w, epd_case_d, epd_case_h, CORNER_R);
@@ -38,17 +39,17 @@ module epd_case() {
           cylinder(r=_fpc_ro, h=_fpc_xw, $fn=32);
         cube([_fpc_xw, _fpc_ro + 1, _fpc_ro + 1]);
       }
-  }
-}
+  }}
 
-color("#004B49")
-  intersection() {
-    epd_case();
-    cube([epd_case_w + 1, epd_case_d + 1,
-          ($preview && CLIP_Z > 0) ? max(0.01, epd_case_h - CLIP_Z) : epd_case_h + 1]);
-  }
+  // Display mockup — seated at case origin; EPD_EXPLODE pulls it toward Y-
+  if ($preview && SHOW_DISP)
+    color("#F0F0F0")
+      translate([WALL + TOL, BEZEL_Y + DISP_Y_EXTRA - EPD_EXPLODE, WALL])
+        GDEY0583T81(fpc_bend_start=0, fpc_bend_r=FPC_BEND_R, fpc_post_clip=2);
+}
 
-// Display mockup — seated at case origin; EPD_EXPLODE pulls it toward Y-
-if ($preview && SHOW_DISP)
-  translate([WALL + TOL, BEZEL_Y + DISP_Y_EXTRA - EPD_EXPLODE, WALL])
-    GDEY0583T81(fpc_bend_start=0, fpc_bend_r=FPC_BEND_R, fpc_post_clip=2);
+intersection() {
+  epd_case();
+  cube([epd_case_w + 1, epd_case_d + 1,
+        ($preview && CLIP_Z > 0) ? max(0.01, epd_case_h - CLIP_Z) : epd_case_h + 1]);
+}

+ 3 - 15
lid.scad

@@ -103,10 +103,10 @@ module lid() {
     }
   }
 
-  color("#004B49")
   difference() {
     union() {
-      // Flat ceiling plate for test-fit lid (no epd_case)
+      // Flat ceiling plate for EPD_ANGLE > 0
+      color("#004B49")
       translate([0, -WALL, FLANGE_H])
         rounded_box(OUT_L, OUT_W, LID_T, CORNER_R);
       if (EPD_IS_LID)
@@ -117,6 +117,7 @@ module lid() {
 
       // Y- lip — same rounded_box profile clipped to the Y- wall zone so the
       // lip corners match the base exterior corners
+      color("#004B49")
       intersection() {
         translate([0, -WALL, FLANGE_H - LIP_H - SLIDE_CLEAR])
           rounded_box(OUT_L, OUT_W, LIP_H + SLIDE_CLEAR, CORNER_R);
@@ -131,19 +132,6 @@ module lid() {
                FLANGE_H - 0.1])
       cube([FPC_NOTCH_W, FPC_SLOT_W, LID_T + 0.2]);
   }
-
-  // Display mockup — seated inside epd_case, preview only
-  if ($preview && EPD_IS_LID && SHOW_DISP)
-    translate([OUT_L/2 - epd_case_w/2, OUT_W - WALL, LID_T + WALL])
-      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.
-  translate([_adapt_ox + _adpt_w, _adapt_oy, FLANGE_H - BOSS_H])
-    rotate([0, 180, 0])
-      fpc_adapter(fpc_yp=14, fpc_yn=60);
 }
 
 // ============================================================