kicad2ems.core.edges

Edge walls (--edge-walls): metal on the board edges where ground copper reaches
them, standing in for a row of stitching vias or edge plating (openEMS: PEC
sheets; mom25d: rows of vias). Without them the plane pairs of a test coupon are
open at the board edge and can resonate across the board (a half wave across a
14 mm FR-4 board is ~5 GHz).

A wall runs parallel to a side of the outline's bounding box, where the ground
planes end near it (planes are usually pulled back from the board edge; up to
`reach` mm in from the outline). At each point along it (sampled every `step`
mm) it spans from the lowest to the highest copper layer that has ground copper
(any modelled net that is not a signal net) at the edge, and is left out where
fewer than two layers have ground there or where signal copper on any layer
comes within `keepout` mm (a launch pad or a trace running off the edge). Sides
are named in KiCad coordinates:

    xmin = left, xmax = right, ymin = top, ymax = bottom
    (as drawn in KiCad, y down)

    walls = edge_walls(board, ['xmax'], keepout=0.5)
        # [(axis, coord, t0, t1, z0, z1)], model mm
kicad2ems.core.edges.describe(walls, model)[source]
One log line: per side, pieces and total length.
kicad2ems.core.edges.edge_walls(model, sides, keepout=0.5, step=0.1, depth=0.3, reach=2.0)[source]
Wall pieces [(axis, coord, t0, t1, z0, z1)] in model coordinates (mm): a
sheet normal to `axis` ('x' or 'y') at `coord`, from t0 to t1 along the edge
and z0 to z1 in height. The sheet stands where the planes end (up to `reach`
mm in from the outline), not on the outline itself.
kicad2ems.core.edges.parse_sides(v)[source]
'all' or a list / comma string of xmin, xmax, ymin, ymax -> list of sides
(no duplicates).
kicad2ems.core.edges.snap(walls, grid)[source]
The walls moved onto the nearest mesh line across them (a zero-thickness
sheet off the grid is dropped by openEMS).