def set_fans(self): fan_overseer = Button_Group_Observer() def fans_on(state): self._fans = True def fans_off(state): self._fans = False on_button = OL_Button(roboprinter.lang.pack['Slicer_Wizard']['Fans']['fan_on'], "Icons/Slicer wizard icons/Fans on.png", fans_on, enabled = True, observer_group = fan_overseer) off_button = OL_Button(roboprinter.lang.pack['Slicer_Wizard']['Fans']['fan_off'], "Icons/Slicer wizard icons/Fans off.png", fans_off, enabled = False, observer_group = fan_overseer) bl = [on_button, off_button] layout = Override_Layout(bl, roboprinter.lang.pack['Slicer_Wizard']['Fans']['Body']) back_destination = roboprinter.robosm.current roboprinter.back_screen(name = 'fans_page', title = roboprinter.lang.pack['Slicer_Wizard']['Fans']['Title'], back_destination=back_destination, content=layout, cta = self.continue_slicing, icon = "Icons/Slicer wizard icons/next.png")
def print_quality(self): bgo_pq = Button_Group_Observer() def mm_20(state): if state: self.layer_height = 0.20 def mm_15(state): if state: self.layer_height = 0.15 def mm_10(state): if state: self.layer_height = 0.10 def mm_06(state): if state: self.layer_height = 0.06 mm_20_button = OL_Button( roboprinter.lang.pack['Slicer_Wizard']['Print_Quality']['mm_20'], "Icons/Slicer wizard icons/60px/step1 (1).png", mm_20, enabled=False, observer_group=bgo_pq) mm_15_button = OL_Button( roboprinter.lang.pack['Slicer_Wizard']['Print_Quality']['mm_15'], "Icons/Slicer wizard icons/60px/step2 (1).png", mm_15, enabled=True, observer_group=bgo_pq) mm_10_button = OL_Button( roboprinter.lang.pack['Slicer_Wizard']['Print_Quality']['mm_10'], "Icons/Slicer wizard icons/60px/step3 (1).png", mm_10, enabled=False, observer_group=bgo_pq) mm_06_button = OL_Button( roboprinter.lang.pack['Slicer_Wizard']['Print_Quality']['mm_06'], "Icons/Slicer wizard icons/60px/step4.png", mm_06, enabled=False, observer_group=bgo_pq) bl = [mm_20_button, mm_15_button, mm_10_button, mm_06_button] layout = Override_Layout( bl, roboprinter.lang.pack['Slicer_Wizard']['Print_Quality']['Body']) back_destination = roboprinter.robosm.current roboprinter.back_screen(name='print quality', title=roboprinter.lang.pack['Slicer_Wizard'] ['Print_Quality']['Title'], back_destination=back_destination, content=layout, cta=self.infill_layout, icon="Icons/Slicer wizard icons/next.png")
def infill_layout(self): bgo_pq = Button_Group_Observer() def p_0(state): if state: self.infill = 0 def p_10(state): if state: self.infill = 10 def p_25(state): if state: self.infill = 25 def p_100(state): if state: self.infill = 100 percent_0 = OL_Button( roboprinter.lang.pack['Slicer_Wizard']['Infill']['p_0'], "Icons/Slicer wizard icons/hollow.png", p_0, enabled=False, observer_group=bgo_pq) percent_10 = OL_Button( roboprinter.lang.pack['Slicer_Wizard']['Infill']['p_10'], "Icons/Slicer wizard icons/10%.png", p_10, enabled=True, observer_group=bgo_pq) percent_25 = OL_Button( roboprinter.lang.pack['Slicer_Wizard']['Infill']['p_25'], "Icons/Slicer wizard icons/25%.png", p_25, enabled=False, observer_group=bgo_pq) percent_100 = OL_Button( roboprinter.lang.pack['Slicer_Wizard']['Infill']['p_100'], "Icons/Slicer wizard icons/100%.png", p_100, enabled=False, observer_group=bgo_pq) bl = [percent_0, percent_10, percent_25, percent_100] layout = Override_Layout( bl, roboprinter.lang.pack['Slicer_Wizard']['Infill']['Body']) back_destination = roboprinter.robosm.current roboprinter.back_screen( name='infill', title=roboprinter.lang.pack['Slicer_Wizard']['Infill']['Title'], back_destination=back_destination, content=layout, cta=self.choose_material, icon="Icons/Slicer wizard icons/next.png")
def show_confirmation_screen(self): screen_name = "slicing wizard" title = roboprinter.lang.pack['Slicer_Wizard']['Confirmation']['Title'] back_destination = "File_Explorer" layout = STL_Confirmation_Screen(self.choose_overrides, self.file_data['name']) roboprinter.back_screen(name = screen_name, title = title, back_destination=back_destination, content=layout )
def firmware_updating(self): layout = Firmware_Upgrade() title = roboprinter.lang.pack['Error_Detection']['FIRMWARE']['E_Title'] name = 'firmware_update' back_destination = 'main' roboprinter.back_screen(name=name, title=title, back_destination=back_destination, content=layout)
def fil_runout(self): layout = Filament_Runout() title = roboprinter.lang.pack['Error_Detection']['FIL_RUNOUT'][ 'E_Title'] name = 'fil_runout' back_destination = 'main' roboprinter.back_screen(name=name, title=title, back_destination=back_destination, content=layout)
def bed_hot_warning(self): layout = Bed_Heating() title = roboprinter.lang.pack['Error_Detection']['BED_DISCONNECT'][ 'E_Title'] name = 'bed_warning' back_destination = 'main' roboprinter.back_screen(name=name, title=title, back_destination=back_destination, content=layout)
def set_support(self, **kwargs): sup_overseer = Button_Group_Observer() #functions to alter self.support def none(state): self.support = 'none' def buildplate(state): self.support = 'buildplate' def everywhere(state): self.support = 'everywhere' none_button = OL_Button( roboprinter.lang.pack['Slicer_Wizard']['Support']['No_Supports'], "Icons/Slicer wizard icons/No Supports.png", none, enabled=True, observer_group=sup_overseer) buildplate_button = OL_Button( roboprinter.lang.pack['Slicer_Wizard']['Support']['Buildplate'], "Icons/Slicer wizard icons/Supports buildplate.png", buildplate, enabled=False, observer_group=sup_overseer) everywhere_button = OL_Button( roboprinter.lang.pack['Slicer_Wizard']['Support']['Everywhere'], "Icons/Slicer wizard icons/Supports everywhere.png", everywhere, enabled=False, observer_group=sup_overseer) bl = [none_button, buildplate_button, everywhere_button] layout = Override_Layout( bl, roboprinter.lang.pack['Slicer_Wizard']['Support']['Body']) back_destination = roboprinter.robosm.current roboprinter.back_screen( name='support_page', title=roboprinter.lang.pack['Slicer_Wizard']['Support']['Title'], back_destination=back_destination, content=layout, cta=self.raft_option, icon="Icons/Slicer wizard icons/next.png")
def update_warning(): body_text = roboprinter.lang.pack['Update_Printer'][ 'Update_Warning']['Body'] option1 = roboprinter.lang.pack['Update_Printer'][ 'Update_Warning']['Option1'] option2 = roboprinter.lang.pack['Update_Printer'][ 'Update_Warning']['Option2'] modal_screen = Modal_Question_No_Title(body_text, option1, option2, loading_popup, cancel) name = 'update' title = roboprinter.lang.pack['Update_Printer']['Update_Warning'][ 'Title'] roboprinter.back_screen(name=name, title=title, back_destination=back_destination, content=modal_screen)
def raft_option(self): raft_bgo = Button_Group_Observer() def none(state): self.platform_adhesion = 'none' def raft(state): self.platform_adhesion = 'raft' def brim(state): self.platform_adhesion = 'brim' none_button = OL_Button( roboprinter.lang.pack['Slicer_Wizard']['Raft_Support']['no_raft'], "Icons/Slicer wizard icons/No Supports.png", none, enabled=False, observer_group=raft_bgo) raft_button = OL_Button( roboprinter.lang.pack['Slicer_Wizard']['Raft_Support']['raft'], "Icons/Slicer wizard icons/rafts_1.png", raft, enabled=True, observer_group=raft_bgo) brim_button = OL_Button( roboprinter.lang.pack['Slicer_Wizard']['Raft_Support']['brim'], "Icons/Slicer wizard icons/brim.png", brim, enabled=False, observer_group=raft_bgo) bl = [none_button, raft_button, brim_button] layout = Override_Layout( bl, roboprinter.lang.pack['Slicer_Wizard']['Raft_Support']['Body']) back_destination = roboprinter.robosm.current roboprinter.back_screen(name='raft and support', title=roboprinter.lang.pack['Slicer_Wizard'] ['Raft_Support']['Title'], back_destination=back_destination, content=layout, cta=self.print_quality, icon="Icons/Slicer wizard icons/next.png")
def update_warning(): title = roboprinter.lang.pack['Error_Detection'][ 'UPDATE_AVAILABLE']['E_Title'] body_text = roboprinter.lang.pack['Error_Detection'][ 'UPDATE_AVAILABLE']['E_Body'] option1 = roboprinter.lang.pack['Error_Detection'][ 'UPDATE_AVAILABLE']['E_Update'] option2 = roboprinter.lang.pack['Error_Detection'][ 'UPDATE_AVAILABLE']['E_Cancel'] modal_screen = Modal_Question(title, body_text, option1, option2, goto_update, cancel) name = 'update_warning' title = roboprinter.lang.pack['Error_Detection'][ 'UPDATE_AVAILABLE']['Second_Title'] back_destination = roboprinter.robosm.current roboprinter.back_screen(name=name, title=title, back_destination=back_destination, content=modal_screen)
def bed_disconnect_screen(self): title = '[color=FF0000]' + roboprinter.lang.pack['Error_Detection'][ 'BED_DISCONNECT']['E_Sub_Title'] + '[/color]' body_text = roboprinter.lang.pack['Error_Detection']['BED_DISCONNECT'][ 'E_Body'] button_text = roboprinter.lang.pack['Error_Detection'][ 'BED_DISCONNECT']['E_Button'] layout = Refresh_Screen(title, body_text, button_text, bed_disconnect=True) title = roboprinter.lang.pack['Error_Detection']['BED_DISCONNECT'][ 'E_Title'] name = 'mainboard' back_destination = 'main' roboprinter.back_screen(name=name, title=title, back_destination=back_destination, content=layout)
def main_board_disconnect(self): current_screen = roboprinter.robosm.current if current_screen != 'mainboard' and current_screen != 'mainboard_status': current_data = roboprinter.printer_instance._printer.get_current_data( ) status = current_data['state']['text'] if status.find("Offline") != -1: status = roboprinter.lang.pack['Error_Detection']['MAINBOARD'][ 'Connection_Offline'] elif status.find("Printing") != -1: while status == "Printing": current_data = roboprinter.printer_instance._printer.get_current_data( ) status = current_data['state']['text'] reset_title = roboprinter.lang.pack['Error_Detection'][ 'MAINBOARD']['E_Sub_Title'] body_text = ( roboprinter.lang.pack['Error_Detection']['MAINBOARD']['E_Body'] + '[color=FF0000]' + status.replace("Error:", "").strip() + '[/color]') button_text = roboprinter.lang.pack['Error_Detection'][ 'MAINBOARD']['E_Button'] layout = Refresh_Screen(reset_title, body_text, button_text) title = roboprinter.lang.pack['Error_Detection']['MAINBOARD'][ 'E_Title'] name = 'mainboard' back_destination = 'main' roboprinter.back_screen(name=name, title=title, back_destination=back_destination, content=layout)