Merge branch 'develop' into feature/BetterCuts

This commit is contained in:
luca.mazzoleni
2025-07-16 12:22:20 +02:00
2 changed files with 14 additions and 6 deletions
+13 -5
View File
@@ -189,12 +189,20 @@ function BeamLib.InvertRawPart( Part, nNumberOfRotations)
if nNumberOfRotations == 0 then
return
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)
-- box del solido
local b3BoxPart = EgtGetBBoxGlob( EgtGetFirstNameInGroup( Part.id or GDB_ID.NULL, 'Box') or GDB_ID.NULL, GDB_BB.EXACT)
-- box esatto del pezzo
local b3BoxExact = EgtGetBBoxGlob( Part.id or GDB_ID.NULL, GDB_BB.EXACT)
-- rotazione
local dAngRot = nNumberOfRotations * 90
EgtRotatePartInRawPart( Part.id, Z_AX(), dAngRot)
-- correggo per eccentricità solido rispetto a geometria complessiva del pezzo
local vtEccOri = b3BoxPart:getCenter() - b3BoxExact:getCenter()
local vtEccRot = Vector3d( vtEccOri)
vtEccRot:rotate( Z_AX(), dAngRot)
EgtMovePartInRawPart( Part.id, ( vtEccOri - vtEccRot))
end
-------------------------------------------------------------------------------------------------------------
--- funzione che ruota il grezzo
function BeamLib.RotateRawPart( Part, nNumberOfRotations)
+1 -1
View File
@@ -7,7 +7,7 @@
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
EgtEnableDebug( true)
-- Imposto direttorio libreria specializzata per Travi
EgtAddToPackagePath( BEAM.BASEDIR .. '\\LuaLibs\\?.lua')