← Commit history

Pins seat their collar ON the copper top (were 52um sunk); plated hole is continuous copper (pad inner edge overlaps the barrel, not just touching)

John Lauer ·5e92afc203 ·3mo ago ·parent a3c4b16
3 files changed +14−3
AdomMachinePins-4pin-animated.glb
⋯ 1 unchanged line ⋯
AdomMachinePins-complete.zip
⋯ 1 unchanged line ⋯
scripts/build_board_glb.py+14−3
@@ -122,14 +122,17 @@ slab.fix_normals()   # outward normals so single-sided transparency renders the COPPER=[0.82,0.53,0.24,1.0]; CU_T=0.000035 for i,(cx,cy) in enumerate(PIN_CENTERS):     dr,pr=DRILL[i],PAD[i]-    top=trimesh.creation.annulus(r_min=dr, r_max=pr, height=CU_T)+    # top+bottom pad rings inner-radius = dr-CU_T so they OVERLAP the barrel wall (dr-CU_T..dr):+    # the plated hole is one continuous copper piece (pad flares into the barrel), not a pad merely+    # touching a separate tube.+    top=trimesh.creation.annulus(r_min=dr-CU_T, r_max=pr, height=CU_T)     top.apply_translation([cx,cy,board_top+CU_T/2])            # sits ON the top surface     add_mesh(top.vertices,top.faces,COPPER,f"cu_top_{i}",metal=True)-    bot=trimesh.creation.annulus(r_min=dr, r_max=pr, height=CU_T)+    bot=trimesh.creation.annulus(r_min=dr-CU_T, r_max=pr, height=CU_T)     bot.apply_translation([cx,cy,board_bottom-CU_T/2])         # sticks out the bottom     add_mesh(bot.vertices,bot.faces,COPPER,f"cu_bot_{i}",metal=True)     barrel=trimesh.creation.annulus(r_min=dr-CU_T, r_max=dr, height=FR4_T+2*CU_T)-    barrel.apply_translation([cx,cy,(board_top+board_bottom)/2])  # plated hole wall+    barrel.apply_translation([cx,cy,(board_top+board_bottom)/2])  # plated hole wall, overlaps both rings     add_mesh(barrel.vertices,barrel.faces,COPPER,f"cu_via_{i}",metal=True) print(f"board: 1.6mm FR4 + 1oz copper (proud top/bottom rings + plated via barrels) x4") @@ -144,6 +147,14 @@ for k in range(4):     V=np.vstack(V); F=np.vstack(F)     c=V[:,:2].mean(0)     barrel_r=float(np.hypot(V[:,0]-c[0], V[:,1]-c[1]).max())   # widest = socket barrel+    # SEAT the pin's collar ON the copper top: the collar (the ring near the board too wide to enter the+    # hole) must rest ON the proud copper pad, not sink to the FR4 level. Shift the pin up so the collar+    # bottom == copper top. The tail still passes through and out the bottom.+    rr=np.hypot(V[:,0]-c[0],V[:,1]-c[1])+    thr=0.0036 if barrel_r>0.0015 else 0.0014+    near=(V[:,2]>board_top-0.001)&(V[:,2]<board_top+0.003)&(2*rr>thr)+    if near.any():+        V=V.copy(); V[:,2]+=(board_top+CU_T)-V[near,2].min()     pin_info[k]=(c, barrel_r)     add_mesh(V,F,[0.90,0.66,0.30,1.0],f"PIN_{k}",metal=True)     print(f"PIN_{k} center=({c[0]*1000:.1f},{c[1]*1000:.1f})mm barrel OD={barrel_r*2000:.2f}mm")