diff --git a/LuaLibs/ProcessLongDoubleCut.lua b/LuaLibs/ProcessLongDoubleCut.lua index 3bee763..8259820 100644 --- a/LuaLibs/ProcessLongDoubleCut.lua +++ b/LuaLibs/ProcessLongDoubleCut.lua @@ -23,6 +23,7 @@ -- 2023/11/24 Aggiunta Q05 per utilizzo lama anche in feature cieche conme per LongCut. -- 2023/11/30 Calcolo elevazione velocizzato e centralizzato tramite la funzione GetFaceElevation. -- 2024/01/18 Implementata GetBlockedAxis che gestisce gli assi bloccati per tutti i tipi di utensile. +-- 2024/03/21 Corretto parametro passato a funzione BL.GetBlockedAxis. Ora tiene in considerazione anche testa sotto -- Tabella per definizione modulo local ProcessLong2Cut = {} @@ -833,11 +834,13 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster -- recupero alcune informazioni utili dalla lavorazione attuale local bIsCurrentBladeCCW + local sCuttingNameMach if bIsTopBladeCurrent then - EgtMdbSetCurrMachining( sCutting) + sCuttingNameMach = sCutting else - EgtMdbSetCurrMachining( sCuttingDn) + sCuttingNameMach = sCuttingDn end + EgtMdbSetCurrMachining( sCuttingNameMach) bIsCurrentBladeCCW = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0 -- imposto la direzione di lavoro per avere scarico del truciolo ottimale @@ -880,7 +883,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster EgtSetMachiningParam( MCH_MP.SCC, nSCC) -- imposto angolo 3° asse rot local vtOut = EgtIf( vtN[vOrd[j]]:getX() > 0, X_AX(), -X_AX()) - EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( sCutting, 'perpendicular', b3Raw, vtN, vtOut)) + EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( sCuttingNameMach, 'perpendicular', b3Raw, vtN, vtOut)) -- eseguo if not ML.ApplyMachining( true, false) then local _, sErr = EgtGetLastMachMgrError() @@ -1777,7 +1780,6 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster sWarn = 'Warning in LongDoubleCut : depth (' .. EgtNumToString( vWidth[vOrd[i]] + dAgg, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepthDn - dCollSic, 1) .. ')' end dDepth = min( dMaxDepthDn - dCollSic, vWidth[vOrd[i]] + dAgg) - dDepth2 = vWidth[vOrd[i]] + dAgg - dDepth EgtSetMachiningParam( MCH_MP.DEPTH, dDepth - dExtraElev) else dCollSic = max( BD.COLL_SIC, ( dThDiam - dToolDiam) / 2 * EgtIf( abs(dNz) < GEO.EPS_SMALL, 1, abs( EgtIf( abs(vtN[vOrd[i]]:getY()) >= abs(vtN[vOrd[i]]:getZ()), vtN[vOrd[i]]:getZ(), vtN[vOrd[i]]:getY()) / dNz))) @@ -1785,7 +1787,6 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster sWarn = 'Warning in LongDoubleCut : depth (' .. EgtNumToString( vWidth[vOrd[i]] + dAgg, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth - dCollSic, 1) .. ')' end dDepth = min( dMaxDepth - dCollSic, vWidth[vOrd[i]] + dAgg) - dDepth2 = vWidth[vOrd[i]] + dAgg - dDepth EgtSetMachiningParam( MCH_MP.DEPTH, dDepth - dExtraElev) end -- eseguo