- small changes in the TclCommands: MillDrills, MillSlots, DrillCNCJob: the new parameter for tolerance is now named: tooldia

- cleaned up the 'About FlatCAM' window, started to give credits for the translation team
This commit is contained in:
Marius Stanciu
2019-09-12 17:28:56 +03:00
parent 8e2cca827a
commit d22592e64c
6 changed files with 160 additions and 55 deletions

View File

@@ -25,7 +25,7 @@ class TclCommandMillSlots(TclCommandSignaled):
('outname', str),
('tooldia', float),
('use_threads', bool),
('tol', float)
('diatol', float)
])
# array of mandatory options for current Tcl command: required = {'name','outname'}
@@ -40,12 +40,13 @@ class TclCommandMillSlots(TclCommandSignaled):
('tooldia', 'Diameter of the milling tool (example: 0.1).'),
('outname', 'Name of object to create.'),
('use_thread', 'If to use multithreading: True or False.'),
('tol', '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 tol = 5.0'
'then the slots with the dia 1.05 in Excellon will be processed. Float number.')
('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 '
'diatol = 5.0 then the slots with the dia = (0.95 ... 1.05) '
'in Excellon will be processed. Float number.')
]),
'examples': ['millholes mydrills']
'examples': ['millslots mydrills', 'mills my_excellon.drl']
}
def execute(self, args, unnamed_args):
@@ -85,8 +86,8 @@ class TclCommandMillSlots(TclCommandSignaled):
req_dia_form = float('%.2f' % float(req_dia)) if units == 'MM' else \
float('%.4f' % float(req_dia))
if 'tol' in args:
tolerance = args['tol'] / 100
if 'diatol' in args:
tolerance = args['diatol'] / 100
tolerance = 0.0 if tolerance < 0.0 else tolerance
tolerance = 1.0 if tolerance > 1.0 else tolerance
@@ -106,6 +107,7 @@ class TclCommandMillSlots(TclCommandSignaled):
# no longer needed
del args['milled_dias']
del args['diatol']
# Split and put back. We are passing the whole dictionary later.
# args['milled_dias'] = [x.strip() for x in args['tools'].split(",")]