From 5fcaf823a0ab9278635e57f8e2dd8d36c680a9c6 Mon Sep 17 00:00:00 2001 From: "daniele.nicoli" Date: Tue, 28 Apr 2026 16:25:38 +0200 Subject: [PATCH] =?UTF-8?q?ProcessDrill=20-=20lavorazioni=20in=20doppio:?= =?UTF-8?q?=20tolto=20foro=20singolo=20di=20sfondamento=20se=20utensile=20?= =?UTF-8?q?non=20=C3=A8=20abbastanza=20lungo.=20In=20tal=20caso=20profondi?= =?UTF-8?q?t=C3=A0=20lavorazione=20in=20doppio=20aumentata=20al=20massimo?= =?UTF-8?q?=20della=20possibilit=C3=A0=20dell'utensile.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/BeamExec.lua | 3 +++ LuaLibs/ProcessDrill.lua | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index a2dce21..07a1b06 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -1991,6 +1991,9 @@ local function VerifyDrillMirrored( Proc, vProc, b3Raw) end local dToolDoubleDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM, 'd') local dToolDoubleMaxDepth = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) + if ( sType == 'Pocket_AT' or sType == 'Pocket') then + dToolDoubleMaxDepth = EgtTdbGetCurrToolMaxDepth() + end dMachiningDepth = min( dMachiningDepth, dToolDoubleMaxDepth) -- recupero la lunghezza della parte inclinata della punta local dToolDoubleTipLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) - EgtTdbGetCurrToolParam( MCH_TP.LEN) diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index 7a37621..f797e40 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -613,6 +613,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end end end + local dDepthOri = dDepth -- se foro da saltare per eccessiva inclinazione if not bTryDrill then sMyWarn = 'Warning in drill : too slant hole' @@ -654,6 +655,9 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) local dReduceDepth = MIRROR_POCKETS_MIN_DISTANCE / 2 + 10 dLastStepDepth = dDepth + dReduceDepth dDepth = dDepth - dReduceDepth + if ( dLastStepDepth > dMaxDepth + 10 * GEO.EPS_SMALL) and ( dMaxDepth <= ( dLen / 2) - dReduceDepth) and ( dDepthOri ~= dDepth) then + dDepth = dMaxDepth + end end else sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 15) @@ -718,12 +722,12 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) else -- se DrillPocket passante in doppio si fa lavorazione aggiuntiva dell'ultimo step if Proc.Double and Proc.Double > 0 and ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then + if dLastStepDepth > dMaxDepth + 10 * GEO.EPS_SMALL then + sMyWarn = 'Warning in drill pocket last step: depth (' .. EgtNumToString( dLastStepDepth, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')' + return false, sMyWarn + end local idMachiningLastStep = EgtCopyMachining( EgtIf( EgtStartsWith( sType, 'Predrill'), 'Predrill_', 'Drill_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)), sName) EgtSetCurrMachining( idMachiningLastStep) - if dLastStepDepth > dMaxDepth + 10 * GEO.EPS_SMALL then - sMyWarn = 'Warning in drill pocket last step: depth (' .. EgtNumToString( dLastStepDepth, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')' - dLastStepDepth = dMaxDepth - end local dMaxElevLastStep = dLastStepDepth - dDepth sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElevLastStep, 1)) EgtSetMachiningParam( MCH_MP.DEPTH, dLastStepDepth)