示例#1
0
    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")
示例#2
0
    def __init__(self, move, toggle_mm):

        #create Icons
        self.move = move
        tool_observer = Button_Group_Observer()
        #button_function, button_variable, background_normal, control_image, button_text
        retract = Motor_Control_Operator(
            self.move.move_neg, 'e', 'Icons/button_pause_blank.png',
            'Icons/Manual_Control/retract_icon.png',
            lang.pack['Motor_Controls']['Retract'])
        extrude = Motor_Control_Operator(
            self.move.move_pos, 'e', 'Icons/button_pause_blank.png',
            'Icons/Manual_Control/extrude_icon.png',
            lang.pack['Motor_Controls']['Extrude'])
        self.temp_controls = Temperature_Operator(
            roboprinter.robosm.generate_temperature_controls, 'tool0',
            'Icons/blue_button_style.png')
        # body_text, image_source, button_function, enabled = True, observer_group = None, **kwargs
        ext_1 = OL_Button(lang.pack['Temperature_Controls']["Extruder_1"],
                          'Icons/System_Icons/Extruder1.png',
                          self.change_tool_ext1,
                          enabled=True,
                          observer_group=tool_observer)
        ext_2 = OL_Button(lang.pack['Temperature_Controls']["Extruder_2"],
                          'Icons/System_Icons/Extruder2.png',
                          self.change_tool_ext2,
                          enabled=False,
                          observer_group=tool_observer)

        button_list = [
            toggle_mm, retract, ext_1, self.temp_controls, extrude, ext_2
        ]

        super(Dual_Extruder_Movement, self).__init__(button_list)
示例#3
0
    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")
示例#4
0
    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")
示例#5
0
    def __init__(self):
        super(Switchable_Motors, self).__init__()
        mover = Mover(self)
        observer = Button_Group_Observer()
        self.toggle_mm_xyz = Toggle_mm(self.change_mm, name='xyz', observer=observer)
        self.toggle_mm_ext = Toggle_mm(self.change_mm, name='ext', observer=observer)
        self.xyz_move = XYZ_Movement(mover, self.toggle_mm_xyz)
        printer_type = roboprinter.printer_instance._settings.global_get(['printerProfiles', 'defaultProfile'])
        if printer_type['extruder']['count'] == 1:
            self.extruder = Extruder_Movement(mover, self.toggle_mm_ext)
        elif printer_type['extruder']['count'] > 1:
            self.extruder = Dual_Extruder_Movement(mover, self.toggle_mm_ext)
        self.switch_list = [self.xyz_move, self.extruder]

        self.clear_widgets()
        self.add_widget(self.switch_list[self.current_screen])
示例#6
0
    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")
示例#7
0
    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")
示例#8
0
    def open_3_point_screen(self):
        #turn off fans
        roboprinter.printer_instance._printer.commands('M106 S0')
       
        def point_1(state):
            if state:
                roboprinter.printer_instance._printer.commands('G1 Z10')
                roboprinter.printer_instance._printer.commands('G1 X35 Y35 F5000') # go to first corner
                roboprinter.printer_instance._printer.commands('G1 Z0')

        def point_2(state):
            if state:
                roboprinter.printer_instance._printer.commands('G1 Z10')
                roboprinter.printer_instance._printer.commands('G1 X160 Y35 F5000') # go to first corner
                roboprinter.printer_instance._printer.commands('G1 Z0')

        def point_3(state):
            if state:
                roboprinter.printer_instance._printer.commands('G1 Z10')
                roboprinter.printer_instance._printer.commands('G1 X160 Y160 F5000') # go to first corner
                roboprinter.printer_instance._printer.commands('G1 Z0')

        def point_4(state):
            if state:
                roboprinter.printer_instance._printer.commands('G1 Z10')
                roboprinter.printer_instance._printer.commands('G1 X35 Y160 F5000') # go to first corner
                roboprinter.printer_instance._printer.commands('G1 Z0')

        #make the button observer
        point_observer = Button_Group_Observer()

        #make the buttons
        p1 = OL_Button(roboprinter.lang.pack['Bed_Cal_Wizard']['Manual_Instructions']['Left'], 
                       "Icons/Bed_Calibration/Bed placement left.png",
                       point_1,
                       enabled = True,
                       observer_group = point_observer)
        p2 = OL_Button(roboprinter.lang.pack['Bed_Cal_Wizard']['Manual_Instructions']['Right'], 
                       "Icons/Bed_Calibration/Bed placement right.png",
                       point_2,
                       enabled = False,
                       observer_group = point_observer)
        p3 = OL_Button(roboprinter.lang.pack['Bed_Cal_Wizard']['Manual_Instructions']['Back_Right'], 
                       "Icons/Bed_Calibration/Bed placement back right.png",
                       point_3,
                       enabled = False,
                       observer_group = point_observer)
        p4 = OL_Button(roboprinter.lang.pack['Bed_Cal_Wizard']['Manual_Instructions']['Back_Left'], 
                       "Icons/Bed_Calibration/Bed placement back left.png",
                       point_4,
                       enabled = False,
                       observer_group = point_observer)

        bl2 = [p1, p2]
        bl1 = [p4, p3]

        #make screen
        layout = Quad_Icon_Layout(bl1, bl2,  roboprinter.lang.pack['Bed_Cal_Wizard']['Manual_Instructions']['Sub_Title'])
        back_destination = roboprinter.robo_screen()
        roboprinter.back_screen(name = 'point_selection', 
                                title = roboprinter.lang.pack['Bed_Cal_Wizard']['Manual_Instructions']['Title'], 
                                back_destination=back_destination, 
                                content=layout,
                                cta = self.finish_screws_instructions,
                                icon = "Icons/Slicer wizard icons/next.png")