BugFix/CompiledLua:

- in NestProcess fix percorso basedir per avere il funzionamento corretto anche con script compilati
- in NestProcess piccolo fix per evitare divisione per 0
This commit is contained in:
luca.mazzoleni
2022-10-05 10:50:38 +02:00
parent 182639772d
commit f620269f31
+6 -2
View File
@@ -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