main
John Lauer
Save native two-sided contact artwork and recorded GLB material correction; qualification remains open
57e2489
#!/usr/bin/env python3
import json,subprocess
from pathlib import Path
R=Path(__file__).resolve().parents[1];P=R/'design/silkscreen-review';host='C:/Users/john/adom-projects/adom-custom-electronic-load/kicad';cli='C:/Users/john/AppData/Local/Programs/KiCad/10.0/bin/kicad-cli.exe'
for side in ['bottom','top']:
r=json.loads(subprocess.check_output(['adom-bridge','--target','AdomLapper','--ai-thread','adom-custom-load','shell_execute',json.dumps(dict(command=f'"{cli}" pcb render --side {side} --width 1800 --height 2000 --quality high --output "{host}/bottom-candidate-{side}.png" "{host}/bottom-artwork-candidate.kicad_pcb"',timeoutSeconds=120,reason='Native isolated artwork render; keep the live editor unchanged'))],text=True));(P/f'bottom-render-{side}.json').write_text(json.dumps(r,indent=2));assert r.get('success') and r.get('exitCode')==0,r
r=json.loads(subprocess.check_output(['adom-bridge','--target','AdomLapper','--ai-thread','adom-custom-load','pull_file',json.dumps(dict(filePaths=[host+'/bottom-candidate-'+s+'.png' for s in ['bottom','top']],saveTo=str(P)))],text=True));assert r.get('success',r.get('ok'));print('Native candidate top and bottom renders pulled')