diff --git a/Haas_Lathes_BIDC/haas st-20.cps b/Haas_Lathes_BIDC/haas st-20.cps index 93a97fc..01bfd4f 100644 --- a/Haas_Lathes_BIDC/haas st-20.cps +++ b/Haas_Lathes_BIDC/haas st-20.cps @@ -481,6 +481,8 @@ const BIDC_GEN_TURNING = 8; const BIDC_BORING_TURNING = 9; const BIDC_CUST_TURNING = 10; +const PROBE_CENTERING_OFFSET = .375; // offet to center tool on probe + const SOUTHWEST = { num: 1, name: "SOUTHWEST" @@ -517,7 +519,7 @@ const NORTH = { const WHOLD = { name: "Wedge Holder", x: -24.8094, - z: -13.1233, + z: -13.2233, sOffset: 0.0 }; @@ -563,16 +565,6 @@ function getCompleteTool(holder, tool) { this.probeZ = function() { return holder.z + tool.shankWidth*.5; }; - return; - - case TOOL_TURNING_THREADING: - this.offsetType = "Threading"; - this.probeX = function() { - return holder.x + tool.holderOverallLength*2; - }; - this.probeZ = function() { - return holder.z + tool.cuttingWidth - (.5*tool.shankWidth); - } return; default: @@ -582,11 +574,11 @@ function getCompleteTool(holder, tool) { }; if (tool.hand == 'L') { this.probeZ = function() { - return holder.z - tool.cuttingWidth*.5; + return holder.z - tool.cuttingWidth - tool.shankWidth*.5; }; } else { this.probeZ = function() { - return holder.z + tool.cuttingWidth*.5; + return holder.z + tool.cuttingWidth - tool.shankWidth*.5; }; } } @@ -601,8 +593,11 @@ function getCompleteTool(holder, tool) { if (tool.numberOfFlutes != 1) { this.offsetType = "General Drilling"; this.probeX = function() { - return holder.x; + return holder.x - PROBE_CENTERING_OFFSET; }; + this.machineX = function() { + return holder.x; + } this.probeZ = function() { return holder.z + (tool.getBodyLength() + tool.getHolderLength()); }; @@ -610,7 +605,7 @@ function getCompleteTool(holder, tool) { } this.offsetType = "Indexible Drill"; this.probeX = function() { - return holder.x + tool.diameter*.3; + return holder.x + tool.diameter*.3 - PROBE_CENTERING_OFFSET; }; this.machineX = function() { return holder.x;