diff --git a/CHANGELOG.md b/CHANGELOG.md index e8fcba64..e9a233f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ CHANGELOG for FlatCAM beta - upgraded the `skew` Tcl command to work on a selection of objects and added the ability to skew not only in degrees but also by distances - fixed some issues in `panelize` and `cncjob` Tcl commands - reversed the mirroring axis in the `mirror` Tcl command to be consistent with the action in GUI +- solved some more exceptions in the `cncjob` Tcl command 31.02.2022 diff --git a/appPlugins/ToolMilling.py b/appPlugins/ToolMilling.py index 2348784a..1f2a6afe 100644 --- a/appPlugins/ToolMilling.py +++ b/appPlugins/ToolMilling.py @@ -3015,8 +3015,8 @@ class ToolMilling(AppTool, Excellon): # the segx and segy values are the same for all tools os we just take the values from the first tool sel_tool = tools_list[0] data_dict = geo_obj.tools[sel_tool]['data'] - segx = data_dict['segx'] - segy = data_dict['segy'] + segx = data_dict.get('segx') or data_dict.get('geometry_segx') + segy = data_dict.get('segy') or data_dict.get('geometry_segy') try: xmin = geo_obj.options['xmin'] diff --git a/tclCommands/TclCommandCncjob.py b/tclCommands/TclCommandCncjob.py index 99b745ba..212f28ed 100644 --- a/tclCommands/TclCommandCncjob.py +++ b/tclCommands/TclCommandCncjob.py @@ -256,6 +256,8 @@ class TclCommandCncjob(TclCommandSignaled): for tool_uid in list(local_tools_dict.keys()): if 'data' in local_tools_dict[tool_uid]: + local_tools_dict[tool_uid]['data']['segx'] = self.app.defaults['geometry_segx'] + local_tools_dict[tool_uid]['data']['segy'] = self.app.defaults['geometry_segx'] local_tools_dict[tool_uid]['data']['tools_mill_tooldia'] = args["dia"] local_tools_dict[tool_uid]['data']['tools_mill_cutz'] = args["z_cut"] local_tools_dict[tool_uid]['data']['tools_mill_travelz'] = args["z_move"]