Return a function mapping a component pin (local x, y) to its net name.
(components: list, wires: list)
| 23 | |
| 24 | |
| 25 | def _node_resolver(components: list, wires: list): |
| 26 | """Return a function mapping a component pin (local x, y) to its net name.""" |
| 27 | net_map = resolve_nets(components, wires) |
| 28 | |
| 29 | def _node(comp, lx: float, ly: float) -> str: |
| 30 | return net_map.get(_rpt(comp.mapToScene(QPointF(lx, ly))), "?") |
| 31 | |
| 32 | return _node |
| 33 | |
| 34 | |
| 35 | def _element_lines(components: list, node_fn) -> list[str]: |
no test coverage detected