- fixed the Gerber Parser convert units unnecessary usage. The only units conversion should be done when creating the new object, after the parsing
This commit is contained in:
@@ -3739,7 +3739,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
||||
self.gerber_obj = orig_grb_obj
|
||||
self.gerber_obj_options = orig_grb_obj.options
|
||||
|
||||
file_units = self.gerber_obj.gerber_units if self.gerber_obj.gerber_units else 'IN'
|
||||
file_units = self.gerber_obj.units if self.gerber_obj.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
|
||||
|
||||
@@ -3773,7 +3773,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
|
||||
self.gerber_obj.units = app_units
|
||||
|
||||
# ############################################################# ##
|
||||
# APPLY CLEAR_GEOMETRY on the SOLID_GEOMETRY
|
||||
@@ -4035,7 +4035,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
||||
|
||||
grb_obj.multigeo = False
|
||||
grb_obj.follow = False
|
||||
grb_obj.gerber_units = app_obj.defaults['units']
|
||||
grb_obj.units = app_obj.defaults['units']
|
||||
|
||||
try:
|
||||
grb_obj.create_geometry()
|
||||
|
||||
Reference in New Issue
Block a user