Port check
port_check
Port-pair connection check used by :mod:kfnetlist.extract.
PortCheck
Bases: IntFlag
Bitmask of pairwise port-port comparison results.
Source code in src/kfnetlist/port_check.py
12 13 14 15 16 17 18 19 20 21 22 23 | |
PortLike
Bases: Protocol
Duck-typed shape consumed by :func:check_connection.
Exactly one of trans / dcplx_trans must be set.
Source code in src/kfnetlist/port_check.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
check_connection
check_connection(
p1: PortLike,
p2: PortLike,
*,
tolerance: float = 0.1,
angle_tolerance: float = 0.01,
snapped: bool = False,
) -> int
Compare two ports, returning a :class:PortCheck bitmask.
Integer transforms are used when both ports expose trans (or when
snapped=True); otherwise the complex transforms are used with the
supplied tolerances. cross_section implies layer and width.
Source code in src/kfnetlist/port_check.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | |