@@ -241,18 +241,6 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
241
241
else :
242
242
board .Save (board .GetFileName ())
243
243
244
- # Check if user wants to build zone fills
245
- if wx .GetApp () is not None :
246
- resp = wx .MessageBox ("Do you want to build the zone fills?" ,
247
- 'Fill zones?' , wx .YES_NO | wx .ICON_INFORMATION )
248
- if resp == wx .YES :
249
- report += "Zones filled by user.\n "
250
- fillerTool = pcbnew .ZONE_FILLER (board )
251
- fillerTool .Fill (board .Zones ())
252
- else :
253
- fillerTool = pcbnew .ZONE_FILLER (board )
254
- fillerTool .Fill (board .Zones ())
255
-
256
244
if board is None :
257
245
report += "Could not load board. Quitting.\n "
258
246
sysExit = 2
@@ -390,6 +378,12 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
390
378
sysExit = 2
391
379
return sysExit , report
392
380
381
+ # Fill the zones
382
+ # This prevents badness with pads on "F.Cu, B.Cu and connected layers" and "Connected layers only"
383
+ report += "Zones filled by Panelizer.\n "
384
+ fillerTool = pcbnew .ZONE_FILLER (board )
385
+ fillerTool .Fill (board .Zones ())
386
+
393
387
# Get dimensions of board
394
388
# Note: the bounding box width and height _include_ the Edge.Cuts line width.
395
389
# We will subtract it.
@@ -1214,6 +1208,12 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
1214
1208
titleblock_text .SetTextAngle (pcbnew .EDA_ANGLE (- 900 , pcbnew .TENTHS_OF_A_DEGREE_T ))
1215
1209
board .Add (titleblock_text )
1216
1210
1211
+ # Finally, refill the zones
1212
+ # This prevents the badness reported in #21
1213
+ report += "Zones refilled by Panelizer.\n "
1214
+ fillerTool = pcbnew .ZONE_FILLER (board )
1215
+ fillerTool .Fill (board .Zones ())
1216
+
1217
1217
# Save output
1218
1218
board .SetFileName (panelOutputFile )
1219
1219
board .Save (panelOutputFile )
0 commit comments