def set_sweep_shape(self, sweepShape='rectangle', simType='verifier'):
        sys.path.append(self.pluginPath)
        print self.pluginPath
        print os.getcwd()
        from Utilities import ini_worker
        reload(ini_worker)

        if simType == 'verifier':

            section_params = ini_worker.get_section_from_ini(
                self.INI_CONFIG, 'SIMULATION')

            for key, value in section_params.iteritems():
                if key == 'sweepShape':
                    print 'SIMULATION SWEEP SHAPE SWITCHED TO ' + sweepShape
                    ini_worker.write_to_section(self.INI_CONFIG, 'SIMULATION',
                                                'sweepShape', sweepShape)

        elif simType == 'MachSim':

            section_params = ini_worker.get_section_from_ini(
                self.INI_MachSim, 'startup')

            print section_params

            for key, value in section_params.iteritems():
                if key == 'tpSweepShape':
                    print 'SIMULATION SWEEP SHAPE SWITCHED TO ' + sweepShape
                    ini_worker.write_to_section(self.INI_MachSim, 'startup',
                                                'tpSweepShape', sweepShape)
    def expandCollapse(self, event, refresh=False):
        if not refresh:
            section_clicked = event.EventObject.GetName()
            if self.section_EC_stat[section_clicked]:
                self.section_EC_stat[section_clicked] = 0
                ini_worker.write_to_section(self.configFile, section_clicked, 'collapse', 0)
            else:
                self.section_EC_stat[section_clicked] = 1
                ini_worker.write_to_section(self.configFile, section_clicked, 'collapse', 1)

        self.GOC.inject_param_changed('collapse')

        self.current_y_pxpos_elem = 0
        param_indentation = 10
        headline_placed = False

        # for section, params in self.param_dict.iteritems():
        for section in self.section_list:
            if section in self.param_dict:
                for param, value in self.param_dict[section].iteritems():

                    if self.section_EC_stat[section]:
                        # value[0].ShowWithEffect(10, timeout=30)
                        if not headline_placed:
                            value[1]['headline'].SetPosition([UI.THEADERSTART['pos'][0],
                                                              UI.THEADERSTART['pos'][1] + self.current_y_pxpos_elem])
                            value[3]['button'].SetPosition([UI.BEXPAND['pos'][0],
                                                            UI.THEADERSTART['pos'][1] + self.current_y_pxpos_elem])
                            headline_placed = True
                            self.current_y_pxpos_elem += 20

                        value[0]['ebox'][0].Show()
                        value[1]['headline'].Show()
                        value[2]['text'].Show()
                        value[0]['ebox'][0].SetPosition([UI.EBOX['pos'][0],
                                                         UI.THEADERSTART['pos'][1] + self.current_y_pxpos_elem])
                        value[2]['text'].SetPosition([UI.THEADERSTART['pos'][0] + param_indentation,
                                                      UI.THEADERSTART['pos'][1] + self.current_y_pxpos_elem])

                        self.current_y_pxpos_elem += 20

                    else:
                        # value[0].HideWithEffect(10, timeout=30)
                        if not headline_placed:

                            value[1]['headline'].SetPosition([UI.THEADERSTART['pos'][0],
                                                              UI.THEADERSTART['pos'][1] + self.current_y_pxpos_elem])

                            value[3]['button'].SetPosition([UI.BEXPAND['pos'][0],
                                                            UI.THEADERSTART['pos'][1] + self.current_y_pxpos_elem])

                            headline_placed = True
                            self.current_y_pxpos_elem += 20

                        value[0]['ebox'][0].Hide()
                        value[2]['text'].Hide()

                headline_placed = False
 def OnExit(self, event):
     self.Destroy()
     self.GOC.inject_runstat(False)
     self.KST.kill_sheduler()
     PG_XY = self.GetScreenPosition()
     ini_worker.write_to_section(self.PGconfigFileCore, 'UISETTINGS', 'lastWindowPosition', str(PG_XY))
     PG_SIZE = self.GetSize()
     PG_SIZE[0] = self.MIN_SIZE_W
     ini_worker.write_to_section(self.PGconfigFileCore, 'UISETTINGS', 'lastWindowSize', str(PG_SIZE))
Beispiel #4
0
 def OnExit(self, event):
     self.Destroy()
     self.GOC.inject_runstat(False)
     self.KST.kill_sheduler()
     PG_XY = self.GetScreenPosition()
     ini_worker.write_to_section(self.PGconfigFileCore, 'UISETTINGS',
                                 'lastWindowPosition', str(PG_XY))
     PG_SIZE = self.GetSize()
     PG_SIZE[0] = self.MIN_SIZE_W
     ini_worker.write_to_section(self.PGconfigFileCore, 'UISETTINGS',
                                 'lastWindowSize', str(PG_SIZE))
    def set_sweep_shape(self, sweepShape='rectangle'):
        sys.path.append(self.pluginPath)
        print self.pluginPath
        print os.getcwd()
        from Utilities import ini_worker
        reload(ini_worker)

        section_params = ini_worker.get_section_from_ini(self.INI_CONFIG, 'SIMULATION')

        for key, value in section_params.iteritems():
            if key == 'sweepShape':
                print 'SIMULATION SWEEP SHAPE SWITCHED TO ' + sweepShape
                ini_worker.write_to_section(self.INI_CONFIG, 'SIMULATION', 'sweepShape', sweepShape)
Beispiel #6
0
    def switch(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker

        reload(ini_worker)

        section_params = ini_worker.get_section_from_ini(self.INI_CONFIG, self.feature)

        for key, value in section_params.iteritems():
            if key == "create":
                if int(value) == 0:
                    print self.feature + " SWITCHED TO ON"
                    ini_worker.write_to_section(self.INI_CONFIG, self.feature, "create", 1)
                else:
                    print self.feature + " SWITCHED TO OFF"
                    ini_worker.write_to_section(self.INI_CONFIG, self.feature, "create", 0)
Beispiel #7
0
    def set_floor_layers(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        num = raw_input('Define number of solid floor layer: ')
        try:
            num = float(num)
        except:
            print 'This is not a valid number'
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'solidFloorLayers', num)
        except:
            raise
Beispiel #8
0
    def set_rotation_angle(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        num = raw_input('Define rotation angle of pattern [deg]: ')
        try:
            num = float(num)
        except:
            print 'This is not a valid number'
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature, 'angle',
                                        num)
        except:
            raise
Beispiel #9
0
    def set_first_layer_slicer_height(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        num = raw_input('Define first layer height [mm]: ')
        try:
            num = float(num)
        except:
            print 'This is not a valid number'
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'firstLayerHeight', num)
        except:
            raise
Beispiel #10
0
    def set_support_overhang_angle(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        num = raw_input('Define overhang angle [deg]: ')
        try:
            num = float(num)
        except:
            print 'This is not a valid number'
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'overhangAngleThreshold', num)
        except:
            raise
Beispiel #11
0
    def set_distance(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        num = raw_input('Define the distance to object: ')
        try:
            num = int(num)
        except:
            print 'This is not a valid number'
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'distance', num)
        except:
            raise
Beispiel #12
0
    def set_num(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker

        reload(ini_worker)

        num = raw_input("Define the number of perimeter: ")
        try:
            num = int(num)
        except:
            print "This is not a valid number"
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature, "perimeterCount", num)
        except:
            raise
Beispiel #13
0
    def set_path_width(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker

        reload(ini_worker)

        num = raw_input("Define path width: ")
        try:
            num = float(num)
        except:
            print "This is not a valid number"
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature, "pathWidth", num)
        except:
            raise
Beispiel #14
0
    def set_first_layer_slicer_height(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker

        reload(ini_worker)

        num = raw_input("Define first layer height [mm]: ")
        try:
            num = float(num)
        except:
            print "This is not a valid number"
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature, "firstLayerHeight", num)
        except:
            raise
Beispiel #15
0
    def set_support_overhang_angle(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker

        reload(ini_worker)

        num = raw_input("Define overhang angle [deg]: ")
        try:
            num = float(num)
        except:
            print "This is not a valid number"
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature, "overhangAngleThreshold", num)
        except:
            raise
Beispiel #16
0
    def set_distance(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker

        reload(ini_worker)

        num = raw_input("Define the distance to object: ")
        try:
            num = int(num)
        except:
            print "This is not a valid number"
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature, "distance", num)
        except:
            raise
Beispiel #17
0
    def adjust_abs_folder(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker

        abs_path_file = self.corePath + '\\' + self.configFile

        print abs_path_file

        ini_worker.write_to_section(abs_path_file,
                                    'MESH',
                                    'filename',
                                    self.corePath + '\\' + 'Mesh.stl')

        ini_worker.write_to_section(abs_path_file,
                                    'GCODE',
                                    'filename',
                                    self.corePath + '\\' + 'Mesh.gcode')
Beispiel #18
0
    def set_path_width(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        num = raw_input('Define path width: ')
        try:
            num = float(num)
        except:
            print 'This is not a valid number'
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'pathWidth', num)
        except:
            raise
Beispiel #19
0
    def set_num(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        num = raw_input('Define the number of perimeter: ')
        try:
            num = int(num)
        except:
            print 'This is not a valid number'
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'perimeterCount', num)
        except:
            raise
Beispiel #20
0
    def set_connection_angle(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker

        reload(ini_worker)

        num = raw_input("Define connection angle of pattern [deg]. Set to zero to disable connections: ")
        try:
            num = float(num)
        except:
            print "This is not a valid number"
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature, "maxConnectionAngle", num)
        except:
            raise
Beispiel #21
0
    def set_floor_layers(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker

        reload(ini_worker)

        num = raw_input("Define number of solid floor layer: ")
        try:
            num = float(num)
        except:
            print "This is not a valid number"
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature, "solidFloorLayers", num)
        except:
            raise
Beispiel #22
0
    def set_min_segment_length(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        num = raw_input('Define min segment length: ')
        try:
            num = float(num)
        except:
            print 'This is not a valid number'
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'minLength', num)
            print 'DONE'
        except:
            raise
Beispiel #23
0
    def set_connection_sparse_onoff(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        num = raw_input('Switch connections to on or off: ')
        try:
            num = float(num)
        except:
            print 'This is not a valid number'
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'connectSparse', num)
            print 'DONE'
        except:
            raise
Beispiel #24
0
    def switch(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        section_params = ini_worker.get_section_from_ini(
            self.INI_CONFIG, self.feature)

        for key, value in section_params.iteritems():
            if key == 'create':
                if int(value) == 0:
                    print self.feature + ' SWITCHED TO ON'
                    ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                                'create', 1)
                else:
                    print self.feature + ' SWITCHED TO OFF'
                    ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                                'create', 0)
Beispiel #25
0
    def set_filter_tolerance(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        num = raw_input('Define filter tolerance: ')
        try:
            num = float(num)
        except:
            print 'This is not a valid number'
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'filterTolerance', num)
            print 'DONE'
        except:
            raise
Beispiel #26
0
    def set_infill_pattern(self, pattern="cross"):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker

        reload(ini_worker)

        if pattern == "parallel":
            print "Infill pattern set to parallel"
            try:
                ini_worker.write_to_section(self.INI_CONFIG, self.feature, "cross", 0)
            except:
                raise
        elif pattern == "cross":
            print "Infill pattern set to cross"
            try:
                ini_worker.write_to_section(self.INI_CONFIG, self.feature, "cross", 1)
            except:
                raise
Beispiel #27
0
    def set_minimum_sparse_ratio(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        num = raw_input('Define ratio of sparse to solid: ')
        try:
            num = float(num)
        except:
            print 'This is not a valid number'
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'minimumSparseRatio', num)
            print 'DONE'
        except:
            raise
Beispiel #28
0
    def set_infill_pattern(self, pattern='cross'):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        if pattern == 'parallel':
            print 'Infill pattern set to parallel'
            try:
                ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                            'cross', 0)
            except:
                raise
        elif pattern == 'cross':
            print 'Infill pattern set to cross'
            try:
                ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                            'cross', 1)
            except:
                raise
Beispiel #29
0
    def set_feed_rate(self, num=None):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker

        reload(ini_worker)

        if num is None:
            num = raw_input("Define feed rate [mm\min] > " + self.feature)
        try:
            num = float(num)
        except:
            print "This is not a valid number"
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature, "feedrate", num)
        except:
            raise

        return num
Beispiel #30
0
    def set_feed_rate(self, num=None):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        if num is None:
            num = raw_input('Define feed rate [mm\min] > ' + self.feature)
        try:
            num = float(num)
        except:
            print 'This is not a valid number'
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'feedrate', num)
        except:
            raise

        return num
Beispiel #31
0
    def set_support_grid(self, num=None):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker

        reload(ini_worker)

        if num is None:
            num = raw_input("Define grid square area of support tower (define one side here) [mm]: ")
        try:
            num = float(num)
        except:
            print "This is not a valid number"
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature, "baseWidth", num)
        except:
            raise

        return num
Beispiel #32
0
    def set_support_foot_height(self, num=None):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        if num is None:
            num = raw_input('Define foot height of support tower [mm]: ')
        try:
            num = float(num)
        except:
            print 'This is not a valid number'
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'footHeight', num)
        except:
            raise

        return num
Beispiel #33
0
    def set_support_foot_height(self, num=None):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker

        reload(ini_worker)

        if num is None:
            num = raw_input("Define foot height of support tower [mm]: ")
        try:
            num = float(num)
        except:
            print "This is not a valid number"
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature, "footHeight", num)
        except:
            raise

        return num
Beispiel #34
0
    def set_support_grid(self, num=None):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        if num is None:
            num = raw_input(
                'Define grid square area of support tower (define one side here) [mm]: '
            )
        try:
            num = float(num)
        except:
            print 'This is not a valid number'
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'fieldWidth', num)
        except:
            raise

        return num
    def run(self):
        while self.running:
            while self.last_key_stroke == None:
                if not self.running:
                    break
            if not self.running:
                break

            # time.sleep(self.time_interval)
            time_delta = 0
            while time_delta <= self.time_interval:
                time_delta = time.time() - self.last_key_stroke

            if str(ini_worker.get_param_from_ini(self.configFile, self.section, self.param)) != str(self.value):
                ini_worker.write_to_section(self.configFile,
                                            self.section,
                                            self.param,
                                            self.value)

            self.last_key_stroke = None

        print '--|X|-- key guard unplugged'
Beispiel #36
0
    def run(self):
        while self.running:
            while self.last_key_stroke == None:
                if not self.running:
                    break
            if not self.running:
                break

            # time.sleep(self.time_interval)
            time_delta = 0
            while time_delta <= self.time_interval:
                time_delta = time.time() - self.last_key_stroke

            if str(
                    ini_worker.get_param_from_ini(
                        self.configFile, self.section, self.param)) != str(
                            self.value):
                ini_worker.write_to_section(self.configFile, self.section,
                                            self.param, self.value)

            self.last_key_stroke = None

        print '--|X|-- key guard unplugged'
    def set_simulation_precision(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        num = raw_input('Define simulation precision [mm]. Press ESC for automated calculation: ')
        try:
            num = float(num)
        except:
            print 'Simulation set to automatic solution'
            ini_worker.write_to_section(self.INI_CONFIG, self.feature, 'precision', 'auto')
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature, 'precision', num)
        except:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature, 'precision', 'auto')
    def set_simulation_precision(self):
        sys.path.append(self.pluginPath)
        from Utilities import ini_worker
        reload(ini_worker)

        num = raw_input(
            'Define simulation precision [mm]. Press ESC for automated calculation: '
        )
        try:
            num = float(num)
        except:
            print 'Simulation set to automatic solution'
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'precision', 'auto')
            return

        try:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'precision', num)
        except:
            ini_worker.write_to_section(self.INI_CONFIG, self.feature,
                                        'precision', 'auto')
Beispiel #39
0
    def expandCollapse(self, event, refresh=False):
        if not refresh:
            section_clicked = event.EventObject.GetName()
            if self.section_EC_stat[section_clicked]:
                self.section_EC_stat[section_clicked] = 0
                ini_worker.write_to_section(self.configFile, section_clicked,
                                            'collapse', 0)
            else:
                self.section_EC_stat[section_clicked] = 1
                ini_worker.write_to_section(self.configFile, section_clicked,
                                            'collapse', 1)

        self.GOC.inject_param_changed('collapse')

        self.current_y_pxpos_elem = 0
        param_indentation = 10
        headline_placed = False

        # for section, params in self.param_dict.iteritems():
        for section in self.section_list:
            if section in self.param_dict:
                for param, value in self.param_dict[section].iteritems():

                    if self.section_EC_stat[section]:
                        # value[0].ShowWithEffect(10, timeout=30)
                        if not headline_placed:
                            value[1]['headline'].SetPosition([
                                UI.THEADERSTART['pos'][0],
                                UI.THEADERSTART['pos'][1] +
                                self.current_y_pxpos_elem
                            ])
                            value[3]['button'].SetPosition([
                                UI.BEXPAND['pos'][0],
                                UI.THEADERSTART['pos'][1] +
                                self.current_y_pxpos_elem
                            ])
                            headline_placed = True
                            self.current_y_pxpos_elem += 20

                        value[0]['ebox'][0].Show()
                        value[1]['headline'].Show()
                        value[2]['text'].Show()
                        value[0]['ebox'][0].SetPosition([
                            UI.EBOX['pos'][0], UI.THEADERSTART['pos'][1] +
                            self.current_y_pxpos_elem
                        ])
                        value[2]['text'].SetPosition([
                            UI.THEADERSTART['pos'][0] + param_indentation,
                            UI.THEADERSTART['pos'][1] +
                            self.current_y_pxpos_elem
                        ])

                        self.current_y_pxpos_elem += 20

                    else:
                        # value[0].HideWithEffect(10, timeout=30)
                        if not headline_placed:

                            value[1]['headline'].SetPosition([
                                UI.THEADERSTART['pos'][0],
                                UI.THEADERSTART['pos'][1] +
                                self.current_y_pxpos_elem
                            ])

                            value[3]['button'].SetPosition([
                                UI.BEXPAND['pos'][0],
                                UI.THEADERSTART['pos'][1] +
                                self.current_y_pxpos_elem
                            ])

                            headline_placed = True
                            self.current_y_pxpos_elem += 20

                        value[0]['ebox'][0].Hide()
                        value[2]['text'].Hide()

                headline_placed = False
Beispiel #40
0
import sys

sys.path.append(
    r'C:\Users\ModuleWoks\Documents\Development\GitRep\gcode2cutsim')

import rhinoscriptsyntax as rs
from Utilities import ini_worker

reload(ini_worker)

INI_CONFIG = r'C:\StoreDaily\Mesh.ini'

section_params = ini_worker.get_section_from_ini(INI_CONFIG, 'BRIM')

for key, value in section_params.iteritems():
    if key == 'create':
        if int(value) == 0:
            print 'BRIM SWITCHED TO ON'
            ini_worker.write_to_section(INI_CONFIG, 'BRIM', 'create', 1)
        else:
            print 'BRIM SWITCHED TO OFF'
            ini_worker.write_to_section(INI_CONFIG, 'BRIM', 'create', 0)
Beispiel #41
0
import sys

sys.path.append(r'C:\Users\ModuleWoks\Documents\Development\GitRep\gcode2cutsim')

import rhinoscriptsyntax as rs
from Utilities import ini_worker

reload(ini_worker)

INI_CONFIG = r'D:\StoreDaily\Mesh.ini'

section_params = ini_worker.get_section_from_ini(INI_CONFIG, 'INFILL')

for key, value in section_params.iteritems():
    if key == 'cross':
        if int(value) == 0:
            print 'INFILL PATTERN SWITCHHED TO CROSS'
            ini_worker.write_to_section(INI_CONFIG, 'INFILL', 'cross', 1)
        else:
            print 'INFILL PATTERN SWITCHHED TO PARALLEL'
            ini_worker.write_to_section(INI_CONFIG, 'INFILL', 'cross', 0)
Beispiel #42
0
import sys

sys.path.append(r'C:\Users\ModuleWoks\Documents\Development\GitRep\gcode2cutsim')

import rhinoscriptsyntax as rs
from Utilities import ini_worker

reload(ini_worker)

INI_CONFIG = r'C:\StoreDaily\Mesh.ini'

section_params = ini_worker.get_section_from_ini(INI_CONFIG, 'BRIM')

for key, value in section_params.iteritems():
    if key == 'create':
        if int(value) == 0:
            print 'BRIM SWITCHED TO ON'
            ini_worker.write_to_section(INI_CONFIG, 'BRIM', 'create', 1)
        else:
            print 'BRIM SWITCHED TO OFF'
            ini_worker.write_to_section(INI_CONFIG, 'BRIM', 'create', 0)