- in BeamLib.AddPhaseWithRawParts e correlati correzioni in caso di scarico ultimo grezzo
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user