kicad2ems.core.layout

The board as drawn, for a front end to show before anything is run: every net's
copper by layer, the outline, the stack and the footprints, with no ports asked
for (a board for a rail's drop or a crosstalk question has none).

    from kicad2ems.core.layout import board_layout, net_at, part_at
    lay = board_layout('board.kicad_pcb')  # Board.to_dict() of all the copper,
                                           # plus 'footprints'
    net_at(lay, 'F.Cu', x, y)              # the net whose copper is under a
                                           # point (model mm), or None
    part_at(lay, 'F.Cu', x, y)             # the footprint whose pads' box is
                                           # under it, or None

It is the model board's own dict (model mm: y up, y = -y of KiCad), so what
draws a run's board draws this; with
    footprints  [dict(ref, value, layer, box=[x0, y0, x1, y1], pads=[dict(name,
                net)])]: every footprint with a pad on copper, its box the pads'
                (a part to pick, a pad's net)
A front end lets an analysis's setting be picked from it where the option says
what it holds (an option's `pick`:
'net', 'nets', 'part' or 'parts').
kicad2ems.core.layout.board_layout(path)[source]
The layout of a .kicad_pcb (the module docstring has its form).
ValueError: not a board that can be read.
kicad2ems.core.layout.net_at(layout, layer, x, y)[source]
The net whose copper on `layer` is under (x, y) (model mm), or None; a
named net before an unnamed one. (The layer's shapes are prepared once and
kept in the layout, under '_prepared'.)
kicad2ems.core.layout.part_at(layout, layer, x, y)[source]
The footprint whose pads' box on `layer` is under (x, y): the smallest
such box's (a part inside another's outline), or None.