Prima versione che sistema il pezzo in interfaccia come è stato preruotato
This commit is contained in:
+22
-1
@@ -1614,7 +1614,7 @@ function BeamExec.GetCombinationMatrix( PARTS, bIsFlipRot)
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
function BeamExec.ProcessMachinings( PARTS)
|
||||
function BeamExec.ProcessMachinings( PARTS, bIsFlipRot)
|
||||
-- ciclo sui pezzi
|
||||
local nTotErr = 0
|
||||
local Stats = {}
|
||||
@@ -1772,6 +1772,27 @@ function BeamExec.ProcessMachinings( PARTS)
|
||||
nRawId = EgtGetNextRawPart( nRawId)
|
||||
end
|
||||
|
||||
|
||||
-- TODO VERIFICARE ROTAZIONI!!!
|
||||
if MatrixResult.nInitialPosition ~= 1 then
|
||||
-- salvo situazione precedente su lista BEAM ( scrittura variabili globali per interfaccia)
|
||||
if bIsFlipRot then
|
||||
BEAM.PREROTATE90 = PARTS[1].nInitialPosition - 1
|
||||
BEAM.PREINVERT = EgtIf( PARTS[1].bPartInCombiIsInverted, 1, 0)
|
||||
-- se c'è stata inversione, si inverte il pezzo anche in disegna
|
||||
end
|
||||
-- se c'è stata una prerotazione, si ruota il pezzo anche in disegna
|
||||
local b3Solid = EgtGetRawPartBBox( PARTS[1].idRaw) -- PARTS[1].b3PartOriginal -- EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
-- eseguo rotazione di 90 gradi attorno asse X
|
||||
EgtRemovePartFromRawPart( PARTS[1].id)
|
||||
local ptRot = PARTS[1].b3PartOriginal:getMin() + Vector3d( 0, PARTS[1].b3PartOriginal:getDimY() / 2, PARTS[1].b3PartOriginal:getDimZ() / 2)
|
||||
local nRotationDeg = 90 * (MatrixResult.nInitialPosition - 1)
|
||||
EgtRotate( PARTS[1].id, ptRot, X_AX(), nRotationDeg, GDB_RT.GLOB)
|
||||
EgtAddPartToRawPart( PARTS[1].id, {0,0,0}, PARTS[1].idRaw)
|
||||
MatrixResult.nInitialPosition = 1
|
||||
PARTS[nPart].nInitialPosition = 1
|
||||
end
|
||||
|
||||
local bAreAllMachiningApplyOk
|
||||
local sErr
|
||||
local bSplitAlreadyExecuted = false
|
||||
|
||||
Reference in New Issue
Block a user