Better base notch, remove notch from lid

This commit is contained in:
2026-03-02 23:51:51 +01:00
parent 6ecae74483
commit 4768754bef

View File

@@ -53,6 +53,17 @@ BAT_X = BRD_X + BRD_L + 8.0
BAT_Y = (W - BAT_W) / 2
BAT_CLIP_Y = 8.0
# Circular notch
NOTCH_R = (USBC_W + TOL) / 2
NOTCH_DEPTH = WALL + 2.0
# Circular notch helper
def circular_notch(face_x, cy, cz, r, depth):
circle = Part.makeCircle(r, Base.Vector(face_x, cy, cz), Base.Vector(1, 0, 0))
face = Part.Face(Part.Wire(circle))
return face.extrude(Base.Vector(-depth, 0, 0))
# Rounded box helper
def rbox(lx, ly, lz, ox=0, oy=0, oz=0, r=CR):
@@ -244,6 +255,10 @@ base = base.fuse(
BAT_X + BAT_L, clip_y_start, WALL)
)
# Circular notch in back wall — centred on base
notch_cz = rail_z + LID_H
base = base.cut(circular_notch(L, W / 2, notch_cz, NOTCH_R, NOTCH_DEPTH))
# Lid
TAB_W = RAIL_D - TOL + 0.5
LID_L = L - WALL * 2 - TOL
@@ -256,16 +271,8 @@ LID_W = (
)
lid_y0 = WALL + TOL + LID_EXTRA_TOL - TAB_W
lid = box(LID_L, LID_W, LID_H, 0, lid_y0, 0)
lid = lid.cut(
box(WALL * 2, USBC_W + TOL, LID_H + 0.2,
LID_L - WALL,
W / 2 - (USBC_W + TOL) / 2,
-0.1)
)
lid.translate(Base.Vector(WALL + TOL, 0, rail_z))
# Final objects