From 950f7d199289151eefed511f1bbfd9dd7bbe0234 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Tue, 4 Oct 2022 16:31:00 +0200 Subject: [PATCH] - correzione Beam in Commento - corretto bug nest che non usciva se pezzo piu' lungo del grezzo --- GetBeamData.lua | 2 +- NestProcess.lua | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/GetBeamData.lua b/GetBeamData.lua index aa01c49..47dd539 100644 --- a/GetBeamData.lua +++ b/GetBeamData.lua @@ -41,4 +41,4 @@ GWD.OVM_MID = BD.OVM_MID -- Tutto ok GWD.ERR = 0 -EgtOutLog( ' +++ GetWallData completed') +EgtOutLog( ' +++ GetBeamData completed') diff --git a/NestProcess.lua b/NestProcess.lua index e82dc8a..745d7d3 100644 --- a/NestProcess.lua +++ b/NestProcess.lua @@ -173,7 +173,11 @@ for nPartId, nCount in pairs( PART) do -- recupero lunghezza pezzo local Len = EgtGetInfo( nPartId, "L", 'd') local DispLen = EgtIf( Len <= 1000, 2000, 0) --EgtIf( Len <= 2000, max( 2000, 6000 - Len), 0) - table.insert( Parts, {Id = nPartId, Len = Len, DispLen = DispLen, Cnt = nCount}) + for RawIndex = 1, #Raws do + if Len + Raws[RawIndex].StartGap < Raws[RawIndex].LenToFill then + table.insert( Parts, {Id = nPartId, Len = Len, DispLen = DispLen, Cnt = nCount}) + end + end end -- lunghezza totale pezzi