- applied the changes from Andre Spahlinger from PR's #332 and #334

This commit is contained in:
Marius Stanciu
2021-01-02 17:17:53 +02:00
committed by Marius Stanciu
parent f5751d3f59
commit 3995080503
4 changed files with 15 additions and 11 deletions

View File

@@ -10,6 +10,7 @@ CHANGELOG for FlatCAM beta
2.01.2021 2.01.2021
- removed the 'machinist setting' and allow all over the app the usages of both negative and positive values (where it is the case) - removed the 'machinist setting' and allow all over the app the usages of both negative and positive values (where it is the case)
- applied the changes from Andre Spahlinger from PR's #332 and #334
31.12.2020 31.12.2020
@@ -20,7 +21,7 @@ CHANGELOG for FlatCAM beta
- fixed parseDXF() class imports to work with newer versions of ezdxf module (starting with 0.15) - contribution of Maurizio D'Addona and Hans Boot - fixed parseDXF() class imports to work with newer versions of ezdxf module (starting with 0.15) - contribution of Maurizio D'Addona and Hans Boot
- fixed a string ("Penelization Reference") by Hans Boot contribution. - fixed a string ("Penelization Reference") by Hans Boot contribution.
- fixed a string ("Penelization Reference") translations by Hans Boot contribution. - fixed a string ("Penelization Reference") translations by Hans Boot contribution.
- fixed issue with not being able to mill holes in a Excellon object part of a loaded project (JSON serialization makes all keys in dictionary strings so I had to make sure that the obj.tools dict keys are made integers on project reconstruction) - fixed issue with not being able to mill holes in an Excellon object part of a loaded project (JSON serialization makes all keys in the dictionary into strings so I had to make sure that the obj.tools dict keys are made integers on project reconstruction)
- added needed 'testresources' module in the setup_ubuntu.sh script - Hans Boot contribution - added needed 'testresources' module in the setup_ubuntu.sh script - Hans Boot contribution
30.12.2020 30.12.2020

View File

@@ -3104,6 +3104,8 @@ class CNCjob(Geometry):
elif zcut == 0: elif zcut == 0:
self.app.inform.emit('[WARNING] %s.' % _("The Cut Z parameter is zero. There will be no cut, aborting")) self.app.inform.emit('[WARNING] %s.' % _("The Cut Z parameter is zero. There will be no cut, aborting"))
return 'fail' return 'fail'
else:
return zcut
# used in Tool Drilling # used in Tool Drilling
def excellon_tool_gcode_gen(self, tool, points, tools, first_pt, is_first=False, is_last=False, opt_type='T', def excellon_tool_gcode_gen(self, tool, points, tools, first_pt, is_first=False, is_last=False, opt_type='T',

View File

@@ -148,7 +148,7 @@ class TclCommandDrillcncjob(TclCommandSignaled):
req_tools = set() req_tools = set()
for tool in obj.tools: for tool in obj.tools:
for req_dia in diameters: for req_dia in diameters:
obj_dia_form = float('%.*f' % (obj.decimals, float(obj.tools[tool]["C"]))) obj_dia_form = float('%.*f' % (obj.decimals, float(obj.tools[tool]["tooldia"])))
req_dia_form = float('%.*f' % (obj.decimals, float(req_dia))) req_dia_form = float('%.*f' % (obj.decimals, float(req_dia)))
if 'diatol' in args: if 'diatol' in args:
@@ -157,11 +157,11 @@ class TclCommandDrillcncjob(TclCommandSignaled):
tolerance = 0.0 if tolerance < 0.0 else tolerance tolerance = 0.0 if tolerance < 0.0 else tolerance
tolerance = 1.0 if tolerance > 1.0 else tolerance tolerance = 1.0 if tolerance > 1.0 else tolerance
if math.isclose(obj_dia_form, req_dia_form, rel_tol=tolerance): if math.isclose(obj_dia_form, req_dia_form, rel_tol=tolerance):
req_tools.add(tool) req_tools.add(str(tool))
nr_diameters -= 1 nr_diameters -= 1
else: else:
if obj_dia_form == req_dia_form: if obj_dia_form == req_dia_form:
req_tools.add(tool) req_tools.add(str(tool))
nr_diameters -= 1 nr_diameters -= 1
if nr_diameters > 0: if nr_diameters > 0:
@@ -176,8 +176,9 @@ class TclCommandDrillcncjob(TclCommandSignaled):
tools = ','.join(req_tools) tools = ','.join(req_tools)
# no longer needed # no longer needed
del args['drilled_dias'] # del args['drilled_dias']
del args['diatol'] args.pop('drilled_dias', None)
args.pop('diatol', None)
# Split and put back. We are passing the whole dictionary later. # Split and put back. We are passing the whole dictionary later.
# args['milled_dias'] = [x.strip() for x in args['tools'].split(",")] # args['milled_dias'] = [x.strip() for x in args['tools'].split(",")]

View File

@@ -104,7 +104,7 @@ class TclCommandMillDrills(TclCommandSignaled):
req_tools = set() req_tools = set()
for tool in obj.tools: for tool in obj.tools:
for req_dia in diameters: for req_dia in diameters:
obj_dia_form = float('%.*f' % (obj.decimals, float(obj.tools[tool]["C"]))) obj_dia_form = float('%.*f' % (obj.decimals, float(obj.tools[tool]["tooldia"])))
req_dia_form = float('%.*f' % (obj.decimals, float(req_dia))) req_dia_form = float('%.*f' % (obj.decimals, float(req_dia)))
if 'diatol' in args: if 'diatol' in args:
@@ -126,14 +126,14 @@ class TclCommandMillDrills(TclCommandSignaled):
args['tools'] = req_tools args['tools'] = req_tools
# no longer needed
del args['milled_dias']
del args['diatol']
# Split and put back. We are passing the whole dictionary later. # Split and put back. We are passing the whole dictionary later.
# args['milled_dias'] = [x.strip() for x in args['tools'].split(",")] # args['milled_dias'] = [x.strip() for x in args['tools'].split(",")]
else: else:
args['tools'] = 'all' args['tools'] = 'all'
# no longer needed
del args['milled_dias']
del args['diatol']
except Exception as e: except Exception as e:
self.raise_tcl_error("Bad tools: %s" % str(e)) self.raise_tcl_error("Bad tools: %s" % str(e))