component
Sunon MF40200V1-1000U-G99 · 5 V tachometer fan
Public Made by Adomby adom
Tachometer fan with factory flying leads, an explicit Adom connector harness and gentle GLB state demonstration.
main
"""Generate conventional connector symbols, then enforce the documented board/grid policy."""
from pathlib import Path
import subprocess
P=Path(__file__).resolve().parents[1]/'cad/harness'
for name in ['M20-1060300','M20-9990346']:
subprocess.run(['adom-symbol','create','--file',str(P/(name+'-symbol-input.json')),'--out',str(P),'--no-chip-outline'],check=True)
f=P/(name+'.kicad_sym');s=f.read_text()
for old,new in [('-2.00','-2.54'),('-4.54','-5.08'),('-7.08','-7.62')]:s=s.replace('(at -15.24 '+old+' 0)','(at -15.24 '+new+' 0)')
if name=='M20-1060300':s=s.replace('(on_board yes)','(on_board no)')
else:s=s.replace('(property "Footprint" ""','(property "Footprint" "AdomFan:Harwin_M20-9990346_1x03_P2.54mm_Vertical"')
f.write_text(s)
subprocess.run(['adom-symbol','render','--file',str(f),'--out',str(P/(name+'.svg'))],check=True)
subprocess.run(['adom-symbol','preview','--file',str(f),'--out',str(P)],check=True)