From b5cb706ad5588f030b7b72af2e3a7f73deb45d50 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Wed, 10 Jun 2026 15:02:29 +0200 Subject: [PATCH] Aggiunto controllo su massima lunghezza pezzo processabile --- BatchProcessNew.lua | 18 ++++++++++++++++++ Process.lua | 8 ++++++++ 2 files changed, 26 insertions(+) diff --git a/BatchProcessNew.lua b/BatchProcessNew.lua index 1fff59b..31cd284 100644 --- a/BatchProcessNew.lua +++ b/BatchProcessNew.lua @@ -388,6 +388,15 @@ if bToProcess then else PARTS[i].b3PartOriginal = b3Solid end + if BD.MAX_LENGTH and BD.MAX_LENGTH > 10 and b3Solid:getDimX() > BD.MAX_LENGTH then + local sOut = 'Piece-Length (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' .. + 'out of machine limits (' .. EgtNumToString( BD.MAX_LENGTH, 2) .. ') ' + BEAM.ERR = 17 + BEAM.MSG = sOut + WriteErrToLogFile( BEAM.ERR, BEAM.MSG) + PostErrView( BEAM.ERR, BEAM.MSG) + return + end end -- Assegno lunghezza della barra dBarLen = PARTS[1].b3PartOriginal:getDimX() + 10 @@ -447,6 +456,15 @@ if bToProcess then else PARTS[i].b3PartOriginal = b3Solid end + if BD.MAX_LENGTH and BD.MAX_LENGTH > 10 and b3Solid:getDimX() > BD.MAX_LENGTH then + local sOut = 'Piece-Length (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' .. + 'out of machine limits (' .. EgtNumToString( BD.MAX_LENGTH, 2) .. ') ' + BEAM.ERR = 17 + BEAM.MSG = sOut + WriteErrToLogFile( BEAM.ERR, BEAM.MSG) + PostErrView( BEAM.ERR, BEAM.MSG) + return + end end end diff --git a/Process.lua b/Process.lua index e5f75a9..1f9413f 100644 --- a/Process.lua +++ b/Process.lua @@ -131,6 +131,14 @@ local function MyProcessInputData() else PARTS[i].b3PartOriginal = b3Solid end + if BD.MAX_LENGTH and BD.MAX_LENGTH > 10 and b3Solid:getDimX() > BD.MAX_LENGTH then + local sOut = 'Lunghezza (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' .. + 'oltre i limiti della macchina (' .. EgtNumToString( BD.MAX_LENGTH, 2) .. ') ' + EgtOutLog( sOut) + EgtOutBox( sOut, 'Lavora Travi', 'WARNING') + EgtDraw() + return false + end end dRawW = PARTS[1].b3PartOriginal:getDimY() dRawH = PARTS[1].b3PartOriginal:getDimZ()