Преглед изворни кода

Add Y+ locking flange to base and lid; trim side flanges/ribs for clearance

- Base: angled Y+ flange (same profile as side flanges, in YZ plane) split
  around FPC notch, so lid locks at Y+ when fully seated
- Lid: replace flat Y+ stop rib with matching angled wedge + backing rib
- Side flanges shortened to LID_Y_LEN-FLANGE_W+SLIDE_CLEAR so they clear
  the base Y+ flange
- Side backing ribs tapered at Y+ end to match Y+ flange wedge profile
ZiB пре 4 месеци
родитељ
комит
c9f1d01916
1 измењених фајлова са 49 додато и 17 уклоњено
  1. 49 17
      cpu_case.scad

+ 49 - 17
cpu_case.scad

@@ -241,6 +241,18 @@ module base() {
             translate([OUT_L - WALL - 0.01, WALL, BASE_H - FLANGE_H])
                 cube([0.01, CAV_W, 0.01]);
         }
+        // Y+ locking flanges — same angled profile as side flanges, in YZ plane;
+        // split around FPC notch for cable clearance
+        for (seg = [
+            [WALL,                             PCB_OX + FPC_CX - FPC_NOTCH_W/2 - WALL],
+            [PCB_OX + FPC_CX + FPC_NOTCH_W/2, OUT_L - WALL - (PCB_OX + FPC_CX + FPC_NOTCH_W/2)]
+        ])
+            hull() {
+                translate([seg[0], OUT_W - WALL - FLANGE_W, BASE_H - 0.01])
+                    cube([seg[1], FLANGE_W, 0.01]);
+                translate([seg[0], OUT_W - WALL - 0.01, BASE_H - FLANGE_H])
+                    cube([seg[1], 0.01, 0.01]);
+            }
     }
 }
 
@@ -255,32 +267,52 @@ 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
+        // Left (X-) flange — stops at Y+ locking flange inner face
         hull() {
             translate([WALL + FLANGE_W - SLIDE_CLEAR - 0.01, 0, 0])
-                cube([0.01, LID_Y_LEN, 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, 0.01]);
+                cube([0.01, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, 0.01]);
         }
-        // Right (X+) flange
+        // Right (X+) flange — stops at Y+ locking flange inner face
         hull() {
             translate([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR, 0, 0])
-                cube([0.01, LID_Y_LEN, 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, 0.01]);
+                cube([0.01, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, 0.01]);
+        }
+
+        // Interior ribs — 2 mm wide; tapered Y+ end matches Y+ locking flange profile
+        hull() {
+            translate([WALL + FLANGE_W - SLIDE_CLEAR, 0, 0])
+                cube([2.0, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, FLANGE_H]);
+            translate([WALL + FLANGE_W - SLIDE_CLEAR, LID_Y_LEN - SLIDE_CLEAR, -0.005])
+                cube([2.0, 0.01, 0.01]);
+        }
+        hull() {
+            translate([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR - 2.0, 0, 0])
+                cube([2.0, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, FLANGE_H]);
+            translate([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR - 2.0, LID_Y_LEN - SLIDE_CLEAR, -0.005])
+                cube([2.0, 0.01, 0.01]);
         }
 
-        // Interior ribs — 2 mm wide, on cavity face of each flange
-        translate([WALL + FLANGE_W - SLIDE_CLEAR, 0, 0])
-            cube([2.0, LID_Y_LEN, FLANGE_H]);
-        translate([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR - 2.0, 0, 0])
-            cube([2.0, LID_Y_LEN, FLANGE_H]);
-
-        // Y+ stop rib — split around FPC cable notch at PCB_OX+FPC_CX
-        translate([WALL + FLANGE_W - SLIDE_CLEAR + 2.0, LID_Y_LEN - 3, FLANGE_H - 3])
-            cube([PCB_OX + FPC_CX - FPC_NOTCH_W/2 - (WALL + FLANGE_W - SLIDE_CLEAR + 2.0), 3, 3]);
-        translate([PCB_OX + FPC_CX + FPC_NOTCH_W/2, LID_Y_LEN - 3, FLANGE_H - 3])
-            cube([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR - 2.0 - (PCB_OX + FPC_CX + FPC_NOTCH_W/2), 3, 3]);
+        // Y+ locking flanges — angled wedge matching side-flange profile; split around FPC notch
+        for (seg = [
+            [WALL + FLANGE_W - SLIDE_CLEAR + 2.0,
+             PCB_OX + FPC_CX - FPC_NOTCH_W/2 - (WALL + FLANGE_W - SLIDE_CLEAR + 2.0)],
+            [PCB_OX + FPC_CX + FPC_NOTCH_W/2,
+             OUT_L - WALL - FLANGE_W + SLIDE_CLEAR - 2.0 - (PCB_OX + FPC_CX + FPC_NOTCH_W/2)]
+        ]) {
+            hull() {
+                translate([seg[0], LID_Y_LEN - FLANGE_W + SLIDE_CLEAR - 0.01, 0])
+                    cube([seg[1], 0.01, FLANGE_H - SLIDE_CLEAR]);
+                translate([seg[0], LID_Y_LEN - SLIDE_CLEAR - 0.01, -0.005])
+                    cube([seg[1], 0.01, 0.01]);
+            }
+            // Backing rib — 2 mm deep on cavity face of flange, matches side-rib style
+            translate([seg[0], LID_Y_LEN - FLANGE_W + SLIDE_CLEAR - 2.0, 0])
+                cube([seg[1], 2.0, FLANGE_H]);
+        }
 
     }