KiCad 10's kicad-cli has no specctra subcommands, kipy has no Specctra support, and pcbnew.ImportSpecctraSES needs a GUI display. This adds a pure-Python applier that injects FreeRouting's routed wires and vias directly into a .kicad_pcb, reusing the existing sexp_tree engine. Reads the (resolution unit value) scope for scaling, applies the Specctra Y-up to KiCad Y-down flip, maps SES net names to board net numbers, and splices (segment)/(via) nodes in before the board's closing paren so the rest of the file is preserved byte-for-byte. Fixtures are a real Arduino_Mega template board and a FreeRouting-routed SES; the integration test applies 23 segments across GND and +5V.
140 lines
3.1 KiB
Plaintext
140 lines
3.1 KiB
Plaintext
(session oracle
|
|
(base_design oracle)
|
|
(placement
|
|
(resolution um 10)
|
|
(component "Connector_PinSocket_2.54mm:PinSocket_2x18_P2.54mm_Vertical"
|
|
(place J7 1939800 -923800 front 180)
|
|
)
|
|
(component "Connector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_Vertical"
|
|
(place J1 1279400 -974600 front 90)
|
|
(place J3 1508000 -974600 front 90)
|
|
(place J5 1736600 -974600 front 90)
|
|
(place J4 1457200 -492000 front 90)
|
|
(place J6 1685800 -492000 front 90)
|
|
)
|
|
(component "Connector_PinSocket_2.54mm:PinSocket_1x10_P2.54mm_Vertical"
|
|
(place J2 1187960 -492000 front 90)
|
|
)
|
|
(component "Arduino_MountingHole:MountingHole_3.2mm"
|
|
(place MH6 1965200 -974600 front 0)
|
|
(place MH1 1152400 -492000 front 0)
|
|
(place MH2 1139700 -974600 front 0)
|
|
(place MH3 1660400 -644400 front 0)
|
|
(place MH4 1660400 -923800 front 0)
|
|
(place MH5 1901700 -492000 front 0)
|
|
)
|
|
)
|
|
(was_is
|
|
)
|
|
(routes
|
|
(resolution um 10)
|
|
(parser
|
|
(host_cad "KiCad's Pcbnew")
|
|
(host_version "10.0.4")
|
|
)
|
|
(library_out
|
|
(padstack "Via[0-1]_600:300_um"
|
|
(shape
|
|
(circle F.Cu 6000 0 0)
|
|
)
|
|
(shape
|
|
(circle B.Cu 6000 0 0)
|
|
)
|
|
(attach off)
|
|
)
|
|
(padstack "Via[0-1]_600:300_um"
|
|
(shape
|
|
(circle F.Cu 6000 0 0)
|
|
)
|
|
(shape
|
|
(circle B.Cu 6000 0 0)
|
|
)
|
|
(attach off)
|
|
)
|
|
)
|
|
(network_out
|
|
(net GND
|
|
(wire
|
|
(path F.Cu 2000
|
|
1965200 -923800
|
|
1939800 -923800
|
|
)
|
|
)
|
|
(wire
|
|
(path F.Cu 2000
|
|
1939800 -923800
|
|
1928283 -923800
|
|
)
|
|
)
|
|
(wire
|
|
(path F.Cu 2000
|
|
1431800 -974600
|
|
1443317 -974600
|
|
)
|
|
)
|
|
(wire
|
|
(path F.Cu 2000
|
|
1443317 -974600
|
|
1443317 -971720
|
|
1451954 -963083
|
|
1889000 -963083
|
|
1928283 -923800
|
|
)
|
|
)
|
|
(wire
|
|
(path F.Cu 2000
|
|
1431800 -974600
|
|
1406400 -974600
|
|
)
|
|
)
|
|
(wire
|
|
(path B.Cu 2000
|
|
1406400 -974600
|
|
1406400 -963083
|
|
)
|
|
)
|
|
(wire
|
|
(path B.Cu 2000
|
|
1264160 -492000
|
|
1264160 -820843
|
|
1406400 -963083
|
|
)
|
|
)
|
|
)
|
|
(net +5V
|
|
(wire
|
|
(path F.Cu 2000
|
|
1965200 -492000
|
|
1939800 -492000
|
|
)
|
|
)
|
|
(wire
|
|
(path B.Cu 2000
|
|
1939800 -492000
|
|
1928283 -492000
|
|
)
|
|
)
|
|
(wire
|
|
(path B.Cu 2000
|
|
1381000 -974600
|
|
1392517 -974600
|
|
)
|
|
)
|
|
(wire
|
|
(path B.Cu 2000
|
|
1392517 -974600
|
|
1392517 -977479
|
|
1401428 -986390
|
|
1411199 -986390
|
|
1419100 -978489
|
|
1419100 -970794
|
|
1651108 -738786
|
|
1686270 -738786
|
|
1928283 -496773
|
|
1928283 -492000
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
) |