diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index 91805c7..8af3eeb 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -1,8 +1,9 @@ --- ProcessDrill.lua by Egaltech s.r.l. 2021/09/19 +-- ProcessDrill.lua by Egaltech s.r.l. 2021/10/29 -- Gestione calcolo forature per Travi -- 2021/04/14 DS Corretta gestione Invert con testa da sotto. Migliorato calcolo ingombro portautensile. -- 2021/05/03 DS Su macchina con testa da sotto aggiunta possibilità di fare fori verticali metà sopra e l'altra sotto. -- 2021/09/19 DS Si premia il più possibile ricerca punta con adeguato affondamento. +-- 2021/10/29 DS MaxElev anche su fori con svuotatura. -- Tabella per definizione modulo local ProcessDrill = {} @@ -411,14 +412,11 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) -- Note utente con dichiarazione nessuna generazione sfridi per Vmill local sUserNotes = 'VMRS=0;' - -- se foratura - if sType == 'Drill' or sType == 'Drill_H2' then - -- aggiungo alle note massima elevazione (coincide con affondamento) - sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( dDepth, 1) .. ';' - -- se foro passante, aggiungo questa qualifica alle note - if bOpen then - sUserNotes = sUserNotes .. 'Open=1;' - end + -- aggiungo alle note massima elevazione (coincide con affondamento) + sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( dDepth, 1) .. ';' + -- se foro passante, aggiungo questa qualifica alle note + if ( sType == 'Drill' or sType == 'Drill_H2') and bOpen then + sUserNotes = sUserNotes .. 'Open=1;' end -- se lavorazione in doppio if EgtExistsInfo( Proc.Id, 'MAIN') then diff --git a/LuaLibs/ProcessLongCut.lua b/LuaLibs/ProcessLongCut.lua index 8798126..760a205 100644 --- a/LuaLibs/ProcessLongCut.lua +++ b/LuaLibs/ProcessLongCut.lua @@ -1,4 +1,4 @@ --- ProcessLongCut.lua by Egaltech s.r.l. 2021/10/19 +-- ProcessLongCut.lua by Egaltech s.r.l. 2021/10/29 -- Gestione calcolo taglio longitudinale per Travi -- 2021/02/03 Corretto FaceUse con fresa orizzontale su taglio orizzontale. -- 2021/05/18 Possibile taglio con lama anche di fianco su macchina con testa da sotto. @@ -6,6 +6,7 @@ -- 2021/07/20 Con utensile di fianco e con determinati angoli e se altezza utensile è inferiore all'altezza faccia -- è possibile fare doppio taglio opposto su tutte le facce(sopra, sotto e fianchi) -- 2021/09/03 Gestione facce lunghe non passanti con taglio di lama +-- 2021/10/29 Aggiunta opzione tipo lavorazione 'LongCut'. -- Tabella per definizione modulo local ProcessLongCut = {} @@ -475,9 +476,10 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus end end if bCanUseBlade then - sCutting = ML.FindCutting( 'HeadSide') + local sCutType = EgtIf( BD.USE_LONGCUT, 'LongCut', 'HeadSide') + sCutting = ML.FindCutting( sCutType) if not sCutting then - local sErr = 'Error : sawing HeadSide not found in library' + local sErr = 'Error : sawing '..sCutType..' not found in library' EgtOutLog( sErr) return false, sErr end diff --git a/LuaLibs/ProcessLongDoubleCut.lua b/LuaLibs/ProcessLongDoubleCut.lua index eef3e0d..7bfde53 100644 --- a/LuaLibs/ProcessLongDoubleCut.lua +++ b/LuaLibs/ProcessLongDoubleCut.lua @@ -1,7 +1,8 @@ --- ProcessLongDoubleCut.lua by Egaltech s.r.l. 2021/10/01 +-- ProcessLongDoubleCut.lua by Egaltech s.r.l. 2021/10/29 -- Gestione calcolo doppio taglio longitudinale per Travi -- 2021/05/18 Possibile taglio con lama anche di fianco su macchina con testa da sotto. -- 2021/06/29 Corretta gestione caso equivalente a due smussi. +-- 2021/10/29 Aggiunta opzione tipo lavorazione 'LongCut'. -- Tabella per definizione modulo local ProcessLong2Cut = {} @@ -409,9 +410,10 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster end end if bCanUseBlade then - sCutting = ML.FindCutting( 'HeadSide') + local sCutType = EgtIf( BD.USE_LONGCUT, 'LongCut', 'HeadSide') + sCutting = ML.FindCutting( sCutType) if not sCutting then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' sawing not found in library' + local sErr = 'Error : sawing '..sCutType..' not found in library' EgtOutLog( sErr) return false, sErr end @@ -526,7 +528,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster -- determino se posso usare lame sulla faccia specifica bCanUseBlade, bCanUseUnderBlade = CalcBladeUse( bUseBlade, BD.DOWN_HEAD, nSide, vtN[vOrd[j]], nil, bConvex, j, bFront) if not bCanUseUnderBlade and not bCanUseBlade then - local sErr = 'Error, impossible use blade on too negative face' + local sErr = 'Error : impossible use blade on too negative face' EgtOutLog( sErr) return false, sErr end @@ -545,7 +547,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster -- se lama da sotto verifico se la componente Y della profondità di taglio supera la capacità della lama if nSide <= 0 and bCanUseUnderBlade then if (( vWidth[vOrd[j]] - dDimStrip) / 2) > dMaxDepthDn then - local sErr = 'Error, side depth is bigger than underneath blade cut depth' + local sErr = 'Error : side depth is bigger than underneath blade cut depth' EgtOutLog( sErr) return false, sErr end @@ -768,14 +770,14 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster -- determino se posso usare lame sulla faccia specifica bCanUseBlade, bCanUseUnderBlade = CalcBladeUse( bUseBlade, BD.DOWN_HEAD, nSide, vtN[vOrd[j]], nil, bConvex, j, bFront, dSinLimit) if not bCanUseUnderBlade and not bCanUseBlade then - local sErr = 'Error, impossible use blade on too negative face' + local sErr = 'Error : impossible use blade on too negative face' EgtOutLog( sErr) return false, sErr end -- se lama da sotto verifico se la componente Y della profondità di taglio supera la capacità della lama if nSide <= 0 and bCanUseUnderBlade then if ( vWidth[vOrd[j]] / 2) > dMaxDepthDn then - local sErr = 'Error, side depth is bigger than underneath blade cut depth' + local sErr = 'Error : side depth is bigger than underneath blade cut depth' EgtOutLog( sErr) return false, sErr end