From f5cc8d773f06829dc88e0c5bb56ace3f185dcf2b Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sat, 15 Jun 2019 20:22:17 +0300 Subject: [PATCH] - fixed bug in Gerber editor - on multiple edits on the same object, the aperture size and dims were continuously multiplied due of the file units not being updated --- README.md | 1 + flatcamEditors/FlatCAMGrbEditor.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e465a555..3f980808 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ CAD program, and create G-Code for Isolation routing. 15.06.2019 - fixed bug in Gerber parser that made the Gerber files generated by Altium Designer 18 not to be loaded +- fixed bug in Gerber editor - on multiple edits on the same object, the aperture size and dims were continuously multiplied due of the file units not being updated 11.06.2019 diff --git a/flatcamEditors/FlatCAMGrbEditor.py b/flatcamEditors/FlatCAMGrbEditor.py index 53f454e8..5d4e6615 100644 --- a/flatcamEditors/FlatCAMGrbEditor.py +++ b/flatcamEditors/FlatCAMGrbEditor.py @@ -3445,7 +3445,6 @@ class FlatCAMGrbEditor(QtCore.QObject): file_units = self.gerber_obj.gerber_units if self.gerber_obj.gerber_units else 'IN' app_units = self.app.defaults['units'] - self.conversion_factor = 25.4 if file_units == 'IN' else (1 / 25.4) if file_units != app_units else 1 # Hide original geometry @@ -3478,6 +3477,7 @@ class FlatCAMGrbEditor(QtCore.QObject): conv_apertures[apid][key] = self.gerber_obj.apertures[apid][key] self.gerber_obj.apertures = conv_apertures + self.gerber_obj.gerber_units = app_units # ############################################################# ## # APPLY CLEAR_GEOMETRY on the SOLID_GEOMETRY @@ -3575,7 +3575,6 @@ class FlatCAMGrbEditor(QtCore.QObject): :return: None """ - new_grb_name = self.edited_obj_name # if the 'delayed plot' malfunctioned stop the QTimer @@ -3710,6 +3709,7 @@ class FlatCAMGrbEditor(QtCore.QObject): grb_obj.source_file = [] grb_obj.multigeo = False grb_obj.follow = False + grb_obj.gerber_units = app_obj.defaults['units'] try: grb_obj.create_geometry()