From 57fed76be7d18a28d9d0224b1ddf4b441e66f363 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Fri, 2 Jun 2017 21:10:53 -0700 Subject: [PATCH] Fixed M6 tool index for linuxcnc and opensbp. --- src/Mod/Path/PathScripts/linuxcnc_post.py | 2 +- src/Mod/Path/PathScripts/opensbp_post.py | 4 ++-- src/Mod/Path/PathTests/test_linuxcnc_00.ngc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Mod/Path/PathScripts/linuxcnc_post.py b/src/Mod/Path/PathScripts/linuxcnc_post.py index b39f1ddf96..14ab4b3965 100644 --- a/src/Mod/Path/PathScripts/linuxcnc_post.py +++ b/src/Mod/Path/PathScripts/linuxcnc_post.py @@ -261,7 +261,7 @@ def parse(pathobj): outstring.append( param + format(float(speed.getValueAs(UNIT_FORMAT)), precision_string) ) elif param == 'T': - outstring.append(param + str(c.Parameters['T'])) + outstring.append(param + str(int(c.Parameters['T']))) else: outstring.append( param + format(c.Parameters[param], precision_string)) diff --git a/src/Mod/Path/PathScripts/opensbp_post.py b/src/Mod/Path/PathScripts/opensbp_post.py index 8b657ed8c7..1d4add2130 100644 --- a/src/Mod/Path/PathScripts/opensbp_post.py +++ b/src/Mod/Path/PathScripts/opensbp_post.py @@ -248,9 +248,9 @@ def tool_change(command): txt += "'a tool change happens now\n" for line in TOOL_CHANGE.splitlines(True): txt += line - txt += "&ToolName=" + str(command.Parameters['T']) + txt += "&ToolName=" + str(int(command.Parameters['T'])) txt += "\n" - txt += "&Tool=" + str(command.Parameters['T']) + txt += "&Tool=" + str(int(command.Parameters['T'])) txt += "\n" return txt diff --git a/src/Mod/Path/PathTests/test_linuxcnc_00.ngc b/src/Mod/Path/PathTests/test_linuxcnc_00.ngc index 9f3c6e3cca..eaacef64f7 100644 --- a/src/Mod/Path/PathTests/test_linuxcnc_00.ngc +++ b/src/Mod/Path/PathTests/test_linuxcnc_00.ngc @@ -1,10 +1,10 @@ G17 G90 G21 (Default_Tool) -M6 T1.0 +M6 T1 M3 S0.00 (TC) -M6 T2.0 +M6 T2 M3 S0.00 (Contour) (Uncompensated Tool Path)