From c7074d71bafea4d83324ca6cf5316d269e129eb1 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sun, 2 Feb 2020 15:54:09 +0200 Subject: [PATCH] - fixed an error in Gerber Parser; the initial values for currnet_x, current_y were None but should have been 0.0 - limited the lower limit of angle of V-tip to a value of 1 because 0 makes no sense --- README.md | 2 ++ flatcamGUI/ObjectUI.py | 4 ++-- flatcamGUI/PreferencesUI.py | 6 +++--- flatcamParsers/ParseGerber.py | 8 ++++---- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 90b2adbe..daf74c75 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ CAD program, and create G-Code for Isolation routing. - fixed issue #376 where the V-Shape parameters from Gerber UI are not transfered to the resulting Geometry object if the 'combine' checkbox is not checked in the Gerber UI - in Excellon UI, if Basic application mode is selected in Preferences, the Plot column 'P' is hidden now because some inexperienced users mistake this column checkboxes for tool selection +- fixed an error in Gerber Parser; the initial values for currnet_x, current_y were None but should have been 0.0 +- limited the lower limit of angle of V-tip to a value of 1 because 0 makes no sense 31.01.2020 diff --git a/flatcamGUI/ObjectUI.py b/flatcamGUI/ObjectUI.py index 6270e332..0b5b251a 100644 --- a/flatcamGUI/ObjectUI.py +++ b/flatcamGUI/ObjectUI.py @@ -327,7 +327,7 @@ class GerberObjectUI(ObjectUI): "In degree.") ) self.tipangle_spinner = FCDoubleSpinner() - self.tipangle_spinner.set_range(0, 180) + self.tipangle_spinner.set_range(1, 180) self.tipangle_spinner.set_precision(self.decimals) self.tipangle_spinner.setSingleStep(5) self.tipangle_spinner.setWrapping(True) @@ -1628,7 +1628,7 @@ class GeometryObjectUI(ObjectUI): ) self.tipangle_entry = FCDoubleSpinner() self.tipangle_entry.set_precision(self.decimals) - self.tipangle_entry.set_range(0.0, 180.0) + self.tipangle_entry.set_range(1.0, 180.0) self.tipangle_entry.setSingleStep(1) self.grid3.addWidget(self.tipanglelabel, 2, 0) diff --git a/flatcamGUI/PreferencesUI.py b/flatcamGUI/PreferencesUI.py index 57b6b68d..be3e1e20 100644 --- a/flatcamGUI/PreferencesUI.py +++ b/flatcamGUI/PreferencesUI.py @@ -2235,7 +2235,7 @@ class GerberAdvOptPrefGroupUI(OptionsGroupUI): "In degree.") ) self.tipangle_spinner = FCSpinner() - self.tipangle_spinner.set_range(0, 180) + self.tipangle_spinner.set_range(1, 180) self.tipangle_spinner.setSingleStep(5) self.tipangle_spinner.setWrapping(True) grid0.addWidget(self.tipanglelabel, 5, 0) @@ -5065,7 +5065,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI): "In degree.")) self.tipangle_entry = FCDoubleSpinner() self.tipangle_entry.set_precision(self.decimals) - self.tipangle_entry.set_range(-360, 360) + self.tipangle_entry.set_range(1, 180) self.tipangle_entry.setSingleStep(5) self.tipangle_entry.setWrapping(True) @@ -5615,7 +5615,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI): "In degree.")) self.tipangle_entry = FCDoubleSpinner() self.tipangle_entry.set_precision(self.decimals) - self.tipangle_entry.set_range(0.0000, 180.0000) + self.tipangle_entry.set_range(1.0000, 180.0000) self.tipangle_entry.setSingleStep(5) self.tipangle_entry.setObjectName(_("V-Tip Angle")) diff --git a/flatcamParsers/ParseGerber.py b/flatcamParsers/ParseGerber.py index 16ce8f37..8acb3482 100644 --- a/flatcamParsers/ParseGerber.py +++ b/flatcamParsers/ParseGerber.py @@ -394,10 +394,10 @@ class Gerber(Geometry): current_operation_code = None # Current coordinates - current_x = None - current_y = None - previous_x = None - previous_y = None + current_x = 0 + current_y = 0 + previous_x = 0 + previous_y = 0 current_d = None