diff --git a/LuaLibs/ProcessProfCamb.lua b/LuaLibs/ProcessProfCamb.lua index 3f74deb..5b394fa 100644 --- a/LuaLibs/ProcessProfCamb.lua +++ b/LuaLibs/ProcessProfCamb.lua @@ -385,12 +385,21 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end -- aggiungo geometria EgtSetMachiningGeometry( {{ AuxId, -1}}) - -- sempre lavorazione da sopra o da sotto - -- se lavorazione a destra di fronte o sinistra da dietro, inverto - if ( bHead and vtExtr:getY() > 0.1) or - ( not bHead and vtExtr:getY() < -0.1) then - EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) - EgtSetMachiningParam( MCH_MP.INVERT, true) + -- se lavorazione da sopra o da sotto + if nSide ~= 0 then + -- se lavorazione a destra di fronte o sinistra da dietro, inverto + if ( bHead and vtExtr:getY() > 0.1) or + ( not bHead and vtExtr:getY() < -0.1) then + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + EgtSetMachiningParam( MCH_MP.INVERT, true) + end + else + -- se lavorazione a destra di fronte o sinistra da dietro, inverto + if ( bHead and vtN:getY() > 0.1) or + ( not bHead and vtN:getY() < -0.1) then + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + EgtSetMachiningParam( MCH_MP.INVERT, true) + end end -- assegno affondamento e offset radiale EgtSetMachiningParam( MCH_MP.DEPTH, dDepthCham + dExtra) diff --git a/LuaLibs/ProcessProfConcave.lua b/LuaLibs/ProcessProfConcave.lua index bba3ff1..c512c8e 100644 --- a/LuaLibs/ProcessProfConcave.lua +++ b/LuaLibs/ProcessProfConcave.lua @@ -300,8 +300,8 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) bFlagInvert = not bFlagInvert end -- se lavorazione a destra da dietro o sinistra di fronte, inverto - if ( bHead and vtNF:getY() > 0.1) or - ( not bHead and vtNF:getY() < -0.1) then + if ( bHead and vtN:getY() > 0.1) or + ( not bHead and vtN:getY() < -0.1) then EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) EgtSetMachiningParam( MCH_MP.INVERT, true) bFlagInvert = not bFlagInvert @@ -339,13 +339,23 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) EgtSetMachiningGeometry( {{ AuxId, -1}}) -- resetto il flag inversione percorso bFlagInvert = false - -- sempre lavorazione da sopra o da sotto - -- se lavorazione a destra di fronte o sinistra da dietro, inverto - if ( bHead and vtExtr:getY() > 0.1) or - ( not bHead and vtExtr:getY() < -0.1) then - EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) - EgtSetMachiningParam( MCH_MP.INVERT, true) - bFlagInvert = not bFlagInvert + -- se lavorazione da sopra o da sotto + if nSide ~= 0 then + -- se lavorazione a destra di fronte o sinistra da dietro, inverto + if ( bHead and vtExtr:getY() > 0.1) or + ( not bHead and vtExtr:getY() < -0.1) then + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + EgtSetMachiningParam( MCH_MP.INVERT, true) + bFlagInvert = not bFlagInvert + end + else + -- se lavorazione a destra di fronte o sinistra da dietro, inverto + if ( bHead and vtN:getY() > 0.1) or + ( not bHead and vtN:getY() < -0.1) then + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + EgtSetMachiningParam( MCH_MP.INVERT, true) + bFlagInvert = not bFlagInvert + end end -- assegno affondamento e offset radiale EgtSetMachiningParam( MCH_MP.DEPTH, dDepthCham + dExtra) diff --git a/LuaLibs/ProcessProfConvex.lua b/LuaLibs/ProcessProfConvex.lua index 6647e1e..ee481f5 100644 --- a/LuaLibs/ProcessProfConvex.lua +++ b/LuaLibs/ProcessProfConvex.lua @@ -300,8 +300,8 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) bFlagInvert = not bFlagInvert end -- se lavorazione a destra da dietro o sinistra di fronte, inverto - if ( bHead and vtNF:getY() > 0.1) or - ( not bHead and vtNF:getY() < -0.1) then + if ( bHead and vtN:getY() > 0.1) or + ( not bHead and vtN:getY() < -0.1) then EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) EgtSetMachiningParam( MCH_MP.INVERT, true) bFlagInvert = not bFlagInvert @@ -339,13 +339,23 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) EgtSetMachiningGeometry( {{ AuxId, -1}}) -- resetto il flag inversione percorso bFlagInvert = false - -- sempre lavorazione da sopra o da sotto - -- se lavorazione a destra di fronte o sinistra da dietro, inverto - if ( bHead and vtExtr:getY() > 0.1) or - ( not bHead and vtExtr:getY() < -0.1) then - EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) - EgtSetMachiningParam( MCH_MP.INVERT, true) - bFlagInvert = not bFlagInvert + -- se lavorazione da sopra o da sotto + if nSide ~= 0 then + -- se lavorazione a destra di fronte o sinistra da dietro, inverto + if ( bHead and vtExtr:getY() > 0.1) or + ( not bHead and vtExtr:getY() < -0.1) then + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + EgtSetMachiningParam( MCH_MP.INVERT, true) + bFlagInvert = not bFlagInvert + end + else + -- se lavorazione a destra di fronte o sinistra da dietro, inverto + if ( bHead and vtN:getY() > 0.1) or + ( not bHead and vtN:getY() < -0.1) then + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + EgtSetMachiningParam( MCH_MP.INVERT, true) + bFlagInvert = not bFlagInvert + end end -- assegno affondamento e offset radiale EgtSetMachiningParam( MCH_MP.DEPTH, dDepthCham + dExtra) diff --git a/LuaLibs/ProcessProfFront.lua b/LuaLibs/ProcessProfFront.lua index 6f946fb..8e5a6dd 100644 --- a/LuaLibs/ProcessProfFront.lua +++ b/LuaLibs/ProcessProfFront.lua @@ -208,7 +208,7 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- verifico se sono presenti i parametri Q per la profondità smusso e -- per eseguire in esclusiva solo lo smusso local bMakeVertCham = BD.DOWN_HEAD - local nChamfer, dDepthCham, sChamfer = VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDepthChamferMill, sPreemptiveChamfer) + local nChamfer, dDepthCham, sChamfer, sChamfer2 = VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDepthChamferMill, sPreemptiveChamfer) -- se non posso lavorare la feature perché condizionata dall'esecuzione del solo chamfer -- genero errore e non faccio nulla if nChamfer < 0 then @@ -261,8 +261,8 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) EgtSetMachiningParam( MCH_MP.INVERT, true) end -- se lavorazione a destra da dietro o sinistra di fronte, inverto - if ( bHead and vtNF:getY() > 0.1) or - ( not bHead and vtNF:getY() < -0.1) then + if ( bHead and vtN:getY() > 0.1) or + ( not bHead and vtN:getY() < -0.1) then EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) EgtSetMachiningParam( MCH_MP.INVERT, true) end @@ -298,12 +298,22 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end -- aggiungo geometria EgtSetMachiningGeometry( {{ AuxId, -1}}) - -- sempre lavorazione da sopra o da sotto - -- se lavorazione a destra di fronte o sinistra da dietro, inverto - if ( bHead and vtExtr:getY() > 0.1) or - ( not bHead and vtExtr:getY() < -0.1) then - EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) - EgtSetMachiningParam( MCH_MP.INVERT, true) + -- se lavorazione da sopra o da sotto + if nSide ~= 0 then + -- se lavorazione a destra di fronte o sinistra da dietro, inverto + if ( bHead and vtExtr:getY() > 0.1) or + ( not bHead and vtExtr:getY() < -0.1) then + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + EgtSetMachiningParam( MCH_MP.INVERT, true) + end + -- altrimenti lavorazione dal davanti o dal dietro + else + -- se lavorazione a destra di fronte o sinistra da dietro, inverto + if ( bHead and vtN:getY() > 0.1) or + ( not bHead and vtN:getY() < -0.1) then + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + EgtSetMachiningParam( MCH_MP.INVERT, true) + end end -- assegno affondamento e offset radiale EgtSetMachiningParam( MCH_MP.DEPTH, dDepthCham + dExtra) @@ -415,7 +425,7 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- applico controllo del punto entrata lavorazione e se non è distante dall'esterno -- della feature inverto il punto di inizio della lavorazione e modifico i parametri dell'attacco -- e uscita - ModifySideInvertdLead( Proc, bHead, dToolDiam) + ModifySideInvertLead( Proc, bHead, dToolDiam) end -- se abilitata, aggiungo lavorazione di finitura if bFinish then diff --git a/LuaLibs/ProcessProfHead.lua b/LuaLibs/ProcessProfHead.lua index 37f7505..06043aa 100644 --- a/LuaLibs/ProcessProfHead.lua +++ b/LuaLibs/ProcessProfHead.lua @@ -304,8 +304,8 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) bFlagInvert = not bFlagInvert end -- se lavorazione a destra da dietro o sinistra di fronte, inverto - if ( bHead and vtNF:getY() > 0.1) or - ( not bHead and vtNF:getY() < -0.1) then + if ( bHead and vtN:getY() > 0.1) or + ( not bHead and vtN:getY() < -0.1) then EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) EgtSetMachiningParam( MCH_MP.INVERT, true) bFlagInvert = not bFlagInvert @@ -344,13 +344,24 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) EgtSetMachiningGeometry( {{ AuxId, -1}}) -- resetto il flag inversione percorso bFlagInvert = false - -- sempre lavorazione da sopra o da sotto - -- se lavorazione a destra di fronte o sinistra da dietro, inverto - if ( bHead and vtExtr:getY() > 0.1) or - ( not bHead and vtExtr:getY() < -0.1) then - EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) - EgtSetMachiningParam( MCH_MP.INVERT, true) - bFlagInvert = not bFlagInvert + -- se lavorazione da sopra o da sotto + if nSide ~= 0 then + -- se lavorazione a destra di fronte o sinistra da dietro, inverto + if ( bHead and vtExtr:getY() > 0.1) or + ( not bHead and vtExtr:getY() < -0.1) then + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + EgtSetMachiningParam( MCH_MP.INVERT, true) + bFlagInvert = not bFlagInvert + end + -- altrimenti lavorazione dal davanti o dal dietro + else + -- se lavorazione a destra di fronte o sinistra da dietro, inverto + if ( bHead and vtN:getY() > 0.1) or + ( not bHead and vtN:getY() < -0.1) then + EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) + EgtSetMachiningParam( MCH_MP.INVERT, true) + bFlagInvert = not bFlagInvert + end end -- assegno affondamento e offset radiale EgtSetMachiningParam( MCH_MP.DEPTH, dDepthCham + dExtra)