main
John Lauer Preserve board29, component assets and scaffold-fit correction candidate with reviewed footage c54169e
#!/usr/bin/env python3
"""Export the current saved prototype for digital-twin review, not fabrication release."""
import json,subprocess
from pathlib import Path
R=Path(__file__).resolve().parents[1];O=R/'mechanical/board23-review';O.mkdir(exist_ok=True);host='C:/Users/john/adom-projects/adom-custom-electronic-load';cli='C:/Users/john/AppData/Local/Programs/KiCad/10.0/bin/kicad-cli.exe'
def call(v,a,f):
 r=json.loads(subprocess.check_output(['adom-bridge','--target','AdomLapper','--ai-thread','adom-custom-load',v,json.dumps(a)],text=True));(O/f).write_text(json.dumps(r,indent=2)+'\n');assert r.get('success',r.get('ok')) and r.get('exitCode',0)==0,r;return r
call('shell_execute',dict(command=f'"{cli}" pcb export step --subst-models --include-tracks --include-pads --include-zones --include-soldermask --include-silkscreen --output "{host}/review/board23-mechanical.step" "{host}/kicad/adom-custom-electronic-load.kicad_pcb"',timeoutSeconds=120,reason='Export saved board23 for prototype digital-twin review; thermal gate remains open'),'native-export.json')
call('pull_file',dict(filePaths=[host+'/review/board23-mechanical.step'],saveTo=str(O)),'native-pull.json');print('Current prototype STEP exported and pulled')