remove already-used vias from future iterations

This commit is contained in:
Jan Petykiewicz 2022-04-05 18:23:37 -07:00
parent 9b5d0112dd
commit 9875d80e6a

View File

@ -12,7 +12,7 @@ from pyclipper import scale_to_clipper, scale_from_clipper, PyPolyNode
from .types import connectivity_t, layer_t, contour_t from .types import connectivity_t, layer_t, contour_t
from .poly import poly_contains_points from .poly import poly_contains_points
from .clipper import union_nonzero, union_evenodd, intersection_evenodd, hier2oriented from .clipper import union_nonzero, union_evenodd, intersection_evenodd, difference_evenodd, hier2oriented
from .tracker import NetsInfo, NetName from .tracker import NetsInfo, NetName
from .utils import connectivity2layers from .utils import connectivity2layers
@ -321,6 +321,7 @@ def find_merge_pairs(
if via_polys is not None: if via_polys is not None:
top_bot = intersection_evenodd(top_polys, bot_polys) top_bot = intersection_evenodd(top_polys, bot_polys)
overlap = intersection_evenodd(top_bot, via_polys) overlap = intersection_evenodd(top_bot, via_polys)
via_polys = difference_evenodd(via_polys, overlap) # reduce set of via polys for future nets
else: else:
overlap = intersection_evenodd(top_polys, bot_polys) # TODO verify there aren't any suspicious corner cases for this overlap = intersection_evenodd(top_polys, bot_polys) # TODO verify there aren't any suspicious corner cases for this