- application wide change: introduced the precision parameters in Edit -> Preferences who will control how many decimals to use in the app parameters
This commit is contained in:
@@ -70,15 +70,15 @@ class TclCommandMillSlots(TclCommandSignaled):
|
||||
|
||||
name = args['name']
|
||||
|
||||
if 'outname' not in args:
|
||||
args['outname'] = name + "_mill_slots"
|
||||
|
||||
try:
|
||||
obj = self.app.collection.get_by_name(str(name))
|
||||
except Exception:
|
||||
obj = None
|
||||
self.raise_tcl_error("Could not retrieve object: %s" % name)
|
||||
|
||||
if 'outname' not in args:
|
||||
args['outname'] = name + "_mill_slots"
|
||||
|
||||
if not obj.slots:
|
||||
self.raise_tcl_error("The Excellon object has no slots: %s" % name)
|
||||
|
||||
@@ -91,10 +91,8 @@ class TclCommandMillSlots(TclCommandSignaled):
|
||||
req_tools = set()
|
||||
for tool in obj.tools:
|
||||
for req_dia in diameters:
|
||||
obj_dia_form = float('%.2f' % float(obj.tools[tool]["C"])) if units == 'MM' else \
|
||||
float('%.4f' % float(obj.tools[tool]["C"]))
|
||||
req_dia_form = float('%.2f' % float(req_dia)) if units == 'MM' else \
|
||||
float('%.4f' % float(req_dia))
|
||||
obj_dia_form = float('%.*f' % (obj.decimals, float(obj.tools[tool]["C"])))
|
||||
req_dia_form = float('%.*f' % (obj.decimals, float(req_dia)))
|
||||
|
||||
if 'diatol' in args:
|
||||
tolerance = args['diatol'] / 100
|
||||
|
||||
Reference in New Issue
Block a user