From 83048f2f52d414c605d2b22339fca604255b3292 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Mon, 13 Mar 2023 18:37:55 +0100 Subject: [PATCH] piccola correzione --- LuaLibs/ProcessLapJoint.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 3614d79..856b3e8 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3466,9 +3466,13 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha if ( ( nChosenToolUuid == nToolId) and bIsToolActive) then break end sToolName = EgtTdbGetNextTool( MCH_TF.MILL) end - local dChosenToolDiameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM) - dMinFaceElevForPocket = dChosenToolDiameter / 2 + 10 * GEO.EPS_SMALL - sChosenToolUuid = EgtTdbGetCurrToolParam( MCH_TP.UUID) + if sToolName == '' then + sChosenToolUuid = '' + else + local dChosenToolDiameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM) + dMinFaceElevForPocket = dChosenToolDiameter / 2 + 10 * GEO.EPS_SMALL + sChosenToolUuid = EgtTdbGetCurrToolParam( MCH_TP.UUID) + end end if sMchFindMaster and #sMchFindMaster > 0 then @@ -3944,7 +3948,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha end end end - if sChosenToolUuid then + if sChosenToolUuid == '' then local sErr = 'Error : no machining found with chosen Tool_ID' EgtOutLog( sErr) return -1, sErr