kicad2ems.core.importers.kicad.sexpr

KiCad S-expression reader and small node accessors.

    root = parse_sexpr(open('board.kicad_pcb').read())
    for seg in items(root, 'segment'): ...
kicad2ems.core.importers.kicad.sexpr.filled(node, default=True)[source]
Fill flag of a graphic: (fill solid|yes) / (fill none|no); `default` when
there is none.
kicad2ems.core.importers.kicad.sexpr.pts(node)[source]
Points of a (pts ...) list: (xy x y) entries and, in KiCad 7+ polygons,
(arc (start) (mid) (end)) entries expanded into points along the arc.
kicad2ems.core.importers.kicad.sexpr.width(node, default=0.0)[source]
Line width: (stroke (width w)) in KiCad 7+, (width w) before.