diff --git a/LuaLibs/ProcessLongCut.lua b/LuaLibs/ProcessLongCut.lua index d1041c6..0a4df10 100644 --- a/LuaLibs/ProcessLongCut.lua +++ b/LuaLibs/ProcessLongCut.lua @@ -941,53 +941,13 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus -- imposto uso della faccia EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( k == 1, nFaceUse, nFaceUse2)) else - if k == 1 then - bIsTopBladeCurrent = true - nFaceUseCurrent = nFaceUse - else - bIsTopBladeCurrent = true - nFaceUseCurrent = nFaceUse2 - end + EgtSetMachiningParam( MCH_MP.INVERT, false) + EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) + dSal, dEal = dEal, dSal + -- imposto uso della faccia + EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( k == 1, nFaceUse, nFaceUse2)) end - -- recupero alcune informazioni utili dalla lavorazione attuale - local bIsCurrentBladeCW - local bIsCurrentMachiningInverted - if bIsTopBladeCurrent then - EgtMdbSetCurrMachining( sCutting) - else - EgtMdbSetCurrMachining( sCuttingDn) - end - bIsCurrentBladeCW = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0 - bIsCurrentMachiningInverted = EgtMdbGetCurrMachiningParam( MCH_MP.INVERT) - - -- imposto la direzione di lavoro per avere scarico del truciolo ottimale - local nWorkSide, bInvert - if not bIsTopBladeCurrent and abs( nSide) ~= 2 then - if bIsCurrentBladeCW then - nWorkSide = MCH_MILL_WS.LEFT - bInvert = true - dSal, dEal = dEal, dSal - else - nWorkSide = MCH_MILL_WS.RIGHT - bInvert = false - end - else - if bIsCurrentBladeCW then - nWorkSide = MCH_MILL_WS.LEFT - bInvert = false - else - nWorkSide = MCH_MILL_WS.RIGHT - bInvert = true - dSal, dEal = dEal, dSal - end - end - - -- setto la lavorazione con i valori calcolati - EgtSetMachiningParam( MCH_MP.INVERT, bInvert) - EgtSetMachiningParam( MCH_MP.WORKSIDE, nWorkSide) - EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUseCurrent) - EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal) EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal) -- imposto offset radiale diff --git a/LuaLibs/ProcessLongDoubleCut.lua b/LuaLibs/ProcessLongDoubleCut.lua index d906134..fddbb06 100644 --- a/LuaLibs/ProcessLongDoubleCut.lua +++ b/LuaLibs/ProcessLongDoubleCut.lua @@ -723,44 +723,6 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( k == 1, nFaceUse, nFaceUse2)) end - -- recupero alcune informazioni utili dalla lavorazione attuale - local bIsCurrentBladeCW - local bIsCurrentMachiningInverted - if bIsTopBladeCurrent then - EgtMdbSetCurrMachining( sCutting) - else - EgtMdbSetCurrMachining( sCuttingDn) - end - bIsCurrentBladeCW = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0 - bIsCurrentMachiningInverted = EgtMdbGetCurrMachiningParam( MCH_MP.INVERT) - - -- imposto la direzione di lavoro per avere scarico del truciolo ottimale - local nWorkSide, bInvert - if ( not bIsTopBladeCurrent and abs( nSide) ~= 0) or ( bCanUseBlade and bCanUseUnderBlade and nSide == -1) then - if bIsCurrentBladeCW then - nWorkSide = MCH_MILL_WS.LEFT - bInvert = true - dSal, dEal = dEal, dSal - else - nWorkSide = MCH_MILL_WS.RIGHT - bInvert = false - end - else - if bIsCurrentBladeCW then - nWorkSide = MCH_MILL_WS.LEFT - bInvert = false - else - nWorkSide = MCH_MILL_WS.RIGHT - bInvert = true - dSal, dEal = dEal, dSal - end - end - - -- setto la lavorazione con i valori calcolati - EgtSetMachiningParam( MCH_MP.INVERT, bInvert) - EgtSetMachiningParam( MCH_MP.WORKSIDE, nWorkSide) - EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUseCurrent) - EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal) EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)