- in NestProcess piccole correzioni

This commit is contained in:
luca.mazzoleni
2026-05-15 10:37:58 +02:00
parent 5e503762e5
commit cad57b2fd5
+2 -7
View File
@@ -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