- in BeamExec corretto calcolo della distanza dal pezzo successivo in caso di ultimo pezzo per tenere conto di grezzo scaricabile o meno
This commit is contained in:
@@ -442,11 +442,9 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS)
|
||||
-- aggiorno grezzo precedente
|
||||
idPrevRaw = PARTS[i].idRaw
|
||||
dPrevDelta = dDelta
|
||||
-- TODO dDistanceToNextPiece è errato, va calcolato tenendo conto dei 3 casi (altro pezzo successivo, ultimo pezzo con dietro grezzo scaricabile, ultimo pezzo con dietro grezzo a perdere)
|
||||
PARTS[i].dDistanceToNextPiece = dDelta
|
||||
|
||||
PARTS[i].dRestLength = dLen
|
||||
PARTS[i].bIsLastPart = ( i == #PARTS)
|
||||
PARTS[i].dDistanceToNextPiece = dDelta
|
||||
PARTS[i].dRestLength = dLen
|
||||
PARTS[i].b3Raw = EgtGetRawPartBBox( PARTS[i].idRaw)
|
||||
PARTS[i].dLength = PARTS[i].b3Raw:getDimX()
|
||||
PARTS[i].dWidth = PARTS[i].b3Raw:getDimY()
|
||||
@@ -468,14 +466,20 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS)
|
||||
end
|
||||
|
||||
-- Se rimasto materiale aggiungo grezzo dell'avanzo
|
||||
-- TODO valutare se ridurre la dLen minima perchè crea discrepanze tra lunghezza inserita e VMill
|
||||
if dLen > 10 then
|
||||
PARTS[#PARTS].bNextIsRaw = true
|
||||
local idRaw = EgtAddRawPart( Point3d(0,0,0), dLen, dRawW, dRawH, BeamData.RAWCOL)
|
||||
EgtMoveToCornerRawPart( idRaw, BeamData.ptOriXR, BeamData.dPosXR)
|
||||
EgtMoveRawPart( idRaw, Vector3d( dLen - dRawL, 0, 0))
|
||||
-- assegno ordine in lavorazione
|
||||
nCnt = nCnt + 1
|
||||
EgtSetInfo( idRaw, 'ORD', nCnt)
|
||||
-- aggiorno distanza dell'ultimo pezzo dall'eventuale grezzo scaricabile
|
||||
if EgtGetRawPartBBox( idRaw):getDimX() < BeamData.dMinRaw then
|
||||
PARTS[#PARTS].dDistanceToNextPiece = 10000
|
||||
end
|
||||
else
|
||||
PARTS[#PARTS].dDistanceToNextPiece = 10000
|
||||
end
|
||||
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user