From 20fccb24afa052202e56e7431ca47fed8017fab5 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 21 Feb 2024 15:11:08 +0100 Subject: [PATCH] correzione a lettura Delta X Y Z da btl --- LuaLibs/WallExec.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/LuaLibs/WallExec.lua b/LuaLibs/WallExec.lua index c8c7c4d..070a0e7 100644 --- a/LuaLibs/WallExec.lua +++ b/LuaLibs/WallExec.lua @@ -85,9 +85,15 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewPr if WD.GetOrigCorner then sOrigCorner = WD.GetOrigCorner( EgtGetInfo( BtlInfoId, 'REFPOS', 'i') or 0) end - local DeltaX = EgtGetInfo( BtlInfoId, 'PANELDELTAY', 'd') or WD.DELTA_X or 0 - local DeltaY = EgtGetInfo( BtlInfoId, 'PANELDELTAX', 'd') or WD.DELTA_Y or 0 - local DeltaZ = EgtGetInfo( BtlInfoId, 'PANELDELTAZ', 'd') or WD.DELTA_Z or 0 + -- offset da interfaccia + local dDeltaXFromBtl = EgtGetInfo( BtlInfoId, 'PANELDELTAY', 'd') or 0 + local dDeltaYFromBtl = EgtGetInfo( BtlInfoId, 'PANELDELTAX', 'd') or 0 + local dDeltaZFromBtl = EgtGetInfo( BtlInfoId, 'PANELDELTAZ', 'd') or 0 + -- se da interfaccia arriva un valore > 0 si usa quello, altrimenti si legge da WallData (default 0) + local DeltaX = EgtIf( dDeltaXFromBtl > 0, dDeltaXFromBtl, WD.DELTA_X or 0) + local DeltaY = EgtIf( dDeltaYFromBtl > 0, dDeltaYFromBtl, WD.DELTA_Y or 0) + local DeltaZ = EgtIf( dDeltaZFromBtl > 0, dDeltaZFromBtl, WD.DELTA_Z or 0) + if sOrigCorner == 'TL' then nCorner = MCH_CR.TL OrigOnTab = Point3d( 0 + abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)