diff --git a/Haas_Lathes_BIDC/Bechtel ST-20.cps b/Haas_Lathes_BIDC/Bechtel ST-20.cps index 2fc91a9..3287952 100644 --- a/Haas_Lathes_BIDC/Bechtel ST-20.cps +++ b/Haas_Lathes_BIDC/Bechtel ST-20.cps @@ -574,23 +574,24 @@ function getCompleteTool(holder, tool) { if (holder == WHOLD) { this.probeX = function() { - return holder.x + (tool.holderOverallLength*2); + return holder.x + tool.holderOverallLength*2; }; + if (tool.type == TOOL_TURNING_GROOVING) { this.offsetType = "Grooving"; this.probeZ = function() { - return holder.z + (tool.shankWidth*.5); + return holder.z + (.5*tool.shankWidth); }; } else { - var lhZ = function() { - return holder.z - tool.cuttingWidth + (tool.shankWidth*.5); + var leftHandZ = function() { + return holder.z - tool.cuttingWidth + (.5*tool.shankWidth); }; - var rhZ = function() { - return holder.z + tool.cuttingWidth - (tool.shankWidth*.5); + var rightHandZ = function() { + return holder.z + tool.cuttingWidth - (.5*tool.shankWidth); }; this.offsetType = (tool.hand =='L') ? "General Turning, L" : "General Turning, R"; - this.probeZ = (tool.hand =='L') ? lhZ : rhZ; + this.probeZ = (tool.hand == 'L') ? leftHandZ : rightHandZ; } } else { var defaultX = function() { diff --git a/Haas_Lathes_BIDC/Bechtel ST-20Y.cps b/Haas_Lathes_BIDC/Bechtel ST-20Y.cps index b2578a8..0f43a16 100644 --- a/Haas_Lathes_BIDC/Bechtel ST-20Y.cps +++ b/Haas_Lathes_BIDC/Bechtel ST-20Y.cps @@ -579,7 +579,7 @@ function getCompleteTool(holder, tool) { if (holder == KM50R || holder == WBLOCK) { this.probeX = function() { - return holder.x = tool.holderOverallLength*2; + return holder.x + tool.holderOverallLength*2; }; if (tool.type == TOOL_TURNING_GROOVING) { @@ -631,15 +631,15 @@ function getCompleteTool(holder, tool) { this.probeZ = (tool.numberOfFlutes != 1) ? stanProbeZ : indexProbeZ; this.probeX = (tool.numberOfFlutes != 1) ? stanProbeX : indexProbeX; this.machineX = function() { - return holder.z; + return holder.x; }; return; } if (tool.type == TOOL_TURNING_THREADING) { - this.offsetType = "Threading" + this.offsetType = "Threading"; this.probeX = function() { - return holder.x - (tool.cuttingWidth - (.5*tool.shankWidth)); + return holder.x - (2*tool.cuttingWidth - tool.shankWidth); }; this.probeZ = defaultZ; return;