コード例 #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 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")
コード例 #3
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")
コード例 #4
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")
コード例 #5
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")