- fixed an issue for importing DXF as Geometry when the DXF geometry is a single line

- updated the convert_any2geo() method such that resulting geometry objects have the tools attribute required in the newer versions of the app
This commit is contained in:
Marius Stanciu
2020-11-24 21:33:29 +02:00
committed by Marius Stanciu
parent ad5ae43ab4
commit 2545da79b5
6 changed files with 111 additions and 49 deletions

View File

@@ -142,12 +142,13 @@ class AppObject(QtCore.QObject):
obj.options[option] = self.app.options[option]
if kind == 'gerber':
for option in self.app.options:
if option.find('tools_iso_') == 0:
if option.find('tools_iso_') == 0 or option.find('tools_mill_') == 0:
obj.options[option] = self.app.options[option]
if kind == 'geometry':
for option in self.app.options:
if option.find('tools_mill_') == 0:
obj.options[option] = self.app.options[option]
# ############################################################################################################
# ############################################################################################################

View File

@@ -524,9 +524,9 @@ class GeometryObject(FlatCAMObj, Geometry):
if opt_key.find('geometry' + "_") == 0:
oname = opt_key[len('geometry') + 1:]
self.default_data[oname] = self.app.options[opt_key]
if opt_key.find('tools_mill' + "_") == 0:
oname = opt_key[len('tools_mill') + 1:]
self.default_data[oname] = self.app.options[opt_key]
elif opt_key.find('tools_') == 0:
self.default_data[opt_key] = self.app.options[opt_key]
# fill in self.default_data values from self.options
for def_key in self.default_data:
for opt_key, opt_val in self.options.items():