From d6f43eb4e43e488745849a684eee75665303ddc3 Mon Sep 17 00:00:00 2001 From: Jean-Samuel Reynaud Date: Tue, 13 Jun 2017 12:48:36 +0200 Subject: [PATCH] Try to avoid via close to edge. Not a complete solution since there are no good solution for than with current Python API in KiCad --- ViaStitching/FillArea.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ViaStitching/FillArea.py b/ViaStitching/FillArea.py index dd2f5f1..fe4486f 100755 --- a/ViaStitching/FillArea.py +++ b/ViaStitching/FillArea.py @@ -270,8 +270,11 @@ class FillArea: current_y = origin.y + (y * self.step) for dx in [-offset, offset]: for dy in [-offset, offset]: - r = area.HitTestFilledArea(wxPoint(current_x + dx, - current_y + dy)) + point_to_test = wxPoint(current_x + dx, + current_y + dy) + r = area.HitTestFilledArea(point_to_test) + t = area.HitTestForEdge(point_to_test) + r = r and not t if keepOutMode: testResult |= r else: