From 394fb2194f3a27d47c541ed1aa323ad74cee00de Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Mon, 16 Feb 2026 12:10:46 +0100 Subject: [PATCH] - in ProcessDrilling correzioni e migliorie alla lavorazione ultimo step di fori svuotati in doppio --- LuaLibs/ProcessDrill.lua | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index 484afaa..1422d55 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -638,7 +638,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) local dLastStepDepth if Proc.Double and Proc.Double > 0 then if ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then - local dReduceDepth = MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 10 + local dReduceDepth = MIRROR_POCKETS_MIN_DISTANCE / 2 + 10 dLastStepDepth = dDepth + dReduceDepth dDepth = dDepth - dReduceDepth end @@ -658,8 +658,16 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or '' sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0) -- aggiungo alle note massima elevazione (coincide con affondamento) - if dMaxElev then - sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 1)) + local dCustomMaxElev + if Proc.dCustomMaxElev and type( Proc.dCustomMaxElev) == "number" and Proc.dCustomMaxElev > 10 * GEO.EPS_SMALL then + dCustomMaxElev = Proc.dCustomMaxElev + end + if dMaxElev or dCustomMaxElev then + if dCustomMaxElev then + sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dCustomMaxElev, 1)) + else + sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 1)) + end end -- se foro passante, aggiungo questa qualifica alle note if ( sType == 'Drill' or sType == 'Drill_H2' or sType == 'AngleDrill') and bOpen then @@ -685,7 +693,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) end if not bOk then local _, sErr = EgtGetLastMachMgrError() - EgtSetOperationMode( nMchId, false) + EgtSetOperationMode( nMchId, false) return false, sErr else local _, sWarn = EgtGetMachMgrWarning( 0) @@ -703,16 +711,15 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) ProcLastStep.Id = idProcLastStep ProcLastStep.Flg = 1 ProcLastStep.Double = 0 - Proc.dCustomMaxElev = MIRROR_DRILLINGS_MIN_DISTANCE + ProcLastStep.dCustomMaxElev = dDepth local bOkLastStep, sWarnLastStep = ProcessDrill.Make( ProcLastStep, nPhase, nRawId, nPartId) if not bOkLastStep then - if sWarn2 then - if not sWarn then sWarn = '' end - sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2) - end - sMyWarn = 'Drillpocket double : last step missing;\n' .. ( sMyWarn or sWarn or '') - else - sMyWarn = sWarnLastStep .. '\n' .. ( sMyWarn or sWarn or '') + sWarnLastStep = 'Drillpocket double : incomplete, last step missing' + end + local sPreviousWarn = sMyWarn or sWarn + if sWarnLastStep then + if not sPreviousWarn then sPreviousWarn = '' end + sMyWarn = EgtIf( #sPreviousWarn > 0, sPreviousWarn .. '\n' .. sWarnLastStep, sWarnLastStep) end end return true, ( sMyWarn or sWarn)