示例#1
0
 def save_pcb_in_panel(self, txt_port):
     # set array of panels
     excludepanels=txt_port.split(",")
     panel=[]
     for p in range(excellon.get_num_panel(self.project_data['Panel'])):
         if str(p+1) in excludepanels:
             panel.append(p)
     self.paneldisselection=panel
     self.dismiss_popup()
示例#2
0
 def select_pcb_in_panel(self):
     num=excellon.get_num_panel(self.project_data['Panel'])
     content = EditPopup(save=self.save_pcb_in_panel, cancel=self.dismiss_popup)
     content.ids["btn_connect"].text = "Save"
     content.ids["text_port"].text = ""
     self._popup = Popup(title="Select Panels to exclude from Soldering example \"1,2\"", content=content,
                         size_hint=(0.5, 0.4))
     self._popup.open()
     self.project_data['CADMode']="None"
示例#3
0
 def set_num_panel(self):
     num=excellon.get_num_panel(self.project_data['Panel'])
     content = EditPopup(save=self.save_panel_num, cancel=self.dismiss_popup)
     content.ids["btn_connect"].text = "Save"
     content.ids["text_port"].text = str(num)
     self._popup = Popup(title="Select panel num", content=content,
                         size_hint=(0.5, 0.4))
     self._popup.open()
     self.project_data['CADMode']="None"
示例#4
0
 def test_soldering(self):
     ### toolbar test soldering button
     # prepare panel
     panel=[]
     for p in range(excellon.get_num_panel(self.project_data['Panel'])):
         if p not in self.paneldisselection:
             panel.append(p)
     # print
     gcode=robotcontrol.panel_soldering(self.project_data, panel, True)
     self.queue_printer_command(gcode)
示例#5
0
    def set_panel_ref1(self):
        ### click set1 button on dialpad
        index=int(self.content.ids["cur_panel"].text)
        index=min(index,excellon.get_num_panel(self.project_data['Panel']))
        index=max(index,1)

        x=float(self.content.ids["cur_X"].text)
        y=float(self.content.ids["cur_Y"].text)
        z=float(self.content.ids["cur_Z"].text)
        excellon.set_panel_reference_1(self.project_data['Panel'], index-1, x, y, z)
示例#6
0
                                     (xmax - xmin) * 100.0,
                                     (ymax - ymin) * 100.0)
if xt == 0 and yt == 0:
    print("ok pixel position min")
else:
    print("nok pixel position min", xt, yt)
xt, yt = excellon.get_pixel_position(soldertoolpath, xmax, ymax,
                                     (xmax - xmin) * 100.0,
                                     (ymax - ymin) * 100.0)
if xt == (xmax - xmin) * 100.0 and yt == (ymax - ymin) * 100.0:
    print("ok pixel position max")
else:
    print("nok pixel position max", xt, yt)
panel = []
excellon.set_num_panel(panel, 5)
num = excellon.get_num_panel(panel)
if num == 5:
    print("ok num panel")
else:
    print("nok num panel", num)

excellon.set_panel_reference_1(panel, 0, ref1x + 10, ref1y + 10, 10)
x1, y1, z1 = excellon.get_panel_reference_1(panel, 0)
if x1 == ref1x + 10 and y1 == ref1y + 10 or z1 == 10:
    print("ok panel ref 1")
else:
    print("nok panel ref 1", x1, y1, z1)

excellon.set_panel_reference_2(panel, 0, ref2x + 10, ref2y + 10, 10)
x2, y2, z2 = excellon.get_panel_reference_2(panel, 0)
if x2 == 10 + ref2x and y2 == 10 + ref2y or z2 == 10: