Fix #3: Via placement doesn't respect single sided keepouts

This commit is contained in:
Jean-Samuel Reynaud
2018-03-29 18:19:23 +02:00
parent a21e69dac7
commit bcee242c87

View File

@ -274,7 +274,7 @@ class FillArea:
for dy in [-offset, offset]: for dy in [-offset, offset]:
point_to_test = wxPoint(current_x + dx, point_to_test = wxPoint(current_x + dx,
current_y + dy) current_y + dy)
r = area.HitTestFilledArea(point_to_test) r = area.HitTestInsideZone(point_to_test)
t = area.HitTestForEdge(point_to_test) t = area.HitTestForEdge(point_to_test)
r = r and not t r = r and not t
if keepOutMode: if keepOutMode:
@ -282,18 +282,14 @@ class FillArea:
else: else:
testResult &= r testResult &= r
if testResult:
if keepOutMode: if keepOutMode:
testResult |= r rectangle[x][y] = 0x1
else: else:
testResult &= r # Allow only if it's first step disabling
if testResult: # ie: keepout are keeped
if keepOutMode: if rectangle[x][y] == 0x8:
rectangle[x][y] = 0x1 rectangle[x][y] = 0
else:
# Allow only if it's first step disabling
# ie: keepout are keeped
if rectangle[x][y] == 0x8:
rectangle[x][y] = 0
if self.debug: if self.debug:
print("Post Area handling") print("Post Area handling")