@@ -241,18 +241,6 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
241241 else :
242242 board .Save (board .GetFileName ())
243243
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-
256244 if board is None :
257245 report += "Could not load board. Quitting.\n "
258246 sysExit = 2
@@ -390,6 +378,12 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
390378 sysExit = 2
391379 return sysExit , report
392380
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+
393387 # Get dimensions of board
394388 # Note: the bounding box width and height _include_ the Edge.Cuts line width.
395389 # We will subtract it.
@@ -1214,6 +1208,12 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
12141208 titleblock_text .SetTextAngle (pcbnew .EDA_ANGLE (- 900 , pcbnew .TENTHS_OF_A_DEGREE_T ))
12151209 board .Add (titleblock_text )
12161210
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+
12171217 # Save output
12181218 board .SetFileName (panelOutputFile )
12191219 board .Save (panelOutputFile )
0 commit comments