From 4c5f620117f17f0b7b2fa2e17eabd93d1f26804d Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Fri, 11 Jul 2025 12:20:30 +0200 Subject: [PATCH] Dopo inversione pezzo si ricalcola il box del pezzo --- LuaLibs/BeamExec.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index 1e0d05c..0d0967f 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