- added a new TclCommand named PlotObjects which will plot a list of FlatCAM objects

- made that after opening an object in FlatCAM it is not automatically plotted. If the user wants to plot it can use the TclCommands PlotAll or PlotObjects
- modified the TclCommands that open files to not plot the opened files automatically
This commit is contained in:
Marius Stanciu
2019-09-16 00:47:15 +03:00
committed by Marius
parent c06317374e
commit 2f553c9005
10 changed files with 122 additions and 51 deletions

View File

@@ -30,7 +30,7 @@ class TclCommandOpenGerber(TclCommandSignaled):
('filename', 'Path to file to open.'),
('outname', 'Name of the resulting Gerber object.')
]),
'examples': []
'examples': ["open_gerber gerber_object_path -outname bla"]
}
def execute(self, args, unnamed_args):
@@ -76,12 +76,13 @@ class TclCommandOpenGerber(TclCommandSignaled):
outname = filename.split('/')[-1].split('\\')[-1]
if 'follow' in args:
self.raise_tcl_error("The 'follow' parameter is obsolete. To create 'follow' geometry use the 'follow' parameter for the Tcl Command isolate()")
self.raise_tcl_error("The 'follow' parameter is obsolete. To create 'follow' geometry use the 'follow' "
"parameter for the Tcl Command isolate()")
with self.app.proc_container.new("Opening Gerber"):
# Object creation
self.app.new_object("gerber", outname, obj_init)
self.app.new_object("gerber", outname, obj_init, plot=False)
# Register recent file
self.app.file_opened.emit("gerber", filename)