← back to legend
Physical / electrical concepts

DSN file

Specctra DSN format — KiCad's export for handoff to external auto-routers like Freerouting. Plain text S-expression. Contains components, layers, nets, and design rules.

How it looks

Illustration: DSN text written for this card with CORE3588 values
DSN, CUT DOWN TO A FEW LINES (ILLUSTRATION)(pcb core3588.dsn (resolution um 10) (structure (layer F.Cu (type signal)) (layer B.Cu (type signal)) (rule (width 200) (clearance 200)) ) (placement (component R0603 (place R60 127500 -42700 front 180)) ) (network (net "Net-(Q1-B)" (pins Q1-1 R59-2 R60-2)) ) (wiring))
What a DSN file looks like inside, cut down to a few lines. The values are CORE3588's: 0.2 mm track width and clearance (written in microns, 200), R60's position, and the real three-pad net Net-(Q1-B) (highlighted). Written by hand for this card, because KiCad's command line cannot export DSN; the KiCad window does that.

How it works

KiCad board.kicad_pcbDSN fileparts, nets, rulesFreeroutingroutes itSES filethe tracksimported back into the KiCad boardKiCad board.kicad_pcbDSN fileparts, nets, rulesFreeroutingroutes itSES filethe tracksimported back into the KiCad boardKiCad board.kicad_pcbDSN fileparts, nets, rulesFreeroutingroutes itSES filethe tracksimported back into the KiCad boardKiCad board.kicad_pcbDSN fileparts, nets, rulesFreeroutingroutes itSES filethe tracksimported back into the KiCad boardKiCad board.kicad_pcbDSN fileparts, nets, rulesFreeroutingroutes itSES filethe tracksimported back into the KiCad boardthen KiCad DRC referees the resultTHE FREEROUTING ROUND TRIP

Where it fits

The DSN is the question; the SES file is the answer. Freerouting reads one and writes the other.

Both are text in the same nested-bracket style as KiCad's own files (s-expression), so a script can read and check them.

← back to legend