diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index a20505f..d29dd7c 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -597,6 +597,8 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) local nSCC = MCH_SCC.NONE if bDrillAngTrasm then nSCC = MCH_SCC.ADIR_NEAR + elseif BD.TURN == 2 then + nSCC = MCH_SCC.ADIR_ZP elseif not BD.C_SIMM and not BD.TURN then nSCC = MCH_SCC.ADIR_YM if AreSameVectorApprox( vtExtr, Z_AX()) then diff --git a/LuaLibs/ProcessFreeContour.lua b/LuaLibs/ProcessFreeContour.lua index c7f00ca..3790731 100644 --- a/LuaLibs/ProcessFreeContour.lua +++ b/LuaLibs/ProcessFreeContour.lua @@ -471,7 +471,9 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) end -- posizione braccio porta testa local nSCC = MCH_SCC.NONE - if not BD.C_SIMM then + if BD.TURN == 2 then + nSCC = MCH_SCC.ADIR_ZP + elseif not BD.C_SIMM then if Proc.Head then nSCC = MCH_SCC.ADIR_XP elseif Proc.Tail then @@ -539,7 +541,9 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) end -- posizione braccio porta testa local nSCC = MCH_SCC.NONE - if not BD.C_SIMM then + if BD.TURN == 2 then + nSCC = MCH_SCC.ADIR_ZP + elseif not BD.C_SIMM then if Proc.Head then nSCC = MCH_SCC.ADIR_XP elseif Proc.Tail then @@ -695,7 +699,9 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) -- posizione braccio porta testa local nSCC = MCH_SCC.NONE - if not BD.C_SIMM then + if BD.TURN == 2 then + nSCC = MCH_SCC.ADIR_ZP + elseif not BD.C_SIMM then if Proc.Head then nSCC = MCH_SCC.ADIR_XP elseif Proc.Tail then @@ -826,7 +832,9 @@ local function MakeByPocket( Proc, nPhase, nRawId, nPartId, dOvmHead) EgtSetMachiningParam( MCH_MP.OFFSR, dExtra) -- posizione braccio porta testa local nSCC = MCH_SCC.NONE - if not BD.C_SIMM then + if BD.TURN == 2 then + nSCC = MCH_SCC.ADIR_ZP + elseif not BD.C_SIMM then if Proc.Head then nSCC = MCH_SCC.ADIR_XP elseif Proc.Tail then diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index dc928d3..1931197 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3478,7 +3478,7 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin sWarn = 'Warning on pocketing ' .. sName .. ': machining can damage next piece. Minimum distance needed : ' .. ( 1 + dDiamTool / 2) .. ' mm' EgtOutLog( sWarn) end - if BD.TURN then + if BD.TURN and BD.TURN ~= 2 then -- centro del pezzo local ptCen = ORIG() if b3Solid then ptCen = b3Solid:getCenter() end diff --git a/LuaLibs/ProcessLongDoubleCut.lua b/LuaLibs/ProcessLongDoubleCut.lua index 846c42f..55cbd9f 100644 --- a/LuaLibs/ProcessLongDoubleCut.lua +++ b/LuaLibs/ProcessLongDoubleCut.lua @@ -1311,6 +1311,9 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster if nSide == 1 or nSide == -1 then local bFromYM = (( vtN[vOrd[i]]:getY() < 0 and bConvex) or ( vtN[vOrd[i]]:getY() > 0 and not bConvex)) nSCC = EgtIf( bFromYM, MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP) + if BD.TURN == 2 and not bFromYM then + nSCC = EgtIf( nSide == -1, MCH_SCC.ADIR_ZM, MCH_SCC.ADIR_ZP) + end else local bFromZM = (( vtN[vOrd[i]]:getZ() < 0 and bConvex) or ( vtN[vOrd[i]]:getZ() > 0 and not bConvex)) nSCC = EgtIf( bFromZM, MCH_SCC.ADIR_ZM, MCH_SCC.ADIR_ZP) diff --git a/LuaLibs/ProcessProfCamb.lua b/LuaLibs/ProcessProfCamb.lua index 831cbbb..b2f8a72 100644 --- a/LuaLibs/ProcessProfCamb.lua +++ b/LuaLibs/ProcessProfCamb.lua @@ -639,7 +639,13 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) end -- posizione braccio porta testa - EgtSetMachiningParam( MCH_MP.SCC, EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)) + local nSCC = MCH_SCC.ADIR_NONE + if BD.TURN == 2 then + nSCC = MCH_SCC.ADIR_ZP + else + nSCC = EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM) + end + EgtSetMachiningParam( MCH_MP.SCC, nSCC) -- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale local ptSP, ptEp local bFinish diff --git a/LuaLibs/ProcessRoundArch.lua b/LuaLibs/ProcessRoundArch.lua index 3eff86e..4765750 100644 --- a/LuaLibs/ProcessRoundArch.lua +++ b/LuaLibs/ProcessRoundArch.lua @@ -239,6 +239,8 @@ function ProcessRoundArch.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) elseif AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then nSCC = MCH_SCC.ADIR_YP end + elseif BD.TURN == 2 then + nSCC = MCH_SCC.ADIR_ZP elseif BD.TURN then if vtN:getZ() > 0.707 then nSCC = MCH_SCC.ADIR_ZP