From a6d9a36dab66a1521d9d5d87df7db4e118ee29ab Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Tue, 13 Jan 2026 16:36:26 +0100 Subject: [PATCH] - gestito BEAM.MACHINE con lista - recupero indice di nesting barra precedente --- BatchProcessNew.lua | 2 +- NestProcessNew.lua | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/BatchProcessNew.lua b/BatchProcessNew.lua index d2de1a1..2a2e0c4 100644 --- a/BatchProcessNew.lua +++ b/BatchProcessNew.lua @@ -211,7 +211,7 @@ elseif BEAM.FLAG == 10 then else sFlag = 'FLAG='..tostring( BEAM.FLAG) end -local sLog = 'BatchProcess : ' .. BEAM.FILE .. ', ' .. BEAM.MACHINE .. ', ' .. sFlag +local sLog = 'BatchProcess : ' .. BEAM.FILE .. ', ' .. ( BEAM.MACHINE or EgtGetCurrMachineName()) .. ', ' .. sFlag EgtOutLog( sLog) -- TODO forzatura calcolo con prerotazioni. Cancellare dopo che รจ stata aggiunta la gestione corretta diff --git a/NestProcessNew.lua b/NestProcessNew.lua index 850c67b..d465a48 100644 --- a/NestProcessNew.lua +++ b/NestProcessNew.lua @@ -435,6 +435,12 @@ if Step > 1 then NestSolutionFromSP( StartingResult, 1) end +-- se esiste un MachGorup precedente +local nPreviousNestIndex = 0 +local nLastMachGroupId = EgtGetLastMachGroup() +if nLastMachGroupId then + nPreviousNestIndex = EgtGetInfo( nLastMachGroupId, "NestIndex", 'i') +end for nMachineIndex = 1, #NEST.MACHINELIST do local sMachineName = NEST.MACHINELIST[nMachineIndex] -- imposto macchina corrente @@ -444,12 +450,12 @@ for nMachineIndex = 1, #NEST.MACHINELIST do EgtRemoveBaseMachineDirFromPackagePath() EgtAddToPackagePath( sMachDir .. '\\Beam\\?.lua') -- creo gruppi di lavorazione per risultato - for MachGroupIndex = 1, #BestResult do - local CurrMachGroup = BestResult[ MachGroupIndex] + for nMachGroupIndex = 1, #BestResult do + local CurrMachGroup = BestResult[nMachGroupIndex] -- creo gruppo di lavorazione local MachGroupName = NewMachGroupName() nMachGroup = EgtAddMachGroup( MachGroupName) - EgtSetInfo( nMachGroup, "NestIndex", MachGroupIndex) + EgtSetInfo( nMachGroup, "NestIndex", nPreviousNestIndex + nMachGroupIndex) EgtSetInfo( nMachGroup, "BARLEN", CurrMachGroup.BarLen) EgtSetInfo( nMachGroup, "MATERIAL", NEST.MATERIAL) EgtSetInfo( nMachGroup, "AUTONEST", 1)