Browse Source

Calibrate USB-C cutout to STL geometry and add cable clearance param

USBC_W/H now match the port body from the STL (9.0 × 3.22 mm) with CZ
re-centred at 4.31. New USBC_CBL_CLEAR (default 1.5 mm/side) expands
the wall slot for cable plug insertion and routing.
ZiB 4 months ago
parent
commit
868ff56701
1 changed files with 8 additions and 7 deletions
  1. 8 7
      cpu_case.scad

+ 8 - 7
cpu_case.scad

@@ -29,10 +29,11 @@ PWR_H       =   2.5;   // slot height
 PWR_CZ      =   3.8;   // height above PCB bottom
 
 // ---- +Y wall: USB-C port ----
-USBC_CX     =  65.65;
-USBC_W      =  11.5;
-USBC_H      =   4.8;
-USBC_CZ     =   4.4;
+USBC_CX         =  65.65;
+USBC_W          =   9.0;   // port body width from STL
+USBC_H          =   3.22;  // port body height from STL
+USBC_CZ         =   4.31;
+USBC_CBL_CLEAR  =   1.5;   // added per side for cable plug + routing clearance
 
 // ---- +Y wall: 3× user buttons + 1× reset ----
 BTN_CX      = [48.4, 39.075, 29.725, 20.425];   // PCB-relative case_x centres
@@ -165,10 +166,10 @@ module base() {
                 cube([PWR_W, WALL + 0.2, PWR_H]);
 
             // USB-C slot
-            translate([PCB_OX + USBC_CX - USBC_W/2,
+            translate([PCB_OX + USBC_CX - (USBC_W + 2*USBC_CBL_CLEAR)/2,
                        OUT_W - WALL - 0.1,
-                       PCB_Z + USBC_CZ - USBC_H/2])
-                cube([USBC_W, WALL + 0.2, USBC_H]);
+                       PCB_Z + USBC_CZ - (USBC_H + 2*USBC_CBL_CLEAR)/2])
+                cube([USBC_W + 2*USBC_CBL_CLEAR, WALL + 0.2, USBC_H + 2*USBC_CBL_CLEAR]);
 
             // 4× button holes (3 user + 1 reset)
             for (bcx = BTN_CX)