diff --git a/BatchProcess.lua b/BatchProcess.lua index 8034ebd..70f3be6 100644 --- a/BatchProcess.lua +++ b/BatchProcess.lua @@ -1,4 +1,4 @@ --- BatchProcess.lua by Egaltech s.r.l. 2020/06/12 +-- BatchProcess.lua by Egaltech s.r.l. 2021/02/04 -- Gestione calcolo batch disposizione e lavorazioni per Travi -- 2019/07/11 Aggiunta gestione stato rotazione di feature per TS3. -- 2019/07/16 Aggiunta gestione modalità oltre 10 per impostazione macchina e uscita. @@ -16,6 +16,7 @@ -- 2020/01/30 File Diff con nome del btl. -- 2020/02/12 Migliorie nella gestione degli errori. -- 2020/06/12 Si esegue sempre Processing se parametri macchina TS3 successivi al btl. +-- 2021/02/04 Se necessario ricalcolo allora si aggiorna anche l'attrezzaggio. -- Intestazioni require( 'EgtBase') @@ -417,9 +418,10 @@ else UpdateAuxData( sBtmFile) -- Passo in modalità lavora EgtSetCurrMachGroup( EgtGetLastMachGroup()) - -- Se necessario eseguo aggiornamento con ricalcolo delle lavorazioni + -- Se necessario eseguo aggiornamento con setup corrente e ricalcolo delle lavorazioni if bToRecalc then EgtOutLog( ' +++ Recalculating all dispositions and machinings >>>') + EgtImportSetup() EgtApplyAllMachinings() -- copia del file btl originale (per dichiarare progetto ricalcolato) EgtCopyFile( BEAM.FILE, sDir..sTitle..'.ori'..sExt) @@ -435,7 +437,7 @@ if ( BEAM.FLAG == 0 and ( bToProcess or bToRecalc)) or BEAM.FLAG == 3 or BEAM.F if not bSimOk then if nErr == MCH_SHE.INIT then BEAM.ERR = 19 - BEAM.MSG = 'Error in clamps disposition' + BEAM.MSG = 'Error starting simulation' elseif nErr == MCH_SHE.COLLISION then BEAM.ERR = 22 BEAM.MSG = 'Head-part collision' diff --git a/BatchProcessNew.lua b/BatchProcessNew.lua index 71ce874..753780b 100644 --- a/BatchProcessNew.lua +++ b/BatchProcessNew.lua @@ -1,7 +1,8 @@ --- BatchProcess.lua by Egaltech s.r.l. 2021/01/15 +-- BatchProcess.lua by Egaltech s.r.l. 2021/02/04 -- Gestione calcolo batch disposizione e lavorazioni per Travi -- 2021/01/07 Per nuova interfaccia Egt. -- 2021/01/15 CREATE_BAR ora FLAG = 6 (prima 5). +-- 2021/02/04 Se necessario ricalcolo allora si aggiorna anche l'attrezzaggio. -- Intestazioni require( 'EgtBase') @@ -462,9 +463,10 @@ else UpdateAuxData( sBtmFile) -- Passo in modalità lavora EgtSetCurrMachGroup( EgtGetLastMachGroup()) - -- Se necessario eseguo aggiornamento con ricalcolo delle lavorazioni + -- Se necessario eseguo aggiornamento con setup corrente e ricalcolo delle lavorazioni if bToRecalc then EgtOutLog( ' +++ Recalculating all dispositions and machinings >>>') + EgtImportSetup() EgtApplyAllMachinings() -- copia del file btl originale (per dichiarare progetto ricalcolato) EgtCopyFile( BEAM.FILE, sDir..sTitle..'.ori'..sExt) @@ -480,7 +482,7 @@ if ( BEAM.FLAG == 0 and ( bToProcess or bToRecalc)) or BEAM.FLAG == 3 or BEAM.F if not bSimOk then if nErr == MCH_SHE.INIT then BEAM.ERR = 19 - BEAM.MSG = 'Error in clamps disposition' + BEAM.MSG = 'Error starting simulation' elseif nErr == MCH_SHE.COLLISION then BEAM.ERR = 22 BEAM.MSG = 'Head-part collision' diff --git a/LuaLibs/ProcessCut.lua b/LuaLibs/ProcessCut.lua index 8c7cd8f..e552130 100644 --- a/LuaLibs/ProcessCut.lua +++ b/LuaLibs/ProcessCut.lua @@ -439,7 +439,7 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, local vtOrthoO if bFromBottom and dCutV < dMaxVertDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then vtOrthoO = -Z_AX() - elseif bHorizCut then + elseif bHorizCut and b3Solid:getDimX() > BD.LEN_SHORT_PART then vtOrthoO = Z_AX() elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and abs( vtN:getY()) > 0.259 and vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then if Proc.Head then