← Commit history

Real 1oz copper: proud annular rings on FR4 top+bottom + plated via barrels (was buried); annotations flagged nocast so text/arrows drop their ground shadows

John Lauer ·ce65f6e316 ·3mo ago ·parent 33e8fa9
3 files changed +27−13
AdomMachinePins-4pin-animated.glb
⋯ 1 unchanged line ⋯
AdomMachinePins-complete.zip
⋯ 1 unchanged line ⋯
scripts/build_board_glb.py+27−13
@@ -89,26 +89,40 @@ def add_mesh(vv,f,rgba,name,metal=False,double=True):         alphaMode="BLEND" if a<0.99 else "OPAQUE", doubleSided=double))     scene.add_geometry(m,node_name=name,geom_name=name) -# keep the real gold annular pads; REPLACE the thin (0.3mm) Fusion FR4 with a proper 1.6mm slab+# REPLACE the thin (0.3mm) Fusion FR4 with a proper 1.6mm slab; drop the flat Fusion pads+# (we rebuild copper as real 1oz layers below). board_xy=np.vstack([vv[:,:2] for vv,f,col in board_meshes]) bx0,by0=board_xy.min(0); bx1,by1=board_xy.max(0)-for i,(vv,f,col) in enumerate(board_meshes):-    if col[0]>0.6 and col[2]<0.5:-        add_mesh(vv,f,[0.85,0.62,0.20,1.0],f"pad_{i}",metal=True)  FR4_T=0.0016   # 1.6mm standard FR4+board_bottom=board_top-FR4_T slab=trimesh.creation.box(extents=[bx1-bx0, by1-by0, FR4_T]) slab.apply_translation([(bx0+bx1)/2,(by0+by1)/2, board_top-FR4_T/2]) cutters=[]+DRILL={0:0.00055,1:0.00055,2:0.001725,3:0.001725}   # med Ø1.1, lrg Ø3.45+PAD  ={0:0.00080,1:0.00080,2:0.00260,3:0.00260}      # med Ø1.6, lrg Ø5.2 for i,(cx,cy) in enumerate(PIN_CENTERS):-    dr=0.00055 if i<2 else 0.001725              # real drill radii: med Ø1.1, lrg Ø3.45-    cyl=trimesh.creation.cylinder(radius=dr, height=FR4_T*2.5)-    cyl.apply_translation([cx,cy,board_top-FR4_T/2])-    cutters.append(cyl)+    cyl=trimesh.creation.cylinder(radius=DRILL[i], height=FR4_T*2.5)+    cyl.apply_translation([cx,cy,board_top-FR4_T/2]); cutters.append(cyl) slab=slab.difference(trimesh.util.concatenate(cutters), engine='manifold')  # REAL through-holes slab.fix_normals()   # outward normals so single-sided transparency renders the clean outer shell add_mesh(slab.vertices, slab.faces, [0.05,0.42,0.12,0.46], "board_fr4", double=False)-print(f"board: 1.6mm FR4 slab {bx1-bx0:.3f}x{by1-by0:.3f}m with {len(cutters)} real drilled holes")++# REAL copper: 1oz (~35um) annular ring PROUD on the FR4 top AND bottom, + a plated via barrel+# lining the drilled hole (sticks out a hair top/bottom). Not buried in the FR4.+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.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.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+    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")  # pins: merge each cluster into ONE node so it animates as a unit; detect barrel radius pin_info={}@@ -156,8 +170,8 @@ WHITE=[0.97,0.97,0.97,1.0] for k,(c,barrel_r) in pin_info.items():     name,spec_s=LABELS[k]     y0=c[1]-barrel_r-0.0028-    place_text(name,   c[0], y0,          1.3, WHITE, f"silk_{k}_0")-    place_text(spec_s, c[0], y0-0.0018,   1.1, WHITE, f"silk_{k}_1")+    place_text(name,   c[0], y0,          1.3, WHITE, f"nocast_silk_{k}_0")+    place_text(spec_s, c[0], y0-0.0018,   1.1, WHITE, f"nocast_silk_{k}_1")     print(f"  silk PIN_{k}: '{name}' / '{spec_s}'")  # --- PRESS-FIT callouts: amber text + leader arrow to a hole, explaining pin>hole (both sizes) ---@@ -181,9 +195,9 @@ def callout(anchor, spec_line, why_line, tip, start, prefix):  # medium (0.1mm interference) -> medium pin @ (40,10); large (0.15mm) -> large pin @ (10,40) callout((0.0215,0.0180), "hole Ø1.1   pin Ø1.2",  "pin 0.1mm wider = gas-tight",-        (0.0385,0.0112), (0.0300,0.0135), "cmed")+        (0.0385,0.0112), (0.0300,0.0135), "nocast_cmed") callout((0.0270,0.0315), "hole Ø3.45   pin Ø3.6", "pin 0.15mm wider = gas-tight",-        (0.0132,0.0378), (0.0195,0.0345), "clrg")+        (0.0132,0.0378), (0.0195,0.0345), "nocast_clrg") print("  callouts: PRESS-FIT -> medium @ (40,10) AND large @ (10,40)")  scene.export(OUT)