Beispiel #1
0
 def Onclick(self, e):
     try:
         if self.chkBOM.GetValue():
             self.area_text.AppendText("Start generate BOM list\n")
         if self.chkPos.GetValue():
             self.area_text.AppendText("Start generate position file\n")
         global unusedRef
         unusedRef = ExcludeRefClass(self.exclude_ref_text.GetValue())
         global removedRefs
         removedRefs = {}
         GenMFDoc(needGenBOM=self.chkBOM.GetValue(),
                  needGenPos=self.chkPos.GetValue(),
                  logger=lambda *args: self.log(*args))
         #self.area_text.AppendText("Removed refs in BOM: " + ",".join(ref_sorted(removedRefs.keys())) + "\n")
         self.area_text.AppendText("Removed refs in BOM:\n")
         for n in ref_sorted(removedRefs.keys()):
             self.area_text.AppendText(n + ":" + removedRefs[n] + "\n")
         if self.chkGerber.GetValue():
             self.area_text.AppendText("Start generate gerber files\n")
             split_slot = None
             if self.chkSplitSlot.GetValue():
                 split_slot = 0.2
             gerberPath = gd.GenGerberDrill(
                 board=None,
                 split_G85=split_slot,
                 plotDir="gerber/",
                 plotReference=self.chkPlotRef.GetValue(),
                 logger=lambda *args: self.log(*args))
             self.area_text.AppendText('Gerber file dir is "%s"' %
                                       gerberPath)
     except Exception as e:
         self.area_text.AppendText("Error:\n")
         self.area_text.AppendText(traceback.format_exc())
Beispiel #2
0
 def Onclick(self, e):
     try:
         if self.chkBOM.GetValue():
             self.area_text.AppendText("Start generate BOM list\n")
         if self.chkPos.GetValue():
             self.area_text.AppendText("Start generate position file\n")
         GenMFDoc(needGenBOM=self.chkBOM.GetValue(),
                  needGenPos=self.chkPos.GetValue(),
                  logger=lambda *args: self.log(*args))
         if self.chkGerber.GetValue():
             self.area_text.AppendText("Start generate gerber files\n")
             split_slot = None
             if self.chkSplitSlot.GetValue():
                 split_slot = 0.2
             gerberPath = gd.GenGerberDrill(
                 board=None,
                 split_G85=split_slot,
                 plotDir="gerber/",
                 plotReference=self.chkPlotRef.GetValue(),
                 logger=lambda *args: self.log(*args))
             self.area_text.AppendText('Gerber file dir is "%s"' %
                                       gerberPath)
     except Exception as e:
         self.area_text.AppendText("Error:\n")
         self.area_text.AppendText(traceback.format_exc())
Beispiel #3
0
 def Run(self):
     bomName, posName = GenMFDoc()
     gerberPath = gd.GenGerberDrill(board=None,
                                    split_G85=0.2,
                                    plotDir="gerber/")
     msg = 'BOM file is "%s"\n' % bomName
     msg = msg + 'Position file is "%s"\n' % posName
     msg = msg + 'Gerber file dir is "%s"' % gerberPath
     wx.MessageBox(msg)
Beispiel #4
0
def GenSMTFiles():
    #reload(sys)
    #sys.setdefaultencoding("utf8")
    GenMFDoc()
    gd.GenGerberDrill(board=None, split_G85=0.2, plotDir="gerber/")