main
John Lauer
Verified thermal vias with ground continuity; device protocol and host interoperability tests; no thermal or fabricatio…
8082416
"""Land the five-via, native-DRC-checked candidate on the exact load board."""
from pathlib import Path
import json,subprocess
p=Path(__file__).resolve().parents[1];out=p/'design/thermal-r13-live';out.mkdir(exist_ok=True);board='C:/Users/john/adom-projects/adom-custom-electronic-load/kicad/adom-custom-electronic-load.kicad_pcb'
def ab(v,a,label):
d=json.loads(subprocess.check_output(['adom-bridge','--target','AdomLapper','--ai-thread','adom-custom-load',v,json.dumps(a)],text=True));(out/(label+'.json')).write_text(json.dumps(d,indent=2));assert d.get('success')is not False and not d.get('error'),str(d)[:1000];return d
r=json.load(open(p/'checkpoints/thermal-r13-diode/native-drc.json'));assert not r['unconnected_items']and not any(v['severity']=='error'for v in r['violations'])
s=ab('kicad_routing_state',{'filePath':board},'before');plan=json.load(open(p/'checkpoints/thermal-r13/with-diode-plan.json'))
for i,e in enumerate(sorted(plan['nets'],key=lambda e:e['net']!='GND')):
args={k:v for k,v in e.items()if k in ['net','width','paths','viaSize','viaDrill']};d=ab('kicad_route_net',dict(args,filePath=board,expectedRevision=s['revision'],validate=False),f'via-{i}-{e["net"]}');s=ab('kicad_routing_state',{'filePath':board},f'after-{i}')
ab('kicad_zone_state',{'filePath':board,'refill':True},'refill-request')