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

Method _interior_tap

SLiCAP/schematic/canvas.py:1037–1051  ·  view source on GitHub ↗

Return the first interior tap position on wire, or None.

(self, wire, wires, comps)

Source from the content-addressed store, hash-verified

1035 break # restart after topology change
1036
1037 def _interior_tap(self, wire, wires, comps):
1038 """Return the first interior tap position on wire, or None."""
1039 for other in wires:
1040 if other is wire:
1041 continue
1042 for ep in (other.points[0], other.points[-1]):
1043 pk = _pt_key(ep)
1044 if _on_wire_interior(pk, wire):
1045 return pk
1046 for comp in comps:
1047 for pin_pt in comp.pin_scene_pos():
1048 pk = _pt_key(pin_pt)
1049 if _on_wire_interior(pk, wire):
1050 return pk
1051 return None
1052
1053 def _split_wire_at(self, wire, pt_key: tuple) -> None:
1054 """Split wire at an interior position, creating two sub-segments."""

Callers 1

_split_through_wiresMethod · 0.95

Calls 3

_on_wire_interiorFunction · 0.85
pin_scene_posMethod · 0.80
_pt_keyFunction · 0.70

Tested by

no test coverage detected