From 9ee772533586337fc5fdfb1d41f005960160a2db Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Thu, 7 Apr 2022 17:59:46 -0700 Subject: [PATCH] prescale vias --- snarled/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/snarled/main.py b/snarled/main.py index a4b0d31..4702f76 100644 --- a/snarled/main.py +++ b/snarled/main.py @@ -138,9 +138,9 @@ def trace_connectivity( # Load and union vias via_raw_polys, _labels = get_layer(via_layer) - via_polys = hier2oriented(union_input_polys( - scale_to_clipper(via_raw_polys, clipper_scale_factor) - )) + via_union = union_input_polys(scale_to_clipper(via_raw_polys, clipper_scale_factor)) + via_polylists = scale_from_clipper(hier_to_oriented(via_union), clipper_scale_factor) + via_polys = [numpy.array(vv) for vv in via_polylists) # Figure out which nets are shorted by vias, then merge them merge_pairs = find_merge_pairs(nets_info.nets, top_layer, bot_layer, via_polys, clipper_scale_factor) @@ -327,8 +327,8 @@ def find_merge_pairs( if via_polys is not None: top_bot = intersection_evenodd(top_polys, bot_polys) - overlap = check_any_intersection(scale_from_clipper(top_bot, clipper_scale_factor), - scale_from_clipper(via_polys, clipper_scale_factor)) + descaled = scale_from_clipper(top_bot, clipper_scale_factor) + overlap = check_any_intersection(descaled, 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: