diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index 5efd0c0..2db07d8 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -374,7 +374,7 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS, b local dPosY = EgtIf( BeamData.CENTER_BEAM, ( b3Tab:getDimY() + dRawW * EgtIf( BeamData.RIGHT_LOAD, -1, 1)) / 2, EgtIf( BeamData.RIGHT_LOAD, 0, b3Tab:getDimY())) BeamData.ptOriXR = Point3d( b3Tab:getDimX(), dPosY, 0) BeamData.dPosXR = EgtIf( BeamData.RIGHT_LOAD, MCH_CR.BR, MCH_CR.TR) - + -- Impostazione dell'attrezzaggio di default EgtImportSetup() @@ -1196,7 +1196,9 @@ function BeamExec.GetProcessings( PARTS, bCalcBestPieceUnloadPosition) if bCalcBestPieceUnloadPosition then -- inversione pezzo testa-coda BeamLib.InvertRawPart( PARTS[nPart], 2) - -- TODO in caso di parallelepipedo rettangolare, non serve ricalcolare il box. Se grezzo sagomato potrebbe essere necessario. Da verificare. + -- aggiorno info pezzo + PARTS[nPart].b3Raw = EgtGetRawPartBBox( PARTS[nPart].idRaw) + PARTS[nPart].b3Part = EgtGetBBoxGlob( EgtGetFirstNameInGroup( PARTS[nPart].id, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD) end end local Part = {} @@ -1466,6 +1468,9 @@ function BeamExec.GetCombinationMatrix( PARTS, bCalcBestPieceUnloadPosition) if bCalcBestPieceUnloadPosition then -- inversione del pezzo testa-coda BeamLib.InvertRawPart( PARTS[nPart], 2) + -- aggiorno info pezzo + PARTS[nPart].b3Raw = EgtGetRawPartBBox( PARTS[nPart].idRaw) + PARTS[nPart].b3Part = EgtGetBBoxGlob( EgtGetFirstNameInGroup( PARTS[nPart].id, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD) end end end diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index f88a751..6e57f1f 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -190,12 +190,10 @@ function BeamLib.InvertRawPart( Part, nNumberOfRotations) return end - -- si invertono le travi della fase corrente - local nRId = Part.idRaw - while nRId do - EgtRotateRawPart( nRId, Z_AX(), nNumberOfRotations * 90) - nRId = EgtGetNextRawPart( nRId) - end + --TODO รจ giusto ruotare il pezzo all'interno del grezzo, ma sembra non funzionare correttamente. Appena sistemato, cambiare richiamo funzione con questa commentata + --EgtRotatePartInRawPart( Part.id, Z_AX(), nNumberOfRotations * 90) + EgtRotateRawPart( Part.idRaw, Z_AX(), nNumberOfRotations * 90) + end ------------------------------------------------------------------------------------------------------------- --- funzione che ruota il grezzo