Bladeren bron

lid: add Y+ corner pieces with correct double-taper profile

Replace Step A/B flange extensions with intersection() of the X-prism and
Y-prism in each corner. Equivalent to a FLANGE_W cube with both the X-flange
and Y-flange relief cuts applied — height = min(h_x, h_y) at every point,
so both wall faces taper to zero and the flanges meet at a single shared edge.
ZiB 4 maanden geleden
bovenliggende
commit
c8d060aecd
1 gewijzigde bestanden met toevoegingen van 42 en 8 verwijderingen
  1. 42 8
      lid.scad

+ 42 - 8
lid.scad

@@ -16,26 +16,26 @@ module lid() {
   // Wide vertical face at x=WALL+FLANGE_W (inner), tip at bottom-wall-face — same
   // (-FLANGE_W, -FLANGE_H) hypotenuse slope as base flanges so they mate when lid slides in.
   color("#2C3863") {
-    // Left (X-) flange — extends into Y+ corner to meet locking flange
+    // Left (X-) flange
     hull() {
       translate([WALL + FLANGE_W - SLIDE_CLEAR - 0.01, 0, 0])
-        cube([0.01, LID_Y_LEN - SLIDE_CLEAR, FLANGE_H - SLIDE_CLEAR]);
+        cube([0.01, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, FLANGE_H - SLIDE_CLEAR]);
       translate([WALL + SLIDE_CLEAR, 0, -0.005])
-        cube([0.01, LID_Y_LEN - SLIDE_CLEAR, 0.01]);
+        cube([0.01, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, 0.01]);
     }
-    // Right (X+) flange — extends into Y+ corner to meet locking flange
+    // Right (X+) flange
     hull() {
       translate([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR, 0, 0])
-        cube([0.01, LID_Y_LEN - SLIDE_CLEAR, FLANGE_H - SLIDE_CLEAR]);
+        cube([0.01, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, FLANGE_H - SLIDE_CLEAR]);
       translate([OUT_L - WALL - SLIDE_CLEAR - 0.01, 0, -0.005])
-        cube([0.01, LID_Y_LEN - SLIDE_CLEAR, 0.01]);
+        cube([0.01, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, 0.01]);
     }
 
     // Interior ribs — 2 mm wide
     translate([WALL + FLANGE_W - SLIDE_CLEAR, 0, 0])
-      cube([2.0, LID_Y_LEN - SLIDE_CLEAR, FLANGE_H]);
+      cube([2.0, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, FLANGE_H]);
     translate([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR - 2.0, 0, 0])
-      cube([2.0, LID_Y_LEN - SLIDE_CLEAR, FLANGE_H]);
+      cube([2.0, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, FLANGE_H]);
 
     // Y+ locking flanges — angled wedge matching side-flange profile; split around FPC notch
     for (seg = [
@@ -54,6 +54,40 @@ module lid() {
       translate([seg[0], LID_Y_LEN - FLANGE_W + SLIDE_CLEAR - 2.0, 0])
         cube([seg[1], 2.0, FLANGE_H]);
     }
+
+    // Y+ corners — intersection of the X-prism and Y-prism in the corner region.
+    // Equivalent to: cube with the X-flange relief cut AND the Y-flange relief cut applied.
+    // Result tapers to zero height along both wall faces, producing a single shared edge.
+    // Left corner (X-)
+    intersection() {
+      hull() {
+        translate([WALL + FLANGE_W - SLIDE_CLEAR - 0.01, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, 0])
+          cube([0.01, FLANGE_W - 2*SLIDE_CLEAR, FLANGE_H - SLIDE_CLEAR]);
+        translate([WALL + SLIDE_CLEAR, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, -0.005])
+          cube([0.01, FLANGE_W - 2*SLIDE_CLEAR, 0.01]);
+      }
+      hull() {
+        translate([WALL + SLIDE_CLEAR, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, 0])
+          cube([FLANGE_W - 2*SLIDE_CLEAR, 0.01, FLANGE_H - SLIDE_CLEAR]);
+        translate([WALL + SLIDE_CLEAR, LID_Y_LEN - SLIDE_CLEAR - 0.01, -0.005])
+          cube([FLANGE_W - 2*SLIDE_CLEAR, 0.01, 0.01]);
+      }
+    }
+    // Right corner (X+)
+    intersection() {
+      hull() {
+        translate([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, 0])
+          cube([0.01, FLANGE_W - 2*SLIDE_CLEAR, FLANGE_H - SLIDE_CLEAR]);
+        translate([OUT_L - WALL - SLIDE_CLEAR - 0.01, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, -0.005])
+          cube([0.01, FLANGE_W - 2*SLIDE_CLEAR, 0.01]);
+      }
+      hull() {
+        translate([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, 0])
+          cube([FLANGE_W - 2*SLIDE_CLEAR, 0.01, FLANGE_H - SLIDE_CLEAR]);
+        translate([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR, LID_Y_LEN - SLIDE_CLEAR - 0.01, -0.005])
+          cube([FLANGE_W - 2*SLIDE_CLEAR, 0.01, 0.01]);
+      }
+    }
   }
 
   color("#004B49")