diff --git a/NestProcess.lua b/NestProcess.lua index 745d7d3..0025ac2 100644 --- a/NestProcess.lua +++ b/NestProcess.lua @@ -1,5 +1,6 @@ -- BeamNestProcess.lua by Egaltech s.r.l. 2021/06/14 -- Gestione nesting automatico travi +-- 2022/10/05 Piccole modifiche per far funzionare correttamente i compilati -- Intestazioni require( 'EgtBase') @@ -211,7 +212,10 @@ for ShortIndex = 1, #ShortList do ShortCount = ShortCount + ShortList[ShortIndex].Cnt end local ShortForRaw = floor( ShortCount / MediumRawQty) -local ExtraShortForRaw = fmod( ShortCount, MediumRawQty) +local ExtraShortForRaw = 0 +if MediumRawQty > 0 then + ExtraShortForRaw = fmod( ShortCount, MediumRawQty) +end -- creo lista pezzi corti singoli local SingleShortList = {} for ShortIndex = 1, #ShortList do @@ -329,7 +333,7 @@ while nMachGroup do if EgtGetInfo( nMachGroup, "AUTONEST",'i') == 1 then EgtRemoveInfo( nMachGroup, "AUTONEST") EgtSetInfo( nMachGroup, "UPDATEUI", 1) - local bOk, sErr = pcall( dofile, EgtGetSourceDir() .. "BatchProcessNew.lua") + local bOk, sErr = pcall( dofile, BEAM.BASEDIR .. "\\BatchProcessNew.lua") if not bOk then EgtOutLog( 'Error in BatchProcessNew.lua call (' .. ( sErr or '') ..')') end