kicad2ems.pcbqs.contacts

Where a part touches its pads (C13): the contact area that becomes a
terminal.

A terminal is one node, an ideal equipotential, so the copper it covers carries
current for free. For a chip part that is mostly right: the metal end cap
(termination band, a few tens of um of Cu/Ni/Sn) sits on the pad from (body
length / 2 - band) out to the body's end, and the solder fillet joins the rest
of the pad, out to its outer end, to the cap's end face, where the internal
electrodes start. Only the bare copper under the ceramic, between the pad's
inner edge and the cap, conducts as copper.

    contacts = part_contacts(part, mode='termination')   # {pad index: polygon}

mode
    'termination'  (default) two-pad SMD parts: each pad from (L / 2 - band)
                   outward, measured from the part's centre (the two pads'
                   midpoint) along its axis, with the body length L and band
                   from the package code in the footprint name
                   (C_1206_3216Metric: 3.2 mm, 0.5 mm). Without a code, or for
                   ICs (a lead or exposed pad soldered over its whole pad) and
                   through-hole pads: the whole pad.
    'pad'          the whole pad (the behaviour before 2026-11-10)
    'edge'         a 0.1 mm sliver along each pad's inner edge, toward the other
                   pad: the shortest current path a part could have, a bound and
                   not a model
kicad2ems.pcbqs.contacts.beyond(geom, origin, u, s0, s1=None)[source]
The part of a pad where s = (x - origin) . u lies in [s0, s1] (s1 None:
no upper bound); the whole pad if that is all of it, and the whole pad (a
footprint the sizes do not fit) if it is empty.
kicad2ems.pcbqs.contacts.chip_size(lib)[source]
(body length, termination band) in mm that a footprint name implies, or
None: KiCad's '<x>_0805_2012Metric', a 'NNNNMetric' alone, or an imperial
code as its own token.
kicad2ems.pcbqs.contacts.contact_terminal(part, pads, mode='termination', layers=None)[source]
[(layer, polygon)] for `pads` (a subset of part.pads), each trimmed to
its contact. `layers`: the stack's copper layer names, for through-hole pads
on '*.Cu' (rail.terminal's rule); None keeps the pad's own layers.
kicad2ems.pcbqs.contacts.part_contacts(part, mode='termination')[source]
{index into part.pads: contact polygon}: each pad's contact with the part
under `mode` (module docstring). Only two-pad SMD parts are trimmed; every
other pad is returned whole.