- fixed the export_dxf and export_svg Tcl commands
This commit is contained in:
@@ -15,6 +15,7 @@ CHANGELOG for FlatCAM beta
|
|||||||
- in NCC Tool fixed issue #486 where creating Area Selection shapes of type Square with Grid snap OFF will not use the first click position
|
- in NCC Tool fixed issue #486 where creating Area Selection shapes of type Square with Grid snap OFF will not use the first click position
|
||||||
- fixed a bug in Paint Tool when doing Painting Area Selection and nothing is no polygon is in the selections to be painted
|
- fixed a bug in Paint Tool when doing Painting Area Selection and nothing is no polygon is in the selections to be painted
|
||||||
- fixed Isolation, Paint and NCC Tools to use the Tool Type parameter from Preferences on adding new tools and also setting the 'type' key in tools dict correctly
|
- fixed Isolation, Paint and NCC Tools to use the Tool Type parameter from Preferences on adding new tools and also setting the 'type' key in tools dict correctly
|
||||||
|
- fixed the export_dxf and export_svg Tcl commands
|
||||||
|
|
||||||
5.01.2021
|
5.01.2021
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,14 @@ class TclCommandExportDXF(TclCommand):
|
|||||||
:param unnamed_args:
|
:param unnamed_args:
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
if 'name' not in args:
|
||||||
|
return "Failed. The Geometry object name to be exported was not provided."
|
||||||
|
|
||||||
|
source_obj_name = args['name']
|
||||||
|
|
||||||
if 'filename' not in args:
|
if 'filename' not in args:
|
||||||
args['filename'] = self.app.defaults["global_last_save_folder"] + '/' + args['name']
|
filename = self.app.defaults["global_last_save_folder"] + '/' + args['name']
|
||||||
self.app.f_handlers.export_dxf(use_thread=False, local_use=None, **args)
|
else:
|
||||||
|
filename = args['filename']
|
||||||
|
|
||||||
|
self.app.f_handlers.export_dxf(obj_name=source_obj_name, filename=filename, local_use=None, use_thread=False)
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ class TclCommandExportSVG(TclCommand):
|
|||||||
arg_names = collections.OrderedDict([
|
arg_names = collections.OrderedDict([
|
||||||
('name', str),
|
('name', str),
|
||||||
('filename', str),
|
('filename', str),
|
||||||
('scale_stroke_factor', float)
|
|
||||||
])
|
])
|
||||||
|
|
||||||
# Dictionary of types from Tcl command, needs to be ordered , this is for options like -optionname value
|
# Dictionary of types from Tcl command, needs to be ordered , this is for options like -optionname value
|
||||||
@@ -51,4 +50,18 @@ class TclCommandExportSVG(TclCommand):
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.app.f_handlers.export_svg(**args)
|
if 'name' not in args:
|
||||||
|
return "Failed. The Geometry object name to be exported was not provided."
|
||||||
|
|
||||||
|
source_obj_name = args['name']
|
||||||
|
|
||||||
|
if 'filename' not in args:
|
||||||
|
filename = self.app.defaults["global_last_save_folder"] + '/' + args['name']
|
||||||
|
else:
|
||||||
|
filename = args['filename']
|
||||||
|
|
||||||
|
if 'scale_stroke_factor' in args and args['scale_stroke_factor'] != 0.0:
|
||||||
|
str_factor = args['scale_stroke_factor']
|
||||||
|
else:
|
||||||
|
str_factor = 0.0
|
||||||
|
self.app.f_handlers.export_svg(obj_name=source_obj_name, filename=filename, scale_stroke_factor=str_factor)
|
||||||
|
|||||||
Reference in New Issue
Block a user