From cad57b2fd592fb0d19aa7de4aab6a321d399a881 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 15 May 2026 10:37:58 +0200 Subject: [PATCH] - in NestProcess piccole correzioni --- NestProcess.lua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/NestProcess.lua b/NestProcess.lua index 611780e..03a8797 100644 --- a/NestProcess.lua +++ b/NestProcess.lua @@ -81,7 +81,6 @@ function PartTemplates:GetInfoFromPart( id, sStateWithSide) OffsetX = EgtSplitString( Info[1], ',') vtN = VectorFromString( Info[2]) - -- si convertono gli offset in numeri for i = 1, #OffsetX do OffsetX[i] = tonumber( OffsetX[i]) or 0 end @@ -188,13 +187,9 @@ end ---------------------------------------------------------------------------------------------------------- -- script principale --- costruzione lista grezzi a stock disponibili +-- preparazione tabelle lista grezzi (RawInventory), lista pezzi univoci (PartTemplates) e lista singoli pezzi da nestare (JobPool) RawInventory:BuildStock() - --- costruzione lista pezzi template con proprietà geometriche e lista pezzi fisici da nestare BuildPartTemplatesAndJobPool() - --- ordinamento pezzi per lunghezza decrescente JobPool:Sort() -- loop principale: scorre le barre, sia già attive che a stock, e le riempie nel modo migliore possibile @@ -215,8 +210,8 @@ while true do -- 2 Si provano le barre ancora a stock for i = 1, #RawInventory.Stock do - local VirtualBeam = RawInventory:GetNewBeam( RawInventory.Stock[i].dLength) if RawInventory.Stock[i].nCount > 0 then + local VirtualBeam = RawInventory:GetNewBeam( RawInventory.Stock[i].dLength) local CurrentMove = FindBestPartForBeam( VirtualBeam) if CurrentMove and CurrentMove.dScore > dHighestScore then dHighestScore = CurrentMove.dScore