- in BeamLib.AddPhaseWithRawParts e correlati correzioni in caso di scarico ultimo grezzo

This commit is contained in:
luca.mazzoleni
2026-05-19 17:03:21 +02:00
parent 72e3b7dc8f
commit a773e0156a
2 changed files with 11 additions and 4 deletions
+2 -2
View File
@@ -2076,7 +2076,7 @@ function BeamExec.ProcessMachinings( PARTS, bIsFlipRot)
-- ===== finiti i pezzi, si scarica il restante =====
local idRestPart = EgtGetNextRawPart( PARTS[#PARTS].idRaw)
if idRestPart and EgtGetRawPartBBox( idRestPart):getDimX() >= BeamData.dMinRaw then
BeamLib.AddPhaseWithRawParts( PARTS, #PARTS, BeamData.ptOriXR, BeamData.dPosXR, 0)
BeamLib.AddPhaseWithRawParts( PARTS, #PARTS + 1, BeamData.ptOriXR, BeamData.dPosXR, 0)
local nPhase = EgtGetCurrPhase()
local idDisp = EgtGetPhaseDisposition( nPhase)
EgtSetInfo( idDisp, 'TYPE', 'REST')
@@ -2440,7 +2440,7 @@ function BeamExec.ProcessAlternatives( PARTS)
-- ===== finiti i pezzi, si scarica il restante =====
local idRestPart = EgtGetNextRawPart( PARTS[#PARTS].idRaw)
if idRestPart and EgtGetRawPartBBox( idRestPart):getDimX() >= BeamData.dMinRaw then
BeamLib.AddPhaseWithRawParts( PARTS, #PARTS, BeamData.ptOriXR, BeamData.dPosXR, 0)
BeamLib.AddPhaseWithRawParts( PARTS, #PARTS + 1, BeamData.ptOriXR, BeamData.dPosXR, 0)
local nPhase = EgtGetCurrPhase()
local idDisp = EgtGetPhaseDisposition( nPhase)
EgtSetInfo( idDisp, 'TYPE', 'REST')
+9 -2
View File
@@ -163,12 +163,19 @@ end
-------------------------------------------------------------------------------------------------------------
function BeamLib.AddPhaseWithRawParts( PARTS, nPartIndex, OriXR, PosXR, dDeltaSucc)
local nPhase = EgtAddPhase()
local Part = PARTS[nPartIndex]
local Part
local idRaw
-- se l'indice è oltre significa che è l'ultimo grezzo senza pezzi
if nPartIndex > #PARTS then
idRaw = EgtGetNextRawPart( PARTS[#PARTS].idRaw)
else
Part = PARTS[nPartIndex]
idRaw = Part.idRaw
end
-- si aprono i limiti tavola per permettere rotazioni di pezzi più larghi della tavola
EgtSetTableAreaOffset( 2000, 2000, 2000, 2000)
local dRawMove = 0
local bIsFirstRaw = true
local idRaw = Part.idRaw
local dPosXFirst = 0
while idRaw do
local dPosX