Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
Corrected testing code
Browse files Browse the repository at this point in the history
Added instrumentation to debug #112
  • Loading branch information
MitjaNemec committed Dec 16, 2020
1 parent 6e17e5b commit 2519b2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions net2net_min_distance/net2net_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def segments_distance(x11, y11, x12, y12, x21, y21, x22, y22):
distances.append(point_segment_distance(x12, y12, x21, y21, x22, y22))
distances.append(point_segment_distance(x21, y21, x11, y11, x12, y12))
distances.append(point_segment_distance(x22, y22, x11, y11, x12, y12))

logger.info("All distances:\n" + repr(distances))
return min(distances, key=lambda t: t[0])


Expand Down Expand Up @@ -163,14 +163,14 @@ def main():
pads = mod.Pads()
for pad in pads:
if pad.GetPadName() == u'2':
pad1 = pad
pad1_net = pad.GetNetname()
mod = board.FindModuleByReference('R102')
pads = mod.Pads()
for pad in pads:
if pad.GetPadName() == u'2':
pad2 = pad
pad2_net = pad.GetNetname()

dis, loc = get_min_distance(board, pad1, pad2)
dis, loc = get_min_distance(board, [pad1_net, pad2_net])


# for testing purposes only
Expand Down
2 changes: 1 addition & 1 deletion net2net_min_distance/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15
16

0 comments on commit 2519b2d

Please sign in to comment.