def generateCode(self):

        feed_rate, safe_Z, max_cut_per_pass, bit_diameter, stock_thickness = self.setup.getAllData()


        self.g_code = G.startProgram(feed_rate)
        self.g_code += G.bore_circle_ID(safe_Z,
                          stock_thickness,
                          max_cut_per_pass,
                          self.tab_thickness_var.get(),
                          bit_diameter,
                          self.doughnut_ID_var.get())
        self.g_code += G.bore_tabbed_ID(safe_Z,
                          stock_thickness,
                          max_cut_per_pass,
                          self.tab_thickness_var.get(),
                          bit_diameter,
                          self.doughnut_ID_var.get(),
                          float(self.tab_width_var.get()))
        self.g_code += G.bore_circle_OD(safe_Z,
                          stock_thickness,
                          max_cut_per_pass,
                          self.tab_thickness_var.get(),
                          bit_diameter,
                          self.doughnut_OD_var.get())
        self.g_code += G.bore_tabbed_OD(safe_Z,
                          self.tab_thickness_var.get(),
                          max_cut_per_pass,
                          self.tab_thickness_var.get(),
                          bit_diameter,
                          self.doughnut_OD_var.get(),
                          float(self.tab_width_var.get()))
        self.g_code += G.endProgram()

        return self.g_code
    def generateCode(self):

        feed_rate, safe_Z, max_cut_per_pass, bit_diameter, stock_thickness = self.setup.getAllData(
        )

        self.g_code = G.startProgram(feed_rate)
        self.g_code += G.bore_circle_ID(safe_Z, stock_thickness,
                                        max_cut_per_pass,
                                        self.tab_thickness_var.get(),
                                        bit_diameter,
                                        self.doughnut_ID_var.get())
        self.g_code += G.bore_tabbed_ID(safe_Z, stock_thickness,
                                        max_cut_per_pass,
                                        self.tab_thickness_var.get(),
                                        bit_diameter,
                                        self.doughnut_ID_var.get(),
                                        float(self.tab_width_var.get()))
        self.g_code += G.bore_circle_OD(safe_Z, stock_thickness,
                                        max_cut_per_pass,
                                        self.tab_thickness_var.get(),
                                        bit_diameter,
                                        self.doughnut_OD_var.get())
        self.g_code += G.bore_tabbed_OD(safe_Z, self.tab_thickness_var.get(),
                                        max_cut_per_pass,
                                        self.tab_thickness_var.get(),
                                        bit_diameter,
                                        self.doughnut_OD_var.get(),
                                        float(self.tab_width_var.get()))
        self.g_code += G.endProgram()

        return self.g_code
 def full_doughnut(self):
     g_code = sg.startProgram(1000)
     g_code += sg.bore_circle_ID(40, 4.5, 3, 1.5, 4.763, 118)
     g_code += sg.bore_tabbed_ID(40, 1.5, 3, 1.5, 4.763, 118, 6.35)
     g_code += sg.bore_circle_OD(40, 4.5, 3, 1.5, 4.763, 150)
     g_code += sg.bore_tabbed_OD(40, 1.5, 3, 1.5, 4.763, 150, 6.35)
     g_code += sg.endProgram()
     match = self.proven_doughnut()
     self.assertEqual(g_code, match, "not a match")
 def full_doughnut(self):
     g_code = sg.startProgram(1000)
     g_code += sg.bore_circle_ID(40, 4.5, 3, 1.5, 4.763, 118)
     g_code += sg.bore_tabbed_ID(40, 1.5, 3, 1.5, 4.763, 118, 6.35)
     g_code += sg.bore_circle_OD(40, 4.5, 3, 1.5, 4.763, 150)
     g_code += sg.bore_tabbed_OD(40, 1.5, 3, 1.5, 4.763, 150, 6.35)
     g_code += sg.endProgram()
     match = self.proven_doughnut()
     self.assertEqual(g_code, match, "not a match")
 def bore_OD_equal_ID(self):
     g_code_ID = sg.bore_circle_ID(100, 11.3, 3, 1.1, 2.5, 15)
     g_code_OD = sg.bore_circle_OD(100, 11.3, 3, 1.1, 2.5, 10)
     self.assertEqual(g_code_ID, g_code_OD, "not a match")
 def bore_OD_equal_ID(self):
     g_code_ID = sg.bore_circle_ID(100, 11.3, 3, 1.1, 2.5, 15)
     g_code_OD = sg.bore_circle_OD(100, 11.3, 3, 1.1, 2.5, 10)
     self.assertEqual(g_code_ID, g_code_OD, "not a match")