Per ruotare il pezzo non lo si toglie più dalla barra, ma lo si gira in "Draw"
This commit is contained in:
@@ -1772,8 +1772,9 @@ function BeamExec.ProcessMachinings( PARTS, bIsFlipRot)
|
||||
local nInitialPosition = MatrixResult.nInitialPosition
|
||||
-- PREROTAZIONE PEZZO
|
||||
if MatrixResult.nInitialPosition ~= 1 or PARTS[nPart].bPartInCombiIsInverted then
|
||||
-- si toglie il pezzo dal grezzo per poter fare operazioni
|
||||
EgtRemovePartFromRawPart( PARTS[nPart].id)
|
||||
-- si esce dalle lavorazioni e si torna in disegna
|
||||
local nCurrMachGroup = EgtGetCurrMachGroup()
|
||||
EgtResetCurrMachGroup()
|
||||
|
||||
-- salvo situazione precedente su lista BEAM ( scrittura variabili globali per interfaccia)
|
||||
if bIsFlipRot then
|
||||
@@ -1795,11 +1796,8 @@ function BeamExec.ProcessMachinings( PARTS, bIsFlipRot)
|
||||
EgtRotate( PARTS[nPart].id, ptRot, X_AX(), nRotationDeg, GDB_RT.GLOB)
|
||||
end
|
||||
|
||||
-- si rimette il pezzo nel grezzo
|
||||
EgtAddPartToRawPart( PARTS[nPart].id, {0,0,0}, PARTS[nPart].idRaw)
|
||||
|
||||
-- dico che il pezzo originale è nella posizione iniziale come arriva da BTL ( è stato appena ruotato qui sopra)
|
||||
nInitialPosition = 1
|
||||
-- si riattiva il MachGroup, i pezzi son rimasti dove erano
|
||||
EgtSetCurrMachGroup( nCurrMachGroup)
|
||||
end
|
||||
|
||||
-- salvo sul PART la posizione di partenza che è stata scelta
|
||||
@@ -1895,8 +1893,6 @@ function BeamExec.ProcessMachinings( PARTS, bIsFlipRot)
|
||||
if PARTS[nPart].bPartInCombiIsInverted then
|
||||
BeamLib.InvertRawPart( PARTS[nPart], -2)
|
||||
end
|
||||
-- ripristino anche eventuali pre-rotazioni
|
||||
nInitialPosition = nInitialPosition + ( BEAM.PREROTATE90 or 0)
|
||||
-- si ribalta il pezzo in posizione iniziale
|
||||
BeamLib.RotateRawPart( PARTS[nPart], 1 - nInitialPosition)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user