MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / on_any_wire

Method on_any_wire

SLiCAP/schematic/canvas.py:1384–1393  ·  view source on GitHub ↗
(k: tuple)

Source from the content-addressed store, hash-verified

1382 pin_counts[k] = pin_counts.get(k, 0) + 1
1383
1384 def on_any_wire(k: tuple) -> bool:
1385 for w in wires:
1386 pts = w.points
1387 for i in range(len(pts) - 1):
1388 p1, p2 = pts[i], pts[i + 1]
1389 if _pt_key(p1) == k or _pt_key(p2) == k:
1390 return True
1391 if _pt_on_segment(k[0], k[1], p1, p2):
1392 return True
1393 return False
1394
1395 for c in comps:
1396 unconnected = set()

Callers

nothing calls this directly

Calls 2

_pt_on_segmentFunction · 0.85
_pt_keyFunction · 0.70

Tested by

no test coverage detected