diff --git a/LuaLibs/WProcessLapJoint.lua b/LuaLibs/WProcessLapJoint.lua index bbe2040..02fba41 100644 --- a/LuaLibs/WProcessLapJoint.lua +++ b/LuaLibs/WProcessLapJoint.lua @@ -2015,6 +2015,10 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d local nStep = ceil( ( dThick - dMaxMat) / dStep) dStep = max( ( dThick - dMaxMat) / max( nStep, 1), 0) local dMaxElev = max( ( nStep + 1) * dStep - GEO.EPS_SMALL, 0) + -- tasca aperta sopra non necessita di MaxElev + if Proc.Fct == 2 and Proc.AffectedFaces.Top then + dMaxElev = nil + end if nSinglePass and nSinglePass > 0 then dStep = 0 if nSinglePass == 1 then @@ -2028,7 +2032,9 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d -- leggo eventuali note esistenti della lavorazione local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) -- aggiungo alle note massima elevazione - sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 3)) + if dMaxElev then + sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 3)) + end -- se lavorazione in doppio aggiungo le rispettive note if Proc.Double and Proc.Double == 2 then sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double) @@ -2880,13 +2886,15 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw) -- se ho abilitata lavorazione di fresa di fianco if Proc.Fct >= 3 and sMillOnSide and nUseMillOnSide >= 1 and not bIsSmallSlot then -- cerco nei parametri utensili la nota di affondamento di fianco SIDEDEPTH - local dMaxDepthOnSide = 0 + local dMaxDepthOnSide = 999 local dMillDiam = 0 + local dMillDiamTh = EgtTdbGetCurrToolThDiam() or 60 if EgtMdbSetCurrMachining( sMillOnSide) then local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam - dMaxDepthOnSide = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or dMaxDepthOnSide + dMillDiamTh = EgtTdbGetCurrToolThDiam() or dMillDiamTh + dMaxDepthOnSide = min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or dMaxDepthOnSide, 0.5 * ( dMillDiam - dMillDiamTh)) end end local bMakeFirstGroove @@ -2975,7 +2983,7 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw) else local sErr = 'Side milling not possible' EgtOutLog( sErr) - return true, sErr + return false, sErr end -- fessura verticale elseif Proc.Stype == 3 then