- in BeamExec corretta ProcessBeams per i casi in cui dPosX non è definito

This commit is contained in:
luca.mazzoleni
2026-06-08 11:16:50 +02:00
parent 476f214b99
commit 387eda8b4a
+16 -1
View File
@@ -436,8 +436,23 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS, b
local dPartWidth = CurrentPart.b3PartOriginal:getDimY( )
local dPartHeight = CurrentPart.b3PartOriginal:getDimZ( )
-- --- LOGICA ON-THE-FLY PER dPosX (PEZZO CORRENTE E SUCCESSIVO) ---
-- Se il pezzo corrente non ha coordinata, la calcoliamo come fallback standard
if ( not CurrentPart.dPosX) then
if ( i == 1) then
CurrentPart.dPosX = dOvmHead
else
CurrentPart.dPosX = PARTS[i - 1].dPosX + PARTS[i - 1].b3PartOriginal:getDimX( ) + dOvmMid
end
end
-- Se il pezzo SUCCESSIVO non ha coordinata, la pre-calcoliamo per il look-ahead
if ( i < #PARTS and not PARTS[i + 1].dPosX) then
PARTS[i + 1].dPosX = CurrentPart.dPosX + dPartLen + dOvmMid
end
local dStartOffset = dNextStartOffset
local dEndOffset = dOvmMid
local dEndOffset = ( i == #PARTS ) and 0 or dOvmMid
-- LOGICA LOOK-AHEAD: Analisi del gap reale per la ripartizione specchiata
if ( i < #PARTS ) then