Skip to content

Commit f7f7116

Browse files
committed
v1.3.1 - add an option to build the zone fills before panelizing
1 parent b914fef commit f7f7116

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

SparkFunKiCadPanelizer/panelizer/panelizer.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
215215
panelOutputFile = os.path.split(board.GetFileName())[1] # Get the file path tail
216216
panelOutputFile = os.path.join(panelOutputPath, os.path.splitext(panelOutputFile)[0] + "_panelized.kicad_pcb")
217217

218-
# Check if PCB needs to be saved
218+
# Check if PCB needs to be saved first
219219
#if board.IsModified(): # This doesn't work. Need to find something that does...
220220
if wx.GetApp() is not None:
221221
resp = wx.MessageBox("Do you want to save the PCB first?",
@@ -226,6 +226,18 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
226226
else:
227227
board.Save(board.GetFileName())
228228

229+
# Check if user wants to build zone fills
230+
if wx.GetApp() is not None:
231+
resp = wx.MessageBox("Do you want to build the zone fills?",
232+
'Fill zones?', wx.YES_NO | wx.ICON_INFORMATION)
233+
if resp == wx.YES:
234+
report += "Zones filled by user.\n"
235+
fillerTool = pcbnew.ZONE_FILLER(board)
236+
fillerTool.Fill(board.Zones())
237+
else:
238+
fillerTool = pcbnew.ZONE_FILLER(board)
239+
fillerTool.Fill(board.Zones())
240+
229241
if board is None:
230242
report += "Could not load board. Quitting.\n"
231243
sysExit = 2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.3.0"
1+
__version__ = "1.3.1"

0 commit comments

Comments
 (0)