DataBeam :

- modifiche e correzioni per filling travi.
This commit is contained in:
DarioS
2021-05-26 15:38:17 +02:00
parent 8d40c7d617
commit 5edd6e8e69
2 changed files with 26 additions and 37 deletions
+12
View File
@@ -98,6 +98,14 @@ local function UpdateAuxData( sAuxFile)
return bModif
end
-- Funzione di reset gruppo di lavoro in caso di impossibilità di inserire i pezzi
local function ResetMachGroup( vBeam)
for i = 1, #vBeam do
EgtErase( vBeam[i].Id)
end
EgtRemoveMachGroup( EgtGetCurrMachGroup() or GDB_ID.NULL)
end
-- Imposto direttorio libreria specializzata per Travi
local sBaseDir = EgtGetSourceDir()
EgtAddToPackagePath( sBaseDir .. 'LuaLibs\\?.lua')
@@ -338,6 +346,7 @@ if bToProcess then
sOut = sOut .. vBeam[vBeamErr[i]].Name .. '\n'
table.remove( vBeam, vBeamErr[i])
end
ResetMachGroup( vBeam)
BEAM.ERR = 16
BEAM.MSG = sOut
WriteErrToLogFile( BEAM.ERR, BEAM.MSG)
@@ -348,6 +357,7 @@ if bToProcess then
-- Verifico sezione barra non troppo grande
if not BD.MAX_WIDTH2 or not BD.MAX_HEIGHT2 then
if ( dRawW > BD.MAX_WIDTH + 10 * GEO.EPS_SMALL or dRawH > BD.MAX_HEIGHT + 10 * GEO.EPS_SMALL) then
ResetMachGroup( vBeam)
local sOut = 'Sezione (' .. EgtNumToString( dRawW, 2) .. ' x ' .. EgtNumToString( dRawH, 2) .. ') ' ..
'oltre i limiti della macchina (' .. EgtNumToString( BD.MAX_WIDTH, 2) .. ' x ' .. EgtNumToString( BD.MAX_HEIGHT, 2) .. ') '
BEAM.ERR = 17
@@ -359,6 +369,7 @@ if bToProcess then
else
if ( dRawW > BD.MAX_WIDTH + 10 * GEO.EPS_SMALL or dRawH > BD.MAX_HEIGHT + 10 * GEO.EPS_SMALL) and
( dRawW > BD.MAX_WIDTH2 + 10 * GEO.EPS_SMALL or dRawH > BD.MAX_HEIGHT2 + 10 * GEO.EPS_SMALL) then
ResetMachGroup( vBeam)
local sOut = 'Sezione (' .. EgtNumToString( dRawW, 2) .. ' x ' .. EgtNumToString( dRawH, 2) .. ') ' ..
'oltre i limiti della macchina (' .. EgtNumToString( BD.MAX_WIDTH, 2) .. ' x ' .. EgtNumToString( BD.MAX_HEIGHT, 2) .. ') ' ..
'e (' .. EgtNumToString( BD.MAX_WIDTH2, 2) .. ' x ' .. EgtNumToString( BD.MAX_HEIGHT2, 2) .. ')'
@@ -372,6 +383,7 @@ if bToProcess then
-- Verifico sezione barra non troppo piccola
if dRawW < BD.MIN_WIDTH - 10 * GEO.EPS_SMALL or dRawH < BD.MIN_HEIGHT - 10 * GEO.EPS_SMALL then
ResetMachGroup( vBeam)
local sOut = 'Sezione (' .. EgtNumToString( dRawW, 2) .. ' x ' .. EgtNumToString( dRawH, 2) .. ') ' ..
'sotto i limiti della macchina (' .. EgtNumToString( BD.MIN_WIDTH, 2) .. ' x ' .. EgtNumToString( BD.MIN_HEIGHT, 2) .. ')'
BEAM.ERR = 17