diff --git a/BatchProcessNew.lua b/BatchProcessNew.lua index 94bfe77..ecfa8b5 100644 --- a/BatchProcessNew.lua +++ b/BatchProcessNew.lua @@ -277,6 +277,15 @@ if bToProcess then else vBeam[i].Box = 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 = vBeam[1].Box:getDimX() + 10 @@ -330,6 +339,15 @@ if bToProcess then else vBeam[i].Box = 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 ea714f4..044eef4 100644 --- a/Process.lua +++ b/Process.lua @@ -89,6 +89,14 @@ local function MyProcessInputData() else vBeam[i].Box = 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 = vBeam[1].Box:getDimY() dRawH = vBeam[1].Box:getDimZ()