kicad2ems.core.lines.elements

The line model's data: Element (one section between two nodes) and LineModel
(the netlist, the ports' paths, coupled groups and discontinuities) that
builder.build fills and fastsolve.py, the report, the GUI's overlay and the
KiCad plugin read. Units: mm, Ohm; model coordinates (y up).
class kicad2ems.core.lines.elements.Element(kind, a, b, length, **kw)[source]
One piece of the line model between nodes a and b ('gnd' for a shunt
part). kind: 'trace' | 'pad' | 'via' | 'part'. xs: the cross-section
('microstrip', 'embedded microstrip', 'stripline', 'offset stripline',
'cpwg', 'coax', 'lumped', 'no reference'). Lengths mm.
class kicad2ems.core.lines.elements.LineModel[source]
nodes: set of node names; elements: [Element]; ports {port name: node};
port_z0 {name: ohm}; paths [(port, other port or None, [(Element, start mm,
reversed)], branches)]; notes.
drawing(cu_z=None)[source]
JSON-friendly geometry of the model for the GUI's viewer
(<name>_lines.json): every element with its points (model mm, y up), its
layer's height (cu_z: {layer: z mm}) and its row (Z0, eeff, length,
delay), and each path as the ids of its elements in order.
summary()[source]
JSON-friendly: every path as a list of section rows with their start
positions.
kicad2ems.core.lines.elements.direction_at(line, s, eps=0.001)[source]
The unit direction of a shapely line s mm along it, between the points
eps mm either side.