main
John Lauer Save native two-sided contact artwork and recorded GLB material correction; qualification remains open 57e2489
#!/usr/bin/env python3
"""Measure a restrained prototype identity block with the native font."""
import json,subprocess
from pathlib import Path
R=Path(__file__).resolve().parents[1];P=R/'design/silkscreen-review';s=json.loads((P/'bottom-candidates.json').read_text())
texts=[dict(id='identity-title',text='ADOM ELECTRONIC LOAD',x=129,y=33.8,height=1.2,width=1.2,stroke=.15,mirrored=True,rotation=0),dict(id='identity-revision',text='R0 PROTOTYPE - 2026-10',x=129,y=36.1,height=.8,width=.8,stroke=.12,mirrored=True,rotation=0),dict(id='identity-source',text='wiki.adom.inc/adom/adom-custom-electronic-load',x=129,y=38.1,height=.8,width=.8,stroke=.12,mirrored=True,rotation=0)]
r=json.loads(subprocess.check_output(['adom-bridge','--target','AdomLapper','--ai-thread','adom-custom-load','kicad_text_bounds',json.dumps(dict(filePath='C:/Users/john/adom-projects/adom-custom-electronic-load/kicad/adom-custom-electronic-load.kicad_pcb',expectedRevision=s['nativeRevision'],texts=texts))],text=True));assert r['success'];bounds={t['id']:t['box'] for t in r['texts']}
for t in texts:t.update(layer='B.SilkS',box=bounds[t['id']])
(P/'bottom-identity.json').write_text(json.dumps(dict(texts=texts,metrics=r),indent=2)+'\n');print(json.dumps(texts,indent=2))