- multiple fixes in the Tcl commands (especially regarding the interchange between True/false and 1/0 values)

- updated the help for all Tcl Commands
- in Tcl Shell, the 'help' command will add also a brief description for each command in the list
This commit is contained in:
Marius Stanciu
2020-04-13 19:15:20 +03:00
committed by Marius
parent 5dcddb168e
commit 8a299e8fc8
66 changed files with 350 additions and 172 deletions

View File

@@ -22,6 +22,8 @@ class TclCommandNregions(TclCommand):
# array of all command aliases, to be able use old names for backward compatibility (add_poly, add_polygon)
aliases = ['non_copper_regions', 'ncr']
description = '%s %s' % ("--", "Creates a Geometry object with the non-copper regions.")
# dictionary of types from Tcl command, needs to be ordered
arg_names = collections.OrderedDict([
('name', str)
@@ -31,7 +33,7 @@ class TclCommandNregions(TclCommand):
option_types = collections.OrderedDict([
('outname', str),
('margin', float),
('rounded', bool)
('rounded', str)
])
# array of mandatory options for current Tcl command: required = {'name','outname'}
@@ -39,13 +41,13 @@ class TclCommandNregions(TclCommand):
# structured help for current command, args needs to be ordered
help = {
'main': "Creates a geometry object with the non-copper regions.",
'main': "Creates a Geometry object with the non-copper regions.",
'args': collections.OrderedDict([
('name', 'Object name for which to create non-copper regions. String. Required.'),
('outname', 'Name of the resulting Geometry object. String.'),
('margin', "Specify the edge of the PCB by drawing a box around all objects with this minimum distance. "
"Float number."),
('rounded', "Resulting geometry will have rounded corners. True or False.")
('rounded', "Resulting geometry will have rounded corners. True (1) or False (0).")
]),
'examples': ['ncr name -margin 0.1 -rounded True -outname name_ncr']
}
@@ -78,7 +80,7 @@ class TclCommandNregions(TclCommand):
if 'rounded' not in args:
args['rounded'] = self.app.defaults["gerber_noncopperrounded"]
rounded = bool(args['rounded'])
rounded = bool(eval(args['rounded']))
del args['name']