shibosoftwaredev/f1c100s-linux-nema17-stepper-controller

A four-layer NEMA 17 motor-controller PCB combining an Allwinner F1C100S Linux computer, USB‑PD/buck power system, W5500 Ethernet, STM32 real-time motion control, DRV8825 stepper driver, protection/temperature/current telemetry, USB interfaces, and local LED/buzzer diagnostics.

Version
0.4.56
License
unset
Stars
0

scripts/reshape-swap-enable.py

"""Separate the enable and supply transition corridors without cutting copper."""
from route_geometry import *
p=json.loads(Path('routing/swap-enable-physical.json').read_text())
authored=json.loads(Path('routing/review-finished-copper.json').read_text())
assert len(authored['vias'])==1 and all(w['net']=='N167' for w in authored['wires'])
for w in authored['wires']:p['wires'].remove(w)
p['vias'].remove(authored['vias'][0])
tail=authored['wires'][1]['points'][1:]
wires=[dict(net='N167',layer='inner1',width=.15,points=[[19.05,-1.3],[20.746804856811785,-3.79676521683322],[20.65,-8.5]]),
       dict(net='N167',layer='top',width=.15,points=[[20.65,-8.5],[20.1,-8.5],[20.1,-12.7]]+tail)]
vias=[dict(net='N167',x=20.65,y=-8.5)]
p['wires']+=wires;p['vias']+=vias
Path('routing/swap-enable-separated.json').write_text(json.dumps(p,indent=2)+'\n')
Path('reports/swap-enable-separated.json').write_text(json.dumps(dict(notInstalled=True,wires=wires,vias=vias),indent=2)+'\n')