Răsfoiți Sursa

preview-only battery and board; lid ceiling conditioned on epd_case

- battery() renders only in preview, coloured darkgray to match EE04
- stl_board() (non-manifold STL) suppressed during render via $preview
- lid ceiling plate omitted when SHOW_EPD_CASE is true (epd_case covers it)
ZiB 4 luni în urmă
părinte
comite
df37f79765
1 a modificat fișierele cu 11 adăugiri și 8 ștergeri
  1. 11 8
      cpu_case.scad

+ 11 - 8
cpu_case.scad

@@ -288,8 +288,9 @@ module lid() {
     difference() {
         union() {
             // Ceiling plate — matches base footprint (OUT_L × OUT_W) with CORNER_R rounding
-            translate([0, -WALL, FLANGE_H])
-                rounded_box(OUT_L, OUT_W, LID_T, CORNER_R);
+            if (!SHOW_EPD_CASE)
+                translate([0, -WALL, FLANGE_H])
+                    rounded_box(OUT_L, OUT_W, LID_T, CORNER_R);
 
             // Y- lip — same rounded_box profile clipped to the Y- wall zone so the
             // lip corners match the base exterior corners
@@ -321,10 +322,12 @@ module stl_board() {
 }
 
 module battery() {
-    translate([CAV_L - BATT_W - CLR_BATX,
-               CAV_W - BATT_D - CLR_BATY,
-               FLOOR])
-        cube([BATT_W, BATT_D, BATT_T]);
+    if ($preview)
+        color("darkgray", 0.85)
+            translate([CAV_L - BATT_W - CLR_BATX,
+                       CAV_W - BATT_D - CLR_BATY,
+                       FLOOR + 0.01])
+                cube([BATT_W, BATT_D, BATT_T]);
 }
 
 // ============================================================
@@ -340,7 +343,7 @@ if (SHOW_LID)
                BASE_H - FLANGE_H])
         lid();
 
-if (SHOW_BOARD) stl_board();
+if (SHOW_BOARD && $preview) stl_board();
 
 if (SHOW_PLUNGERS)
     for (bcx = BTN_CX)
@@ -351,7 +354,7 @@ if (SHOW_EPD_CASE)
     translate([
         OUT_L/2 - _EPD_CASE_W/2,
         OUT_W - EXPLODE - _EPD_CASE_D,
-        BASE_H + LID_T
+        BASE_H
     ])
         epd_case();