From 2c16c2b6489e48a63595948978b71eb2e00f28f6 Mon Sep 17 00:00:00 2001 From: DarioS Date: Wed, 1 Dec 2021 10:25:27 +0100 Subject: [PATCH] DataBeam : - aggiornato nest travi per nuova interfaccia. --- NestProcess.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/NestProcess.lua b/NestProcess.lua index 6dba0dd..e15266b 100644 --- a/NestProcess.lua +++ b/NestProcess.lua @@ -1,4 +1,4 @@ --- NestProcess.lua by Egaltech s.r.l. 2021/06/14 +-- BeamNestProcess.lua by Egaltech s.r.l. 2021/06/14 -- Gestione nesting automatico pareti -- Intestazioni @@ -12,7 +12,7 @@ EgtEnableDebug( false) --NEST.MACHINE = 'Essetre-90480019_MW' --NEST.FLAG = 3 -local sLog = ' +++ BeamNestProcess : ' .. NEST.FILE .. ', ' .. NEST.MACHINE .. ', ' .. NEST.LEN .. ', ' .. NEST.WIDTH +local sLog = ' +++ BeamNestProcess : ' .. NEST.FILE .. ', ' .. NEST.MACHINE .. ', ' .. LEN["1"] EgtOutLog( sLog) -- Cancello file di log specifico @@ -146,7 +146,7 @@ local nErrCnt = 0 local nWarnCnt = 0 -- Grezzi -local Raws = { LenToFill = NEST.LEN, StartGap = NEST.STARTOFFSET, MidGap = NEST.OFFSET, EndGap = 0, SortType = -1, Count = NEST.QTY} +local Raws = { LenToFill = LEN["1"], StartGap = NEST.STARTOFFSET, MidGap = NEST.OFFSET, EndGap = 0, SortType = -1, Count = QTY["1"]} local nTotRaws = Raws.Count -- Pezzi @@ -161,6 +161,7 @@ for nPartId, nCount in pairs( PART) do end -- Ciclo fino ad esaurimento pezzi o barre +local nRawTot = 0 local dTime = 0 while Raws.Count > 0 and PartsToFill( Parts) > 0 do -- Eseguo ottimizzazione per una barra e visualizzo il risultato @@ -191,6 +192,7 @@ while Raws.Count > 0 and PartsToFill( Parts) > 0 do nInfoIndex = nInfoIndex + 1 end end + nRawTot = nRawTot + 1 end -- Aggiorno per prossima iterazione Raws.Count = Raws.Count - 1 @@ -201,6 +203,7 @@ while Raws.Count > 0 and PartsToFill( Parts) > 0 do end -- creo grezzi per ogni gruppo di lavorazione +local nRawCnt = 0 _G.BEAM = {} BEAM.FILE = NEST.FILE BEAM.MACHINE = NEST.MACHINE @@ -216,6 +219,9 @@ while nMachGroup do if not bOk then EgtOutLog( 'Error in BatchProcessNew.lua call (' .. ( sErr or '') ..')') end + nRawCnt = nRawCnt + 1 + -- aggiorno interfaccia + EgtProcessEvents( 200 + ( nRawCnt / nRawTot * 100), 0) end nMachGroup = nNextMachGroup end