- added a new Tcl command named 'list_pp' which lists the available preprocessor names
This commit is contained in:
@@ -11,6 +11,7 @@ CHANGELOG for FlatCAM beta
|
||||
|
||||
- in the 'cutout' Tcl command made sure that when an error pop-up then it returns with a "fail" string
|
||||
- made sure when running scripts from the interface that if a command will generate an error then the script is aborted
|
||||
- added a new Tcl command named 'list_pp' which lists the available preprocessor names
|
||||
|
||||
17.01.2022
|
||||
|
||||
|
||||
@@ -629,7 +629,7 @@ class App(QtCore.QObject):
|
||||
'export_gcode', 'export_gerber', 'export_svg', 'ext', 'exteriors', 'follow',
|
||||
'geo_union', 'geocutout', 'get_bounds', 'get_names', 'get_path', 'get_sys', 'help',
|
||||
'interiors', 'isolate', 'join_excellon',
|
||||
'join_geometry', 'list_sys', 'milld', 'mills', 'milldrills', 'millslots',
|
||||
'join_geometry', 'list_sys', 'list_pp', 'milld', 'mills', 'milldrills', 'millslots',
|
||||
'mirror', 'ncc',
|
||||
'ncr', 'new', 'new_geometry', 'new_gerber', 'new_excellon', 'non_copper_regions',
|
||||
'offset',
|
||||
|
||||
51
tclCommands/TclCommandListPP.py
Normal file
51
tclCommands/TclCommandListPP.py
Normal file
@@ -0,0 +1,51 @@
|
||||
# ##########################################################
|
||||
# FlatCAM: 2D Post-processing for Manufacturing #
|
||||
# File Author: Marius Adrian Stanciu (c) #
|
||||
# Date: 1/18/2022 #
|
||||
# MIT Licence #
|
||||
# ##########################################################
|
||||
|
||||
from tclCommands.TclCommand import *
|
||||
|
||||
|
||||
class TclCommandListPP(TclCommand):
|
||||
"""
|
||||
Tcl shell command to get the list of available preprocessors
|
||||
|
||||
example:
|
||||
list_pp
|
||||
"""
|
||||
|
||||
# List of all command aliases, to be able use old names for backward compatibility (add_poly, add_polygon)
|
||||
aliases = ['list_pp', 'listpp']
|
||||
|
||||
description = '%s %s' % ("--", "Outputs in Tcl Shell the list with the names of available preprocessors.")
|
||||
|
||||
# Dictionary of types from Tcl command, needs to be ordered
|
||||
arg_names = collections.OrderedDict([
|
||||
])
|
||||
|
||||
# Dictionary of types from Tcl command, needs to be ordered , this is for options like -optionname value
|
||||
option_types = collections.OrderedDict([
|
||||
])
|
||||
|
||||
# array of mandatory options for current Tcl command: required = {'name','outname'}
|
||||
required = []
|
||||
|
||||
# structured help for current command, args needs to be ordered
|
||||
help = {
|
||||
'main': "Returns the list with the names of available preprocessors.\n",
|
||||
'args': collections.OrderedDict([
|
||||
]),
|
||||
'examples': ['list_pp', 'listpp']
|
||||
}
|
||||
|
||||
def execute(self, args, unnamed_args):
|
||||
"""
|
||||
|
||||
:param args:
|
||||
:param unnamed_args:
|
||||
:return:
|
||||
"""
|
||||
ret_val = list(self.app.preprocessors.keys())
|
||||
return str(ret_val)
|
||||
@@ -37,6 +37,7 @@ import tclCommands.TclCommandFollow
|
||||
import tclCommands.TclCommandJoinExcellon
|
||||
import tclCommands.TclCommandJoinGeometry
|
||||
import tclCommands.TclCommandListSys
|
||||
import tclCommands.TclCommandListPP
|
||||
import tclCommands.TclCommandMillDrills
|
||||
import tclCommands.TclCommandMillSlots
|
||||
import tclCommands.TclCommandMirror
|
||||
|
||||
Reference in New Issue
Block a user