diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e59a421..7a594081 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ CHANGELOG for FlatCAM beta ================================================= +2.01.2021 + +- removed the 'machinist setting' and allow all over the app the usages of both negative and positive values (where it is the case) + 31.12.2020 - fixed the issue with not saving the project on program close if selecting the 'Yes' option. diff --git a/appDatabase.py b/appDatabase.py index 9d9aaea2..fc5c20e1 100644 --- a/appDatabase.py +++ b/appDatabase.py @@ -29,12 +29,6 @@ class ToolsDB2UI: self.type_item_options = ['Iso', 'Rough', 'Finish'] self.tool_type_item_options = ["C1", "C2", "C3", "C4", "B", "V"] - settings = QtCore.QSettings("Open Source", "FlatCAM") - if settings.contains("machinist"): - self.machinist_setting = settings.value('machinist', type=int) - else: - self.machinist_setting = 0 - self.g_lay = grid_layout tree_layout = QtWidgets.QVBoxLayout() @@ -907,10 +901,7 @@ class ToolsDB2UI: self.drill_cutz_entry = FCDoubleSpinner(callback=self.confirmation_message) self.drill_cutz_entry.set_precision(self.decimals) - if self.machinist_setting == 0: - self.drill_cutz_entry.set_range(-10000.0000, 0.0000) - else: - self.drill_cutz_entry.set_range(-10000.0000, 10000.0000) + self.drill_cutz_entry.set_range(-10000.0000, 10000.0000) self.drill_cutz_entry.setSingleStep(0.1) self.drill_cutz_entry.setObjectName("gdb_e_cutz") @@ -976,10 +967,7 @@ class ToolsDB2UI: self.drill_travelz_entry = FCDoubleSpinner(callback=self.confirmation_message) self.drill_travelz_entry.set_precision(self.decimals) - if self.machinist_setting == 0: - self.drill_travelz_entry.set_range(0.00001, 10000.0000) - else: - self.drill_travelz_entry.set_range(-10000.0000, 10000.0000) + self.drill_travelz_entry.set_range(-10000.0000, 10000.0000) self.drill_travelz_entry.setSingleStep(0.1) self.drill_travelz_entry.setObjectName("gdb_e_travelz") @@ -1002,7 +990,7 @@ class ToolsDB2UI: ) self.drill_feedrate_z_entry = FCDoubleSpinner(callback=self.confirmation_message) self.drill_feedrate_z_entry.set_precision(self.decimals) - self.drill_feedrate_z_entry.set_range(0.0, 910000.0000) + self.drill_feedrate_z_entry.set_range(0.0, 10000.0000) self.drill_feedrate_z_entry.setSingleStep(0.1) self.drill_feedrate_z_entry.setObjectName("gdb_e_feedratez") @@ -1191,10 +1179,7 @@ class ToolsDB2UI: self.cutout_thin_depth_entry.set_precision(self.decimals) self.cutout_thin_depth_entry.setObjectName('gdb_ct_gap_depth') - if self.machinist_setting == 0: - self.cutout_thin_depth_entry.setRange(-10000.0000, -0.00001) - else: - self.cutout_thin_depth_entry.setRange(-10000.0000, 10000.0000) + self.cutout_thin_depth_entry.setRange(-10000.0000, 10000.0000) self.cutout_thin_depth_entry.setSingleStep(0.1) self.grid6.addWidget(self.thin_depth_label, 17, 0) @@ -3120,10 +3105,8 @@ class ToolsDB2(QtWidgets.QWidget): # cutz_item = FCDoubleSpinner() # cutz_item.set_precision(self.decimals) # cutz_item.setSingleStep(0.1) -# if self.app.defaults['global_machinist_setting']: -# cutz_item.set_range(-10000.0000, 10000.0000) -# else: -# cutz_item.set_range(-10000.0000, -0.0000) + +# cutz_item.set_range(-10000.0000, -0.0000) # # cutz_item.set_value(float(data['cutz'])) # widget.setCellWidget(row, 7, cutz_item) @@ -3166,10 +3149,8 @@ class ToolsDB2(QtWidgets.QWidget): # travelz_item = FCDoubleSpinner() # travelz_item.set_precision(self.decimals) # travelz_item.setSingleStep(0.1) -# if self.app.defaults['global_machinist_setting']: -# travelz_item.set_range(-10000.0000, 10000.0000) -# else: -# travelz_item.set_range(0.0000, 10000.0000) + +# travelz_item.set_range(0.0000, 10000.0000) # # travelz_item.set_value(float(data['travelz'])) # widget.setCellWidget(row, 12, travelz_item) @@ -3234,10 +3215,8 @@ class ToolsDB2(QtWidgets.QWidget): # toolchangez_item = FCDoubleSpinner() # toolchangez_item.set_precision(self.decimals) # toolchangez_item.setSingleStep(0.1) -# if self.app.defaults['global_machinist_setting']: -# toolchangez_item.set_range(-10000.0000, 10000.0000) -# else: -# toolchangez_item.set_range(0.0000, 10000.0000) + +# toolchangez_item.set_range(0.0000, 10000.0000) # # toolchangez_item.set_value(float(data['toolchangez'])) # widget.setCellWidget(row, 24, toolchangez_item) @@ -3248,10 +3227,8 @@ class ToolsDB2(QtWidgets.QWidget): # endz_item = FCDoubleSpinner() # endz_item.set_precision(self.decimals) # endz_item.setSingleStep(0.1) -# if self.app.defaults['global_machinist_setting']: -# endz_item.set_range(-10000.0000, 10000.0000) -# else: -# endz_item.set_range(0.0000, 10000.0000) + +# endz_item.set_range(0.0000, 10000.0000) # # endz_item.set_value(float(data['endz'])) # widget.setCellWidget(row, 26, endz_item) diff --git a/appGUI/MainGUI.py b/appGUI/MainGUI.py index 9b55aba1..072e8722 100644 --- a/appGUI/MainGUI.py +++ b/appGUI/MainGUI.py @@ -15,7 +15,6 @@ from PyQt5.QtCore import QSettings import platform from appGUI.GUIElements import * -from appGUI.preferences import settings from appGUI.preferences.cncjob.CNCJobPreferencesUI import CNCJobPreferencesUI from appGUI.preferences.excellon.ExcellonPreferencesUI import ExcellonPreferencesUI from appGUI.preferences.general.GeneralPreferencesUI import GeneralPreferencesUI @@ -1886,7 +1885,7 @@ class MainGUI(QtWidgets.QMainWindow): qsettings = QSettings("Open Source", "FlatCAM") if qsettings.contains("toolbar_lock"): - lock_val = settings.value('toolbar_lock') + lock_val = qsettings.value('toolbar_lock') if lock_val == 'true': lock_state = True self.lock_action.setChecked(True) diff --git a/appGUI/ObjectUI.py b/appGUI/ObjectUI.py index fac1074d..20a73b3a 100644 --- a/appGUI/ObjectUI.py +++ b/appGUI/ObjectUI.py @@ -22,12 +22,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QtCore.QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ObjectUI(QtWidgets.QWidget): """ @@ -1217,10 +1211,7 @@ class GeometryObjectUI(ObjectUI): # self.cutz_entry = FCDoubleSpinner(callback=self.confirmation_message) # self.cutz_entry.set_precision(self.decimals) # - # if machinist_setting == 0: - # self.cutz_entry.set_range(-10000.0000, 0.0000) - # else: - # self.cutz_entry.set_range(-10000.0000, 10000.0000) + # self.cutz_entry.set_range(-10000.0000, 10000.0000) # # self.cutz_entry.setSingleStep(0.1) # diff --git a/appGUI/preferences/OptionsGroupUI.py b/appGUI/preferences/OptionsGroupUI.py index f317bb58..04a846ae 100644 --- a/appGUI/preferences/OptionsGroupUI.py +++ b/appGUI/preferences/OptionsGroupUI.py @@ -8,7 +8,6 @@ from typing import Dict from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings import gettext import appTranslation as fcTranslate @@ -20,12 +19,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class OptionsGroupUI(QtWidgets.QGroupBox): app = None diff --git a/appGUI/preferences/PreferencesUIManager.py b/appGUI/preferences/PreferencesUIManager.py index 77f79d78..b5c46a2b 100644 --- a/appGUI/preferences/PreferencesUIManager.py +++ b/appGUI/preferences/PreferencesUIManager.py @@ -12,12 +12,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - log = logging.getLogger('base2') @@ -114,7 +108,6 @@ class PreferencesUIManager: "global_allow_edit_in_project_tab": self.ui.general_defaults_form.general_app_set_group.allow_edit_cb, "global_open_style": self.ui.general_defaults_form.general_app_set_group.open_style_cb, "global_toggle_tooltips": self.ui.general_defaults_form.general_app_set_group.toggle_tooltips_cb, - "global_machinist_setting": self.ui.general_defaults_form.general_app_set_group.machinist_cb, "global_bookmarks_limit": self.ui.general_defaults_form.general_app_set_group.bm_limit_spinner, "global_activity_icon": self.ui.general_defaults_form.general_app_set_group.activity_combo, @@ -999,11 +992,6 @@ class PreferencesUIManager: hud_fsize = self.ui.general_defaults_form.general_app_set_group.hud_font_size_spinner.get_value() settgs.setValue('hud_font_size', hud_fsize) - settgs.setValue( - 'machinist', - 1 if self.ui.general_defaults_form.general_app_set_group.machinist_cb.get_value() else 0 - ) - # This will write the setting to the platform specific storage. del settgs diff --git a/appGUI/preferences/__init__.py b/appGUI/preferences/__init__.py index 4ba356d6..740bca02 100644 --- a/appGUI/preferences/__init__.py +++ b/appGUI/preferences/__init__.py @@ -1,5 +1,5 @@ from appGUI.GUIElements import * -from PyQt5.QtCore import QSettings + import gettext import appTranslation as fcTranslate import builtins @@ -8,9 +8,3 @@ import builtins fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext - -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 diff --git a/appGUI/preferences/cncjob/CNCJobAdvOptPrefGroupUI.py b/appGUI/preferences/cncjob/CNCJobAdvOptPrefGroupUI.py index 482076d5..ca9e5120 100644 --- a/appGUI/preferences/cncjob/CNCJobAdvOptPrefGroupUI.py +++ b/appGUI/preferences/cncjob/CNCJobAdvOptPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCComboBox, FCSpinner, FCColorEntry, FCLabel, FCDoubleSpinner, RadioSet from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -11,12 +10,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class CNCJobAdvOptPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/cncjob/CNCJobEditorPrefGroupUI.py b/appGUI/preferences/cncjob/CNCJobEditorPrefGroupUI.py index df9cfcf2..b1c10cf9 100644 --- a/appGUI/preferences/cncjob/CNCJobEditorPrefGroupUI.py +++ b/appGUI/preferences/cncjob/CNCJobEditorPrefGroupUI.py @@ -12,12 +12,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class CNCJobEditorPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/cncjob/CNCJobGenPrefGroupUI.py b/appGUI/preferences/cncjob/CNCJobGenPrefGroupUI.py index 8bb25364..ad8bf7be 100644 --- a/appGUI/preferences/cncjob/CNCJobGenPrefGroupUI.py +++ b/appGUI/preferences/cncjob/CNCJobGenPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCCheckBox, RadioSet, FCSpinner, FCDoubleSpinner, FCSliderWithSpinner, FCColorEntry, \ FCLabel @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class CNCJobGenPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/cncjob/CNCJobOptPrefGroupUI.py b/appGUI/preferences/cncjob/CNCJobOptPrefGroupUI.py index 4ee63a9e..2515864c 100644 --- a/appGUI/preferences/cncjob/CNCJobOptPrefGroupUI.py +++ b/appGUI/preferences/cncjob/CNCJobOptPrefGroupUI.py @@ -12,12 +12,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class CNCJobOptPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/excellon/ExcellonAdvOptPrefGroupUI.py b/appGUI/preferences/excellon/ExcellonAdvOptPrefGroupUI.py index 48b77176..327bc5a9 100644 --- a/appGUI/preferences/excellon/ExcellonAdvOptPrefGroupUI.py +++ b/appGUI/preferences/excellon/ExcellonAdvOptPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCCheckBox, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -11,12 +10,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ExcellonAdvOptPrefGroupUI(OptionsGroupUI): diff --git a/appGUI/preferences/excellon/ExcellonEditorPrefGroupUI.py b/appGUI/preferences/excellon/ExcellonEditorPrefGroupUI.py index 0ee7d0bf..bd3f6c28 100644 --- a/appGUI/preferences/excellon/ExcellonEditorPrefGroupUI.py +++ b/appGUI/preferences/excellon/ExcellonEditorPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, RadioSet, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ExcellonEditorPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/excellon/ExcellonExpPrefGroupUI.py b/appGUI/preferences/excellon/ExcellonExpPrefGroupUI.py index 395738a1..10aa51da 100644 --- a/appGUI/preferences/excellon/ExcellonExpPrefGroupUI.py +++ b/appGUI/preferences/excellon/ExcellonExpPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets, QtCore -from PyQt5.QtCore import QSettings from appGUI.GUIElements import RadioSet, FCSpinner, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -11,12 +10,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ExcellonExpPrefGroupUI(OptionsGroupUI): diff --git a/appGUI/preferences/excellon/ExcellonGenPrefGroupUI.py b/appGUI/preferences/excellon/ExcellonGenPrefGroupUI.py index f6eb9a93..e6c04c5a 100644 --- a/appGUI/preferences/excellon/ExcellonGenPrefGroupUI.py +++ b/appGUI/preferences/excellon/ExcellonGenPrefGroupUI.py @@ -1,7 +1,6 @@ import platform from PyQt5 import QtWidgets, QtCore -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCCheckBox, FCSpinner, RadioSet, FCSliderWithSpinner, FCColorEntry, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -13,12 +12,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ExcellonGenPrefGroupUI(OptionsGroupUI): diff --git a/appGUI/preferences/excellon/ExcellonOptPrefGroupUI.py b/appGUI/preferences/excellon/ExcellonOptPrefGroupUI.py index aee8d03e..d0b17c4f 100644 --- a/appGUI/preferences/excellon/ExcellonOptPrefGroupUI.py +++ b/appGUI/preferences/excellon/ExcellonOptPrefGroupUI.py @@ -1,8 +1,6 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings -from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCLabel -# from appGUI.preferences import machinist_setting +from appGUI.GUIElements import FCDoubleSpinner, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI import gettext import appTranslation as fcTranslate @@ -12,12 +10,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ExcellonOptPrefGroupUI(OptionsGroupUI): diff --git a/appGUI/preferences/excellon/ExcellonPreferencesUI.py b/appGUI/preferences/excellon/ExcellonPreferencesUI.py index ee237b09..28e17488 100644 --- a/appGUI/preferences/excellon/ExcellonPreferencesUI.py +++ b/appGUI/preferences/excellon/ExcellonPreferencesUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.preferences.excellon.ExcellonEditorPrefGroupUI import ExcellonEditorPrefGroupUI from appGUI.preferences.excellon.ExcellonExpPrefGroupUI import ExcellonExpPrefGroupUI @@ -15,12 +14,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ExcellonPreferencesUI(QtWidgets.QWidget): diff --git a/appGUI/preferences/general/GeneralAPPSetGroupUI.py b/appGUI/preferences/general/GeneralAPPSetGroupUI.py index bdc1dbd6..aa716df6 100644 --- a/appGUI/preferences/general/GeneralAPPSetGroupUI.py +++ b/appGUI/preferences/general/GeneralAPPSetGroupUI.py @@ -3,7 +3,6 @@ from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCComboBox, RadioSet, OptionalInputSection, FCSpinner, \ FCColorEntry, FCLabel -from appGUI.preferences import settings from appGUI.preferences.OptionsGroupUI import OptionsGroupUI import gettext @@ -14,12 +13,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GeneralAPPSetGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): @@ -242,7 +235,7 @@ class GeneralAPPSetGroupUI(OptionsGroupUI): qsettings = QSettings("Open Source", "FlatCAM") if qsettings.contains("textbox_font_size"): - self.textbox_font_size_spinner.set_value(settings.value('textbox_font_size', type=int)) + self.textbox_font_size_spinner.set_value(qsettings.value('textbox_font_size', type=int)) else: self.textbox_font_size_spinner.set_value(10) @@ -261,7 +254,7 @@ class GeneralAPPSetGroupUI(OptionsGroupUI): qsettings = QSettings("Open Source", "FlatCAM") if qsettings.contains("hud_font_size"): - self.hud_font_size_spinner.set_value(settings.value('hud_font_size', type=int)) + self.hud_font_size_spinner.set_value(qsettings.value('hud_font_size', type=int)) else: self.hud_font_size_spinner.set_value(8) @@ -411,18 +404,6 @@ class GeneralAPPSetGroupUI(OptionsGroupUI): grid0.addWidget(self.toggle_tooltips_cb, 33, 0, 1, 2) - # Machinist settings that allow unsafe settings - self.machinist_cb = FCCheckBox(_("Allow Machinist Unsafe Settings")) - self.machinist_cb.setToolTip( - _("If checked, some of the application settings will be allowed\n" - "to have values that are usually unsafe to use.\n" - "Like Z travel negative values or Z Cut positive values.\n" - "It will applied at the next application start.\n" - "<>: Don't change this unless you know what you are doing !!!") - ) - - grid0.addWidget(self.machinist_cb, 34, 0, 1, 2) - # Bookmarks Limit in the Help Menu self.bm_limit_spinner = FCSpinner() self.bm_limit_spinner.set_range(0, 9999) diff --git a/appGUI/preferences/general/GeneralAppPrefGroupUI.py b/appGUI/preferences/general/GeneralAppPrefGroupUI.py index 9733ffb5..9ab579e4 100644 --- a/appGUI/preferences/general/GeneralAppPrefGroupUI.py +++ b/appGUI/preferences/general/GeneralAppPrefGroupUI.py @@ -15,12 +15,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GeneralAppPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/general/GeneralAppSettingsGroupUI.py b/appGUI/preferences/general/GeneralAppSettingsGroupUI.py index 51f10faa..e6e90ad1 100644 --- a/appGUI/preferences/general/GeneralAppSettingsGroupUI.py +++ b/appGUI/preferences/general/GeneralAppSettingsGroupUI.py @@ -1,6 +1,5 @@ from PyQt5 import QtCore from appGUI.GUIElements import OptionalInputSection -from appGUI.preferences import settings from appGUI.preferences.OptionUI import * from appGUI.preferences.OptionsGroupUI import OptionsGroupUI2 @@ -268,15 +267,6 @@ class GeneralAppSettingsGroupUI(OptionsGroupUI2): label_tooltip="Check this box if you want to have toolTips displayed\n" "when hovering with mouse over items throughout the App." ), - CheckboxOptionUI( - option="global_machinist_setting", - label_text="Allow Machinist Unsafe Settings", - label_tooltip="If checked, some of the application settings will be allowed\n" - "to have values that are usually unsafe to use.\n" - "Like Z travel negative values or Z Cut positive values.\n" - "It will applied at the next application start.\n" - "<>: Don't change this unless you know what you are doing !!!" - ), SpinnerOptionUI( option="global_bookmarks_limit", label_text="Bookmarks limit", diff --git a/appGUI/preferences/general/GeneralGUIPrefGroupUI.py b/appGUI/preferences/general/GeneralGUIPrefGroupUI.py index 6ddca7a4..14bc44dc 100644 --- a/appGUI/preferences/general/GeneralGUIPrefGroupUI.py +++ b/appGUI/preferences/general/GeneralGUIPrefGroupUI.py @@ -12,12 +12,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GeneralGUIPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/general/GeneralPreferencesUI.py b/appGUI/preferences/general/GeneralPreferencesUI.py index 52e9053c..fcfd43ac 100644 --- a/appGUI/preferences/general/GeneralPreferencesUI.py +++ b/appGUI/preferences/general/GeneralPreferencesUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.preferences.general.GeneralAppPrefGroupUI import GeneralAppPrefGroupUI from appGUI.preferences.general.GeneralAPPSetGroupUI import GeneralAPPSetGroupUI @@ -13,12 +12,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GeneralPreferencesUI(QtWidgets.QWidget): def __init__(self, decimals, parent=None): diff --git a/appGUI/preferences/geometry/GeometryAdvOptPrefGroupUI.py b/appGUI/preferences/geometry/GeometryAdvOptPrefGroupUI.py index 7c445d24..5c151689 100644 --- a/appGUI/preferences/geometry/GeometryAdvOptPrefGroupUI.py +++ b/appGUI/preferences/geometry/GeometryAdvOptPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, RadioSet, FCLabel, NumericalEvalTupleEntry, \ NumericalEvalEntry, FCComboBox2 @@ -13,12 +12,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GeometryAdvOptPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/geometry/GeometryEditorPrefGroupUI.py b/appGUI/preferences/geometry/GeometryEditorPrefGroupUI.py index 69b609cc..0824d054 100644 --- a/appGUI/preferences/geometry/GeometryEditorPrefGroupUI.py +++ b/appGUI/preferences/geometry/GeometryEditorPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCSpinner, RadioSet, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GeometryEditorPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/geometry/GeometryGenPrefGroupUI.py b/appGUI/preferences/geometry/GeometryGenPrefGroupUI.py index 8ccdaec8..8edfc72d 100644 --- a/appGUI/preferences/geometry/GeometryGenPrefGroupUI.py +++ b/appGUI/preferences/geometry/GeometryGenPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCCheckBox, FCSpinner, FCEntry, FCColorEntry, RadioSet, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -14,12 +13,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GeometryGenPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/geometry/GeometryOptPrefGroupUI.py b/appGUI/preferences/geometry/GeometryOptPrefGroupUI.py index 9b29c00b..106397f6 100644 --- a/appGUI/preferences/geometry/GeometryOptPrefGroupUI.py +++ b/appGUI/preferences/geometry/GeometryOptPrefGroupUI.py @@ -1,9 +1,8 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import Qt, QSettings +from PyQt5.QtCore import Qt from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, OptionalInputSection, FCSpinner, FCComboBox, \ NumericalEvalTupleEntry, FCLabel -from appGUI.preferences import machinist_setting from appGUI.preferences.OptionsGroupUI import OptionsGroupUI import gettext @@ -14,12 +13,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GeometryOptPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): @@ -52,11 +45,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI): "below the copper surface.") ) self.cutz_entry = FCDoubleSpinner() - - if machinist_setting == 0: - self.cutz_entry.set_range(-10000.0000, 0.0000) - else: - self.cutz_entry.set_range(-10000.0000, 10000.0000) + self.cutz_entry.set_range(-10000.0000, 10000.0000) self.cutz_entry.set_precision(self.decimals) self.cutz_entry.setSingleStep(0.1) @@ -105,11 +94,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI): "moving without cutting.") ) self.travelz_entry = FCDoubleSpinner() - - if machinist_setting == 0: - self.travelz_entry.set_range(0.0001, 10000.0000) - else: - self.travelz_entry.set_range(-10000.0000, 10000.0000) + self.travelz_entry.set_range(-10000.0000, 10000.0000) self.travelz_entry.set_precision(self.decimals) self.travelz_entry.setSingleStep(0.1) @@ -137,11 +122,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI): ) ) self.toolchangez_entry = FCDoubleSpinner() - - if machinist_setting == 0: - self.toolchangez_entry.set_range(0.000, 10000.0000) - else: - self.toolchangez_entry.set_range(-10000.0000, 10000.0000) + self.toolchangez_entry.set_range(-10000.0000, 10000.0000) self.toolchangez_entry.set_precision(self.decimals) self.toolchangez_entry.setSingleStep(0.1) @@ -157,11 +138,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI): "the last move at the end of the job.") ) self.endz_entry = FCDoubleSpinner() - - if machinist_setting == 0: - self.endz_entry.set_range(0.000, 10000.0000) - else: - self.endz_entry.set_range(-10000.0000, 10000.0000) + self.endz_entry.set_range(-10000.0000, 10000.0000) self.endz_entry.set_precision(self.decimals) self.endz_entry.setSingleStep(0.1) diff --git a/appGUI/preferences/geometry/GeometryPreferencesUI.py b/appGUI/preferences/geometry/GeometryPreferencesUI.py index 12a79ba2..9fc6781a 100644 --- a/appGUI/preferences/geometry/GeometryPreferencesUI.py +++ b/appGUI/preferences/geometry/GeometryPreferencesUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.preferences.geometry.GeometryEditorPrefGroupUI import GeometryEditorPrefGroupUI from appGUI.preferences.geometry.GeometryAdvOptPrefGroupUI import GeometryAdvOptPrefGroupUI @@ -14,12 +13,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GeometryPreferencesUI(QtWidgets.QWidget): diff --git a/appGUI/preferences/gerber/GerberAdvOptPrefGroupUI.py b/appGUI/preferences/gerber/GerberAdvOptPrefGroupUI.py index 9bfa0429..89a7289e 100644 --- a/appGUI/preferences/gerber/GerberAdvOptPrefGroupUI.py +++ b/appGUI/preferences/gerber/GerberAdvOptPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCCheckBox, RadioSet, FCDoubleSpinner, FCLabel, OptionalInputSection from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GerberAdvOptPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/gerber/GerberEditorPrefGroupUI.py b/appGUI/preferences/gerber/GerberEditorPrefGroupUI.py index efb3e0d8..8b7a6526 100644 --- a/appGUI/preferences/gerber/GerberEditorPrefGroupUI.py +++ b/appGUI/preferences/gerber/GerberEditorPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, FCComboBox, FCLabel, RadioSet, NumericalEvalTupleEntry from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GerberEditorPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): @@ -47,7 +40,7 @@ class GerberEditorPrefGroupUI(OptionsGroupUI): "large number of geometric elements.") ) self.sel_limit_entry = FCSpinner() - self.sel_limit_entry.set_range(0, 9999) + self.sel_limit_entry.set_range(0, 10000) grid0.addWidget(self.sel_limit_label, 0, 0) grid0.addWidget(self.sel_limit_entry, 0, 1) @@ -98,7 +91,7 @@ class GerberEditorPrefGroupUI(OptionsGroupUI): ) self.grb_array_size_entry = FCSpinner() - self.grb_array_size_entry.set_range(0, 9999) + self.grb_array_size_entry.set_range(0, 10000) grid0.addWidget(self.grb_array_size_label, 4, 0) grid0.addWidget(self.grb_array_size_entry, 4, 1) @@ -198,7 +191,7 @@ class GerberEditorPrefGroupUI(OptionsGroupUI): ) self.grb_buff_entry = FCDoubleSpinner() self.grb_buff_entry.set_precision(self.decimals) - self.grb_buff_entry.set_range(-9999, 9999) + self.grb_buff_entry.set_range(-10000, 10000) grid0.addWidget(self.grb_buff_label, 14, 0) grid0.addWidget(self.grb_buff_entry, 14, 1) @@ -213,7 +206,7 @@ class GerberEditorPrefGroupUI(OptionsGroupUI): ) self.grb_scale_entry = FCDoubleSpinner() self.grb_scale_entry.set_precision(self.decimals) - self.grb_scale_entry.set_range(0, 9999) + self.grb_scale_entry.set_range(0, 10000) grid0.addWidget(self.grb_scale_label, 16, 0) grid0.addWidget(self.grb_scale_entry, 16, 1) @@ -228,7 +221,7 @@ class GerberEditorPrefGroupUI(OptionsGroupUI): ) self.grb_ma_low_entry = FCDoubleSpinner() self.grb_ma_low_entry.set_precision(self.decimals) - self.grb_ma_low_entry.set_range(0, 9999) + self.grb_ma_low_entry.set_range(0, 10000) grid0.addWidget(self.grb_ma_low_label, 18, 0) grid0.addWidget(self.grb_ma_low_entry, 18, 1) @@ -240,7 +233,7 @@ class GerberEditorPrefGroupUI(OptionsGroupUI): ) self.grb_ma_high_entry = FCDoubleSpinner() self.grb_ma_high_entry.set_precision(self.decimals) - self.grb_ma_high_entry.set_range(0, 9999) + self.grb_ma_high_entry.set_range(0, 10000) grid0.addWidget(self.grb_ma_high_label, 19, 0) grid0.addWidget(self.grb_ma_high_entry, 19, 1) diff --git a/appGUI/preferences/gerber/GerberExpPrefGroupUI.py b/appGUI/preferences/gerber/GerberExpPrefGroupUI.py index 144d3819..900ac766 100644 --- a/appGUI/preferences/gerber/GerberExpPrefGroupUI.py +++ b/appGUI/preferences/gerber/GerberExpPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets, QtCore -from PyQt5.QtCore import QSettings from appGUI.GUIElements import RadioSet, FCSpinner, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GerberExpPrefGroupUI(OptionsGroupUI): diff --git a/appGUI/preferences/gerber/GerberGenPrefGroupUI.py b/appGUI/preferences/gerber/GerberGenPrefGroupUI.py index 92e3f9f4..864e7ba5 100644 --- a/appGUI/preferences/gerber/GerberGenPrefGroupUI.py +++ b/appGUI/preferences/gerber/GerberGenPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets, QtCore, QtGui -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCCheckBox, FCSpinner, RadioSet, FCButton, FCSliderWithSpinner, FCColorEntry, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GerberGenPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/gerber/GerberOptPrefGroupUI.py b/appGUI/preferences/gerber/GerberOptPrefGroupUI.py index 4002295a..913f5e1f 100644 --- a/appGUI/preferences/gerber/GerberOptPrefGroupUI.py +++ b/appGUI/preferences/gerber/GerberOptPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GerberOptPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/gerber/GerberPreferencesUI.py b/appGUI/preferences/gerber/GerberPreferencesUI.py index d495ead3..cb5a5f6e 100644 --- a/appGUI/preferences/gerber/GerberPreferencesUI.py +++ b/appGUI/preferences/gerber/GerberPreferencesUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.preferences.gerber.GerberEditorPrefGroupUI import GerberEditorPrefGroupUI from appGUI.preferences.gerber.GerberExpPrefGroupUI import GerberExpPrefGroupUI @@ -15,12 +14,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class GerberPreferencesUI(QtWidgets.QWidget): diff --git a/appGUI/preferences/tools/Tools2CThievingPrefGroupUI.py b/appGUI/preferences/tools/Tools2CThievingPrefGroupUI.py index de13fd9b..11c51919 100644 --- a/appGUI/preferences/tools/Tools2CThievingPrefGroupUI.py +++ b/appGUI/preferences/tools/Tools2CThievingPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, RadioSet, FCLabel, FCCheckBox from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class Tools2CThievingPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): @@ -48,7 +41,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI): ) self.circlesteps_entry = FCSpinner() - self.circlesteps_entry.set_range(1, 9999) + self.circlesteps_entry.set_range(1, 10000) grid_lay.addWidget(self.circle_steps_lbl, 2, 0) grid_lay.addWidget(self.circlesteps_entry, 2, 1) diff --git a/appGUI/preferences/tools/Tools2CalPrefGroupUI.py b/appGUI/preferences/tools/Tools2CalPrefGroupUI.py index 93011b97..a3034757 100644 --- a/appGUI/preferences/tools/Tools2CalPrefGroupUI.py +++ b/appGUI/preferences/tools/Tools2CalPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, NumericalEvalTupleEntry, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class Tools2CalPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/Tools2ExtractPrefGroupUI.py b/appGUI/preferences/tools/Tools2ExtractPrefGroupUI.py index 975a458c..cf621886 100644 --- a/appGUI/preferences/tools/Tools2ExtractPrefGroupUI.py +++ b/appGUI/preferences/tools/Tools2ExtractPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCCheckBox, RadioSet, FCDoubleSpinner, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class Tools2EDrillsPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/Tools2FiducialsPrefGroupUI.py b/appGUI/preferences/tools/Tools2FiducialsPrefGroupUI.py index b5df5a93..4511a078 100644 --- a/appGUI/preferences/tools/Tools2FiducialsPrefGroupUI.py +++ b/appGUI/preferences/tools/Tools2FiducialsPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class Tools2FiducialsPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/Tools2InvertPrefGroupUI.py b/appGUI/preferences/tools/Tools2InvertPrefGroupUI.py index 953e5326..17c51a52 100644 --- a/appGUI/preferences/tools/Tools2InvertPrefGroupUI.py +++ b/appGUI/preferences/tools/Tools2InvertPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class Tools2InvertPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/Tools2OptimalPrefGroupUI.py b/appGUI/preferences/tools/Tools2OptimalPrefGroupUI.py index e52756f3..e4f94bc5 100644 --- a/appGUI/preferences/tools/Tools2OptimalPrefGroupUI.py +++ b/appGUI/preferences/tools/Tools2OptimalPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCSpinner, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class Tools2OptimalPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/Tools2PreferencesUI.py b/appGUI/preferences/tools/Tools2PreferencesUI.py index 06ca904e..c9199a34 100644 --- a/appGUI/preferences/tools/Tools2PreferencesUI.py +++ b/appGUI/preferences/tools/Tools2PreferencesUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.preferences.tools.Tools2InvertPrefGroupUI import Tools2InvertPrefGroupUI from appGUI.preferences.tools.Tools2PunchGerberPrefGroupUI import Tools2PunchGerberPrefGroupUI @@ -19,13 +18,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - - class Tools2PreferencesUI(QtWidgets.QWidget): def __init__(self, decimals, parent=None): diff --git a/appGUI/preferences/tools/Tools2PunchGerberPrefGroupUI.py b/appGUI/preferences/tools/Tools2PunchGerberPrefGroupUI.py index 9db5c545..863a2b20 100644 --- a/appGUI/preferences/tools/Tools2PunchGerberPrefGroupUI.py +++ b/appGUI/preferences/tools/Tools2PunchGerberPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCCheckBox, RadioSet, FCDoubleSpinner, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class Tools2PunchGerberPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/Tools2QRCodePrefGroupUI.py b/appGUI/preferences/tools/Tools2QRCodePrefGroupUI.py index 8a32038e..61abe167 100644 --- a/appGUI/preferences/tools/Tools2QRCodePrefGroupUI.py +++ b/appGUI/preferences/tools/Tools2QRCodePrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCSpinner, RadioSet, FCTextArea, FCLabel, FCColorEntry from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class Tools2QRCodePrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/Tools2RulesCheckPrefGroupUI.py b/appGUI/preferences/tools/Tools2RulesCheckPrefGroupUI.py index 31b60a26..20a2cb96 100644 --- a/appGUI/preferences/tools/Tools2RulesCheckPrefGroupUI.py +++ b/appGUI/preferences/tools/Tools2RulesCheckPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCCheckBox, FCDoubleSpinner, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class Tools2RulesCheckPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/Tools2sidedPrefGroupUI.py b/appGUI/preferences/tools/Tools2sidedPrefGroupUI.py index d30f008e..aa960978 100644 --- a/appGUI/preferences/tools/Tools2sidedPrefGroupUI.py +++ b/appGUI/preferences/tools/Tools2sidedPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class Tools2sidedPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/ToolsCalculatorsPrefGroupUI.py b/appGUI/preferences/tools/ToolsCalculatorsPrefGroupUI.py index 50997829..70132cb4 100644 --- a/appGUI/preferences/tools/ToolsCalculatorsPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsCalculatorsPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCDoubleSpinner, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ToolsCalculatorsPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/ToolsCornersPrefGroupUI.py b/appGUI/preferences/tools/ToolsCornersPrefGroupUI.py index 978ccf3c..c2bb7ed9 100644 --- a/appGUI/preferences/tools/ToolsCornersPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsCornersPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCDoubleSpinner, FCLabel, RadioSet from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ToolsCornersPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/ToolsCutoutPrefGroupUI.py b/appGUI/preferences/tools/ToolsCutoutPrefGroupUI.py index 16f9ddff..2295d0b5 100644 --- a/appGUI/preferences/tools/ToolsCutoutPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsCutoutPrefGroupUI.py @@ -1,8 +1,6 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, RadioSet, FCComboBox, FCLabel -from appGUI.preferences import machinist_setting from appGUI.preferences.OptionsGroupUI import OptionsGroupUI import gettext @@ -13,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ToolsCutoutPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): @@ -64,11 +56,7 @@ class ToolsCutoutPrefGroupUI(OptionsGroupUI): ) self.cutz_entry = FCDoubleSpinner() self.cutz_entry.set_precision(self.decimals) - - if machinist_setting == 0: - self.cutz_entry.setRange(-10000.0000, 0.0000) - else: - self.cutz_entry.setRange(-10000.0000, 10000.0000) + self.cutz_entry.setRange(-10000.0000, 10000.0000) self.cutz_entry.setSingleStep(0.1) @@ -173,10 +161,7 @@ class ToolsCutoutPrefGroupUI(OptionsGroupUI): ) self.thin_depth_entry = FCDoubleSpinner() self.thin_depth_entry.set_precision(self.decimals) - if machinist_setting == 0: - self.thin_depth_entry.setRange(-10000.0000, -0.00001) - else: - self.thin_depth_entry.setRange(-10000.0000, 10000.0000) + self.thin_depth_entry.setRange(-10000.0000, 10000.0000) self.thin_depth_entry.setSingleStep(0.1) grid0.addWidget(self.thin_depth_label, 9, 0) diff --git a/appGUI/preferences/tools/ToolsDrillPrefGroupUI.py b/appGUI/preferences/tools/ToolsDrillPrefGroupUI.py index 28522eb5..d09b096d 100644 --- a/appGUI/preferences/tools/ToolsDrillPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsDrillPrefGroupUI.py @@ -1,5 +1,5 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings, Qt +from PyQt5.QtCore import Qt from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox, FCCheckBox, FCSpinner, NumericalEvalTupleEntry, \ OptionalInputSection, NumericalEvalEntry, FCLabel @@ -13,12 +13,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ToolsDrillPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): @@ -61,11 +55,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI): ) self.cutz_entry = FCDoubleSpinner() - - if machinist_setting == 0: - self.cutz_entry.set_range(-10000.0000, 0.0000) - else: - self.cutz_entry.set_range(-10000.0000, 10000.0000) + self.cutz_entry.set_range(-10000.0000, 10000.0000) self.cutz_entry.setSingleStep(0.1) self.cutz_entry.set_precision(self.decimals) @@ -103,11 +93,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI): self.travelz_entry = FCDoubleSpinner() self.travelz_entry.set_precision(self.decimals) - - if machinist_setting == 0: - self.travelz_entry.set_range(0.0001, 10000.0000) - else: - self.travelz_entry.set_range(-10000.0000, 10000.0000) + self.travelz_entry.set_range(-10000.0000, 10000.0000) grid0.addWidget(travelzlabel, 5, 0) grid0.addWidget(self.travelz_entry, 5, 1, 1, 2) @@ -129,11 +115,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI): self.toolchangez_entry = FCDoubleSpinner() self.toolchangez_entry.set_precision(self.decimals) - - if machinist_setting == 0: - self.toolchangez_entry.set_range(0.0001, 10000.0000) - else: - self.toolchangez_entry.set_range(-10000.0000, 10000.0000) + self.toolchangez_entry.set_range(-10000.0000, 10000.0000) grid0.addWidget(toolchangezlabel, 7, 0) grid0.addWidget(self.toolchangez_entry, 7, 1, 1, 2) @@ -146,11 +128,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI): ) self.endz_entry = FCDoubleSpinner() self.endz_entry.set_precision(self.decimals) - - if machinist_setting == 0: - self.endz_entry.set_range(0.0000, 10000.0000) - else: - self.endz_entry.set_range(-10000.0000, 10000.0000) + self.endz_entry.set_range(-10000.0000, 10000.0000) grid0.addWidget(endz_label, 8, 0) grid0.addWidget(self.endz_entry, 8, 1, 1, 2) diff --git a/appGUI/preferences/tools/ToolsFilmPrefGroupUI.py b/appGUI/preferences/tools/ToolsFilmPrefGroupUI.py index e6691943..98357183 100644 --- a/appGUI/preferences/tools/ToolsFilmPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsFilmPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, FCComboBox, FCColorEntry, FCLabel, FCSpinner from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ToolsFilmPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/ToolsISOPrefGroupUI.py b/appGUI/preferences/tools/ToolsISOPrefGroupUI.py index 1f21237c..b8b777b8 100644 --- a/appGUI/preferences/tools/ToolsISOPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsISOPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox2, FCCheckBox, FCSpinner, NumericalEvalTupleEntry, \ FCLabel @@ -13,12 +12,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ToolsISOPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/ToolsNCCPrefGroupUI.py b/appGUI/preferences/tools/ToolsNCCPrefGroupUI.py index 620d36ad..db95048a 100644 --- a/appGUI/preferences/tools/ToolsNCCPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsNCCPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, NumericalEvalTupleEntry, FCComboBox2, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ToolsNCCPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/ToolsPaintPrefGroupUI.py b/appGUI/preferences/tools/ToolsPaintPrefGroupUI.py index 6343b410..6dabfc07 100644 --- a/appGUI/preferences/tools/ToolsPaintPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsPaintPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox2, FCCheckBox, NumericalEvalTupleEntry, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ToolsPaintPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/ToolsPanelizePrefGroupUI.py b/appGUI/preferences/tools/ToolsPanelizePrefGroupUI.py index ad040393..31de34c5 100644 --- a/appGUI/preferences/tools/ToolsPanelizePrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsPanelizePrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCDoubleSpinner, FCSpinner, RadioSet, FCCheckBox, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ToolsPanelizePrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/ToolsPreferencesUI.py b/appGUI/preferences/tools/ToolsPreferencesUI.py index 989a348f..1172ecea 100644 --- a/appGUI/preferences/tools/ToolsPreferencesUI.py +++ b/appGUI/preferences/tools/ToolsPreferencesUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.preferences.tools.ToolsSubPrefGroupUI import ToolsSubPrefGroupUI from appGUI.preferences.tools.ToolsSolderpastePrefGroupUI import ToolsSolderpastePrefGroupUI @@ -24,12 +23,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ToolsPreferencesUI(QtWidgets.QWidget): diff --git a/appGUI/preferences/tools/ToolsSolderpastePrefGroupUI.py b/appGUI/preferences/tools/ToolsSolderpastePrefGroupUI.py index 1ce762e6..33571264 100644 --- a/appGUI/preferences/tools/ToolsSolderpastePrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsSolderpastePrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCDoubleSpinner, FCSpinner, FCComboBox, NumericalEvalTupleEntry, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ToolsSolderpastePrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/ToolsSubPrefGroupUI.py b/appGUI/preferences/tools/ToolsSubPrefGroupUI.py index 08d48d4d..e1ce8118 100644 --- a/appGUI/preferences/tools/ToolsSubPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsSubPrefGroupUI.py @@ -1,6 +1,3 @@ -from PyQt5 import QtWidgets -from PyQt5.QtCore import QSettings - from appGUI.GUIElements import FCCheckBox, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,13 +9,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - - class ToolsSubPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/tools/ToolsTransformPrefGroupUI.py b/appGUI/preferences/tools/ToolsTransformPrefGroupUI.py index bff2058d..232b1166 100644 --- a/appGUI/preferences/tools/ToolsTransformPrefGroupUI.py +++ b/appGUI/preferences/tools/ToolsTransformPrefGroupUI.py @@ -1,5 +1,4 @@ from PyQt5 import QtWidgets, QtGui -from PyQt5.QtCore import QSettings from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, NumericalEvalTupleEntry, FCComboBox, FCLabel from appGUI.preferences.OptionsGroupUI import OptionsGroupUI @@ -12,12 +11,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ToolsTransformPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/utilities/AutoCompletePrefGroupUI.py b/appGUI/preferences/utilities/AutoCompletePrefGroupUI.py index b3e5c56f..d8e1c7ec 100644 --- a/appGUI/preferences/utilities/AutoCompletePrefGroupUI.py +++ b/appGUI/preferences/utilities/AutoCompletePrefGroupUI.py @@ -12,12 +12,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class AutoCompletePrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/utilities/FAExcPrefGroupUI.py b/appGUI/preferences/utilities/FAExcPrefGroupUI.py index 06628e2a..928877f9 100644 --- a/appGUI/preferences/utilities/FAExcPrefGroupUI.py +++ b/appGUI/preferences/utilities/FAExcPrefGroupUI.py @@ -12,12 +12,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class FAExcPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/utilities/FAGcoPrefGroupUI.py b/appGUI/preferences/utilities/FAGcoPrefGroupUI.py index 465a2a87..42a3e00e 100644 --- a/appGUI/preferences/utilities/FAGcoPrefGroupUI.py +++ b/appGUI/preferences/utilities/FAGcoPrefGroupUI.py @@ -12,12 +12,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class FAGcoPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appGUI/preferences/utilities/FAGrbPrefGroupUI.py b/appGUI/preferences/utilities/FAGrbPrefGroupUI.py index 6fac9244..f6f1faf7 100644 --- a/appGUI/preferences/utilities/FAGrbPrefGroupUI.py +++ b/appGUI/preferences/utilities/FAGrbPrefGroupUI.py @@ -12,12 +12,6 @@ fcTranslate.apply_language('strings') if '_' not in builtins.__dict__: _ = gettext.gettext -settings = QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class FAGrbPrefGroupUI(OptionsGroupUI): def __init__(self, decimals=4, parent=None): diff --git a/appTools/ToolCutOut.py b/appTools/ToolCutOut.py index c2cd9d6e..defb2f0b 100644 --- a/appTools/ToolCutOut.py +++ b/appTools/ToolCutOut.py @@ -33,12 +33,6 @@ if '_' not in builtins.__dict__: log = logging.getLogger('base') -settings = QtCore.QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class CutOut(AppTool): @@ -2453,11 +2447,7 @@ class CutoutUI: ) self.cutz_entry = FCDoubleSpinner(callback=self.confirmation_message) self.cutz_entry.set_precision(self.decimals) - - if machinist_setting == 0: - self.cutz_entry.setRange(-10000.0000, -0.00001) - else: - self.cutz_entry.setRange(-10000.0000, 10000.0000) + self.cutz_entry.setRange(-10000.0000, 10000.0000) self.cutz_entry.setSingleStep(0.1) @@ -2545,10 +2535,7 @@ class CutoutUI: ) self.thin_depth_entry = FCDoubleSpinner(callback=self.confirmation_message) self.thin_depth_entry.set_precision(self.decimals) - if machinist_setting == 0: - self.thin_depth_entry.setRange(-10000.0000, -0.00001) - else: - self.thin_depth_entry.setRange(-10000.0000, 10000.0000) + self.thin_depth_entry.setRange(-10000.0000, 10000.0000) self.thin_depth_entry.setSingleStep(0.1) grid0.addWidget(self.thin_depth_label, 32, 0) diff --git a/appTools/ToolDrilling.py b/appTools/ToolDrilling.py index fc0df0ea..e5a6564d 100644 --- a/appTools/ToolDrilling.py +++ b/appTools/ToolDrilling.py @@ -37,12 +37,6 @@ if '_' not in builtins.__dict__: log = logging.getLogger('base') -settings = QtCore.QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ToolDrilling(AppTool, Excellon): builduiSig = QtCore.pyqtSignal() @@ -2345,11 +2339,7 @@ class DrillingUI: self.cutz_entry = FCDoubleSpinner(callback=self.confirmation_message) self.cutz_entry.set_precision(self.decimals) - - if machinist_setting == 0: - self.cutz_entry.set_range(-10000.0000, 0.0000) - else: - self.cutz_entry.set_range(-10000.0000, 10000.0000) + self.cutz_entry.set_range(-10000.0000, 10000.0000) self.cutz_entry.setSingleStep(0.1) self.cutz_entry.setObjectName("e_cutz") @@ -2391,11 +2381,7 @@ class DrillingUI: self.travelz_entry = FCDoubleSpinner(callback=self.confirmation_message) self.travelz_entry.set_precision(self.decimals) - - if machinist_setting == 0: - self.travelz_entry.set_range(0.00001, 10000.0000) - else: - self.travelz_entry.set_range(-10000.0000, 10000.0000) + self.travelz_entry.set_range(-10000.0000, 10000.0000) self.travelz_entry.setSingleStep(0.1) self.travelz_entry.setObjectName("e_travelz") @@ -2593,11 +2579,7 @@ class DrillingUI: ) self.toolchangez_entry.set_precision(self.decimals) self.toolchangez_entry.setObjectName("e_toolchangez") - - if machinist_setting == 0: - self.toolchangez_entry.set_range(0.0, 10000.0000) - else: - self.toolchangez_entry.set_range(-10000.0000, 10000.0000) + self.toolchangez_entry.set_range(-10000.0000, 10000.0000) self.toolchangez_entry.setSingleStep(0.1) @@ -2626,11 +2608,7 @@ class DrillingUI: self.endz_entry = FCDoubleSpinner(callback=self.confirmation_message) self.endz_entry.set_precision(self.decimals) self.endz_entry.setObjectName("e_endz") - - if machinist_setting == 0: - self.endz_entry.set_range(0.0, 10000.0000) - else: - self.endz_entry.set_range(-10000.0000, 10000.0000) + self.endz_entry.set_range(-10000.0000, 10000.0000) self.endz_entry.setSingleStep(0.1) diff --git a/appTools/ToolMilling.py b/appTools/ToolMilling.py index fc350ab0..12903363 100644 --- a/appTools/ToolMilling.py +++ b/appTools/ToolMilling.py @@ -40,12 +40,6 @@ if '_' not in builtins.__dict__: log = logging.getLogger('base') -settings = QtCore.QSettings("Open Source", "FlatCAM") -if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) -else: - machinist_setting = 0 - class ToolMilling(AppTool, Excellon): builduiSig = QtCore.pyqtSignal() @@ -3925,10 +3919,7 @@ class MillingUI: self.cutz_entry = FCDoubleSpinner(callback=self.confirmation_message) self.cutz_entry.set_precision(self.decimals) - if machinist_setting == 0: - self.cutz_entry.set_range(-10000.0000, 0.0000) - else: - self.cutz_entry.set_range(-10000.0000, 10000.0000) + self.cutz_entry.set_range(-10000.0000, 10000.0000) self.cutz_entry.setSingleStep(0.1) self.cutz_entry.setObjectName("mill_cutz") @@ -3971,10 +3962,7 @@ class MillingUI: self.travelz_entry = FCDoubleSpinner(callback=self.confirmation_message) self.travelz_entry.set_precision(self.decimals) - if machinist_setting == 0: - self.travelz_entry.set_range(0.00001, 10000.0000) - else: - self.travelz_entry.set_range(-10000.0000, 10000.0000) + self.travelz_entry.set_range(-10000.0000, 10000.0000) self.travelz_entry.setSingleStep(0.1) self.travelz_entry.setObjectName("mill_travelz") @@ -4158,10 +4146,7 @@ class MillingUI: _("Z-axis position (height) for\n" "tool change.") ) - if machinist_setting == 0: - self.toolchangez_entry.set_range(0.0, 10000.0000) - else: - self.toolchangez_entry.set_range(-10000.0000, 10000.0000) + self.toolchangez_entry.set_range(-10000.0000, 10000.0000) self.toolchangez_entry.setSingleStep(0.1) self.ois_tcz_e = OptionalInputSection(self.toolchange_cb, [self.toolchangez_entry]) @@ -4177,11 +4162,7 @@ class MillingUI: ) self.endz_entry = FCDoubleSpinner(callback=self.confirmation_message) self.endz_entry.set_precision(self.decimals) - - if machinist_setting == 0: - self.endz_entry.set_range(0.0, 10000.0000) - else: - self.endz_entry.set_range(-10000.0000, 10000.0000) + self.endz_entry.set_range(-10000.0000, 10000.0000) self.endz_entry.setSingleStep(0.1) diff --git a/app_Main.py b/app_Main.py index f82a4df9..6a2457d8 100644 --- a/app_Main.py +++ b/app_Main.py @@ -3789,10 +3789,6 @@ class App(QtCore.QObject): ) stgs.setValue('toolbar_lock', self.ui.lock_action.isChecked()) - stgs.setValue( - 'machinist', - 1 if self.ui.general_defaults_form.general_app_set_group.machinist_cb.get_value() else 0 - ) # This will write the setting to the platform specific storage. del stgs diff --git a/camlib.py b/camlib.py index a4e1e9fa..f28b4cf5 100644 --- a/camlib.py +++ b/camlib.py @@ -2649,12 +2649,6 @@ class CNCjob(Geometry): "excellon_optimization_type": "B", } - settings = QtCore.QSettings("Open Source", "FlatCAM") - if settings.contains("machinist"): - machinist_setting = settings.value('machinist', type=int) - else: - machinist_setting = 0 - def __init__(self, units="in", kind="generic", tooldia=0.0, z_cut=-0.002, z_move=0.1, @@ -3167,10 +3161,9 @@ class CNCjob(Geometry): p = self.pp_excellon # Z_cut parameter - if self.machinist_setting == 0: - self.z_cut = self.check_zcut(zcut=tool_dict["tools_drill_cutz"]) - if self.z_cut == 'fail': - return 'fail' + self.z_cut = self.check_zcut(zcut=tool_dict["tools_drill_cutz"]) + if self.z_cut == 'fail': + return 'fail' # Depth parameters self.z_cut = tool_dict['tools_drill_cutz'] @@ -3551,38 +3544,38 @@ class CNCjob(Geometry): return 'fail' else: self.z_cut = 0 - if self.machinist_setting == 0: - if self.z_cut > 0: - self.app.inform.emit('[WARNING] %s' % - _("The Cut Z parameter has positive value. " - "It is the depth value to cut into material.\n" - "The Cut Z parameter needs to have a negative value, assuming it is a typo " - "therefore the app will convert the value to negative." - "Check the resulting CNC code (Gcode etc).")) - self.z_cut = -self.z_cut - elif self.z_cut == 0 and 'laser' not in self.pp_geometry_name: - self.app.inform.emit('[WARNING] %s: %s' % - (_("The Cut Z parameter is zero. There will be no cut, skipping file"), - self.options['name'])) - return 'fail' - if self.z_move is None: - self.app.inform.emit('[ERROR_NOTCL] %s' % _("Travel Z parameter is None or zero.")) - return 'fail' + if self.z_cut > 0: + self.app.inform.emit('[WARNING] %s' % + _("The Cut Z parameter has positive value. " + "It is the depth value to cut into material.\n" + "The Cut Z parameter needs to have a negative value, assuming it is a typo " + "therefore the app will convert the value to negative." + "Check the resulting CNC code (Gcode etc).")) + self.z_cut = -self.z_cut + elif self.z_cut == 0 and 'laser' not in self.pp_geometry_name: + self.app.inform.emit('[WARNING] %s: %s' % + (_("The Cut Z parameter is zero. There will be no cut, skipping file"), + self.options['name'])) + return 'fail' - if self.z_move < 0: - self.app.inform.emit('[WARNING] %s' % - _("The Travel Z parameter has negative value. " - "It is the height value to travel between cuts.\n" - "The Z Travel parameter needs to have a positive value, assuming it is a typo " - "therefore the app will convert the value to positive." - "Check the resulting CNC code (Gcode etc).")) - self.z_move = -self.z_move - elif self.z_move == 0: - self.app.inform.emit('[WARNING] %s: %s' % - (_("The Z Travel parameter is zero. This is dangerous, skipping file"), - self.options['name'])) - return 'fail' + if self.z_move is None: + self.app.inform.emit('[ERROR_NOTCL] %s' % _("Travel Z parameter is None or zero.")) + return 'fail' + + if self.z_move < 0: + self.app.inform.emit('[WARNING] %s' % + _("The Travel Z parameter has negative value. " + "It is the height value to travel between cuts.\n" + "The Z Travel parameter needs to have a positive value, assuming it is a typo " + "therefore the app will convert the value to positive." + "Check the resulting CNC code (Gcode etc).")) + self.z_move = -self.z_move + elif self.z_move == 0: + self.app.inform.emit('[WARNING] %s: %s' % + (_("The Z Travel parameter is zero. This is dangerous, skipping file"), + self.options['name'])) + return 'fail' # made sure that depth_per_cut is no more then the z_cut if abs(self.z_cut) < self.z_depthpercut: @@ -3862,10 +3855,9 @@ class CNCjob(Geometry): self.use_ui = True if use_ui else False # Z_cut parameter - if self.machinist_setting == 0: - self.z_cut = self.check_zcut(zcut=self.z_cut) - if self.z_cut == 'fail': - return 'fail' + self.z_cut = self.check_zcut(zcut=self.z_cut) + if self.z_cut == 'fail': + return 'fail' # multidepth use this # old_zcut = deepcopy(self.z_cut) @@ -4124,23 +4116,22 @@ class CNCjob(Geometry): self.z_cut = self.exc_tools[tool]['data']['tools_drill_cutz'] gcode += self.doformat(p.z_feedrate_code) - if self.machinist_setting == 0: - if self.z_cut > 0: - self.app.inform.emit('[WARNING] %s' % - _("The Cut Z parameter has positive value. " - "It is the depth value to drill into material.\n" - "The Cut Z parameter needs to have a negative value, " - "assuming it is a typo " - "therefore the app will convert the value to negative. " - "Check the resulting CNC code (Gcode etc).")) - self.z_cut = -self.z_cut - elif self.z_cut == 0: - self.app.inform.emit('[WARNING] %s: %s' % - (_( - "The Cut Z parameter is zero. There will be no cut, " - "skipping file"), - exobj.options['name'])) - return 'fail' + if self.z_cut > 0: + self.app.inform.emit('[WARNING] %s' % + _("The Cut Z parameter has positive value. " + "It is the depth value to drill into material.\n" + "The Cut Z parameter needs to have a negative value, " + "assuming it is a typo " + "therefore the app will convert the value to negative. " + "Check the resulting CNC code (Gcode etc).")) + self.z_cut = -self.z_cut + elif self.z_cut == 0: + self.app.inform.emit('[WARNING] %s: %s' % + (_( + "The Cut Z parameter is zero. There will be no cut, " + "skipping file"), + exobj.options['name'])) + return 'fail' old_zcut = deepcopy(self.z_cut) @@ -4360,23 +4351,22 @@ class CNCjob(Geometry): self.z_cut = self.exc_tools[one_tool]['data']['tools_drill_cutz'] gcode += self.doformat(p.z_feedrate_code) - if self.machinist_setting == 0: - if self.z_cut > 0: - self.app.inform.emit('[WARNING] %s' % - _("The Cut Z parameter has positive value. " - "It is the depth value to drill into material.\n" - "The Cut Z parameter needs to have a negative value, " - "assuming it is a typo " - "therefore the app will convert the value to negative. " - "Check the resulting CNC code (Gcode etc).")) - self.z_cut = -self.z_cut - elif self.z_cut == 0: - self.app.inform.emit('[WARNING] %s: %s' % - (_( - "The Cut Z parameter is zero. There will be no cut, " - "skipping file"), - exobj.options['name'])) - return 'fail' + if self.z_cut > 0: + self.app.inform.emit('[WARNING] %s' % + _("The Cut Z parameter has positive value. " + "It is the depth value to drill into material.\n" + "The Cut Z parameter needs to have a negative value, " + "assuming it is a typo " + "therefore the app will convert the value to negative. " + "Check the resulting CNC code (Gcode etc).")) + self.z_cut = -self.z_cut + elif self.z_cut == 0: + self.app.inform.emit('[WARNING] %s: %s' % + (_( + "The Cut Z parameter is zero. There will be no cut, " + "skipping file"), + exobj.options['name'])) + return 'fail' old_zcut = deepcopy(self.z_cut) @@ -5356,38 +5346,37 @@ class CNCjob(Geometry): else: self.z_cut = 0 - if self.machinist_setting == 0: - if self.z_cut > 0: - self.app.inform.emit('[WARNING] %s' % - _("The Cut Z parameter has positive value. " - "It is the depth value to cut into material.\n" - "The Cut Z parameter needs to have a negative value, assuming it is a typo " - "therefore the app will convert the value to negative." - "Check the resulting CNC code (Gcode etc).")) - self.z_cut = -self.z_cut - elif self.z_cut == 0 and 'laser' not in self.pp_geometry_name: - self.app.inform.emit('[WARNING] %s: %s' % - (_("The Cut Z parameter is zero. There will be no cut, skipping file"), - self.options['name'])) - return 'fail' + if self.z_cut > 0: + self.app.inform.emit('[WARNING] %s' % + _("The Cut Z parameter has positive value. " + "It is the depth value to cut into material.\n" + "The Cut Z parameter needs to have a negative value, assuming it is a typo " + "therefore the app will convert the value to negative." + "Check the resulting CNC code (Gcode etc).")) + self.z_cut = -self.z_cut + elif self.z_cut == 0 and 'laser' not in self.pp_geometry_name: + self.app.inform.emit('[WARNING] %s: %s' % + (_("The Cut Z parameter is zero. There will be no cut, skipping file"), + self.options['name'])) + return 'fail' - if self.z_move is None: - self.app.inform.emit('[ERROR_NOTCL] %s' % _("Travel Z parameter is None or zero.")) - return 'fail' + if self.z_move is None: + self.app.inform.emit('[ERROR_NOTCL] %s' % _("Travel Z parameter is None or zero.")) + return 'fail' - if self.z_move < 0: - self.app.inform.emit('[WARNING] %s' % - _("The Travel Z parameter has negative value. " - "It is the height value to travel between cuts.\n" - "The Z Travel parameter needs to have a positive value, assuming it is a typo " - "therefore the app will convert the value to positive." - "Check the resulting CNC code (Gcode etc).")) - self.z_move = -self.z_move - elif self.z_move == 0: - self.app.inform.emit('[WARNING] %s: %s' % - (_("The Z Travel parameter is zero. This is dangerous, skipping file"), - self.options['name'])) - return 'fail' + if self.z_move < 0: + self.app.inform.emit('[WARNING] %s' % + _("The Travel Z parameter has negative value. " + "It is the height value to travel between cuts.\n" + "The Z Travel parameter needs to have a positive value, assuming it is a typo " + "therefore the app will convert the value to positive." + "Check the resulting CNC code (Gcode etc).")) + self.z_move = -self.z_move + elif self.z_move == 0: + self.app.inform.emit('[WARNING] %s: %s' % + (_("The Z Travel parameter is zero. This is dangerous, skipping file"), + self.options['name'])) + return 'fail' # made sure that depth_per_cut is no more then the z_cut if abs(self.z_cut) < self.z_depthpercut: @@ -5741,50 +5730,49 @@ class CNCjob(Geometry): self.pp_geometry_name = pp_geometry_name if pp_geometry_name else 'default' self.f_plunge = self.app.defaults["geometry_f_plunge"] - if self.machinist_setting == 0: - if self.z_cut is None: - if 'laser' not in self.pp_geometry_name: - self.app.inform.emit( - '[ERROR_NOTCL] %s' % _("Cut_Z parameter is None or zero. Most likely a bad combinations of " - "other parameters.") - ) - return 'fail' - else: - self.z_cut = 0.0 - - if self.z_cut > 0: - self.app.inform.emit('[WARNING] %s' % - _("The Cut Z parameter has positive value. " - "It is the depth value to cut into material.\n" - "The Cut Z parameter needs to have a negative value, assuming it is a typo " - "therefore the app will convert the value to negative." - "Check the resulting CNC code (Gcode etc).")) - self.z_cut = -self.z_cut - elif self.z_cut == 0 and 'laser' not in self.pp_geometry_name: + if self.z_cut is None: + if 'laser' not in self.pp_geometry_name: self.app.inform.emit( - '[WARNING] %s: %s' % (_("The Cut Z parameter is zero. There will be no cut, skipping file"), - geometry.options['name']) + '[ERROR_NOTCL] %s' % _("Cut_Z parameter is None or zero. Most likely a bad combinations of " + "other parameters.") ) return 'fail' + else: + self.z_cut = 0.0 - if self.z_move is None: - self.app.inform.emit('[ERROR_NOTCL] %s' % _("Travel Z parameter is None or zero.")) - return 'fail' + if self.z_cut > 0: + self.app.inform.emit('[WARNING] %s' % + _("The Cut Z parameter has positive value. " + "It is the depth value to cut into material.\n" + "The Cut Z parameter needs to have a negative value, assuming it is a typo " + "therefore the app will convert the value to negative." + "Check the resulting CNC code (Gcode etc).")) + self.z_cut = -self.z_cut + elif self.z_cut == 0 and 'laser' not in self.pp_geometry_name: + self.app.inform.emit( + '[WARNING] %s: %s' % (_("The Cut Z parameter is zero. There will be no cut, skipping file"), + geometry.options['name']) + ) + return 'fail' - if self.z_move < 0: - self.app.inform.emit('[WARNING] %s' % - _("The Travel Z parameter has negative value. " - "It is the height value to travel between cuts.\n" - "The Z Travel parameter needs to have a positive value, assuming it is a typo " - "therefore the app will convert the value to positive." - "Check the resulting CNC code (Gcode etc).")) - self.z_move = -self.z_move - elif self.z_move == 0: - self.app.inform.emit( - '[WARNING] %s: %s' % (_("The Z Travel parameter is zero. This is dangerous, skipping file"), - self.options['name']) - ) - return 'fail' + if self.z_move is None: + self.app.inform.emit('[ERROR_NOTCL] %s' % _("Travel Z parameter is None or zero.")) + return 'fail' + + if self.z_move < 0: + self.app.inform.emit('[WARNING] %s' % + _("The Travel Z parameter has negative value. " + "It is the height value to travel between cuts.\n" + "The Z Travel parameter needs to have a positive value, assuming it is a typo " + "therefore the app will convert the value to positive." + "Check the resulting CNC code (Gcode etc).")) + self.z_move = -self.z_move + elif self.z_move == 0: + self.app.inform.emit( + '[WARNING] %s: %s' % (_("The Z Travel parameter is zero. This is dangerous, skipping file"), + self.options['name']) + ) + return 'fail' # made sure that depth_per_cut is no more then the z_cut try: diff --git a/defaults.py b/defaults.py index 6d18e5c9..badf8395 100644 --- a/defaults.py +++ b/defaults.py @@ -151,7 +151,6 @@ class FlatCAMDefaults: "global_allow_edit_in_project_tab": False, "global_open_style": True, "global_toggle_tooltips": True, - "global_machinist_setting": False, "global_bookmarks": dict(), "global_bookmarks_limit": 10, "global_activity_icon": 'Ball green',