MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / _node_resolver

Function _node_resolver

SLiCAP/schematic/netlist.py:25–32  ·  view source on GitHub ↗

Return a function mapping a component pin (local x, y) to its net name.

(components: list, wires: list)

Source from the content-addressed store, hash-verified

23
24
25def _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
35def _element_lines(components: list, node_fn) -> list[str]:

Callers 2

build_netlistFunction · 0.85
build_subcircuitFunction · 0.85

Calls 1

resolve_netsFunction · 0.85

Tested by

no test coverage detected