- 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

@@ -23,6 +23,8 @@ class TclCommandMillDrills(TclCommandSignaled):
# List of all command aliases, to be able use old names for backward compatibility (add_poly, add_polygon)
aliases = ['milldrills', 'milld']
description = '%s %s' % ("--", "Create a Geometry Object for milling drill holes from Excellon.")
# Dictionary of types from Tcl command, needs to be ordered
arg_names = collections.OrderedDict([
('name', str)
@@ -34,7 +36,7 @@ class TclCommandMillDrills(TclCommandSignaled):
('milled_dias', str),
('outname', str),
('tooldia', float),
('use_thread', bool),
('use_thread', str),
('diatol', float)
])
@@ -43,7 +45,7 @@ class TclCommandMillDrills(TclCommandSignaled):
# structured help for current command, args needs to be ordered
help = {
'main': "Create Geometry Object for milling drill holes from Excellon.",
'main': "Create a Geometry Object for milling drill holes from Excellon.",
'args': collections.OrderedDict([
('name', 'Name of the Excellon Object. Required.'),
('milled_dias', 'Comma separated tool diameters of the drills to be milled (example: 0.6, 1.0 or 3.125).\n'
@@ -51,8 +53,8 @@ class TclCommandMillDrills(TclCommandSignaled):
'WARNING: no spaces are allowed in the list of tools.\n'
'As a precaution you can enclose them with quotes.'),
('tooldia', 'Diameter of the milling tool (example: 0.1).'),
('outname', 'Name of object to be created holding the milled geometries.'),
('use_thread', 'If to use multithreading: True or False.'),
('outname', 'Name of Geometry object to be created holding the milled geometries.'),
('use_thread', 'If to use multithreading: True (1) or False (0).'),
('diatol', 'Tolerance. Percentange (0.0 ... 100.0) within which dias in milled_dias will be judged to be '
'the same as the ones in the tools from the Excellon object. E.g: if in milled_dias we have a '
'diameter with value 1.0, in the Excellon we have a tool with dia = 1.05 and we set a tolerance '
@@ -84,7 +86,9 @@ class TclCommandMillDrills(TclCommandSignaled):
args['outname'] = name + "_mill_drills"
if 'use_thread' in args:
args['use_thread'] = bool(args['use_thread'])
args['use_thread'] = bool(eval(args['use_thread']))
else:
args['use_thread'] = False
if not obj.drills:
self.raise_tcl_error("The Excellon object has no drills: %s" % name)