Files
DataWall/LuaLibs/WallExec.lua
T
DarioS 4b671ee541 DataWall :
- aggiunta gestione prigini intermedie TM e BM
- corretto controllo spessore nel caso di pareti a layer.
2021-10-27 13:24:04 +02:00

520 lines
22 KiB
Lua

-- WallExec.lua by Egaltech s.r.l. 2021/10/27
-- Libreria esecuzione lavorazioni per Pareti
-- Tabella per definizione modulo
local WallExec = {}
-- Include
require( 'EgtBase')
-- Carico i dati globali e libero tutti gli altri
_G.package.loaded.WallData = nil
_G.package.loaded.CutData = nil
_G.package.loaded.MillingData = nil
_G.package.loaded.PocketingData = nil
_G.package.loaded.DrillData = nil
_G.package.loaded.SawingData = nil
local WD = require( 'WallData')
-- Carico le librerie
_G.package.loaded.WMachiningLib = nil
_G.package.loaded.WallLib = nil
_G.package.loaded.WProcessCut = nil
_G.package.loaded.WProcessDoubleCut = nil
_G.package.loaded.WProcessSawCut = nil
_G.package.loaded.WProcessLapJoint = nil
_G.package.loaded.WProcessDrill = nil
_G.package.loaded.WProcessMortise = nil
_G.package.loaded.WProcessDtMortise = nil
_G.package.loaded.WProcessMark = nil
_G.package.loaded.WProcessText = nil
_G.package.loaded.WProcessFreeContour = nil
_G.package.loaded.WProcessVariant = nil
local WM = require( 'WMachiningLib')
local WL = require( 'WallLib')
local Cut = require( 'WProcessCut')
local DoubleCut = require( 'WProcessDoubleCut')
local SawCut = require( 'WProcessSawCut')
local LapJoint = require( 'WProcessLapJoint')
local Drill = require( 'WProcessDrill')
local Mortise = require( 'WProcessMortise')
local DtMortise = require( 'WProcessDtMortise')
local Mark = require( 'WProcessMark')
local Text = require( 'WProcessText')
local FreeContour = require( 'WProcessFreeContour')
local Variant = require( 'WProcessVariant')
-------------------------------------------------------------------------------------------------------------
-- *** Inserimento delle pareti nel pannello ***
-------------------------------------------------------------------------------------------------------------
function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bPartOriBL)
-- Creazione nuovo gruppo di lavoro
if not bMachGroupOk then
local sMgName = EgtGetMachGroupNewName( 'Mach')
local NewMgId = EgtAddMachGroup( sMgName)
if not NewMgId then
local sOut = 'Errore nella creazione del gruppo di lavoro ' .. sMgName
return false, sOut
end
end
-- Impostazione della tavola
EgtSetTable( 'Tab')
-- Area tavola
local b3Tab = EgtGetTableArea()
-- Calcolo posizione estremo di riferimento della tavola rispetto a sua origine in BL
local OrigOnTab
local nCorner
local sOrigCorner = WD.ORIG_CORNER
if WD.GetOrigCorner then
sOrigCorner = WD.GetOrigCorner( EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'REFPOS', 'i') or 1)
end
if sOrigCorner == 'TL' then
nCorner = MCH_CR.TL
OrigOnTab = Point3d( 0, b3Tab:getDimY(), 0)
elseif sOrigCorner == 'BL' then
nCorner = MCH_CR.BL
OrigOnTab = Point3d( 0, 0, 0)
elseif sOrigCorner == 'TR' then
nCorner = MCH_CR.TR
OrigOnTab = Point3d( b3Tab:getDimX(), b3Tab:getDimY(), 0)
elseif sOrigCorner == 'BR' then
nCorner = MCH_CR.BR
OrigOnTab = Point3d( b3Tab:getDimX(), 0, 0)
elseif sOrigCorner == 'TM' then
nCorner = MCH_CR.TR
OrigOnTab = Point3d( WD.MID_REF, b3Tab:getDimY(), 0)
elseif sOrigCorner == 'BM' then
nCorner = MCH_CR.BR
OrigOnTab = Point3d( WD.MID_REF, 0, 0)
end
-- Impostazione dell'attrezzaggio di default
EgtImportSetup()
-- Creazione del grezzo e suo posizionamento in macchina
local nRaw = EgtAddRawPart( Point3d(0,0,0), dRawL, dRawW, dRawH, WD.RAWCOL)
EgtMoveToCornerRawPart( nRaw, OrigOnTab, nCorner)
EgtSetInfo( nRaw, 'ORD', 1)
-- Inserimento dei pezzi nel grezzo
for i = 1, #vWall do
-- assegno identificativo pezzo
local Pz = vWall[i].Id
-- dati del pezzo
local b3Part = EgtGetBBoxGlob( Pz or GDB_ID.NULL, GDB_BB.EXACT)
local b3Solid = vWall[i].Box
if b3Part:isEmpty() or b3Solid:isEmpty() then break end
local PartLen = b3Solid:getDimX()
local PartWidth = b3Solid:getDimY()
local PartHeight = b3Solid:getDimZ()
local vtOffs = b3Part:getMin() - b3Solid:getMin()
-- creo o pulisco gruppo geometrie aggiuntive
if not WL.CreateOrEmptyAddGroup( Pz) then
local sOut = 'Error creating Additional Group in Part ' .. tostring( Pz)
return false, sOut
end
-- inserisco il pezzo nel grezzo
EgtDeselectPartObjs( Pz)
local ptPos
if bPartOriBL then
ptPos = Point3d( vWall[i].PosX, vWall[i].PosZ, ( dRawH - PartHeight) / 2) + vtOffs
else
local dPosH = EgtIf( vWall[i].PosY < 0.1, ( dRawH - PartHeight) / 2, vWall[i].PosY)
ptPos = Point3d( dRawL - vWall[i].PosX - PartLen, vWall[i].PosZ, dPosH) + vtOffs
end
EgtAddPartToRawPart( Pz, ptPos, nRaw)
end
return true
end
-------------------------------------------------------------------------------------------------------------
-- *** Inserimento delle lavorazioni nelle pareti ***
-------------------------------------------------------------------------------------------------------------
function WallExec.CollectFeatures( PartId, b3Raw)
-- recupero le feature
local vProc = {}
local LayerId = {}
LayerId[1] = EgtGetFirstNameInGroup( PartId or GDB_ID.NULL, 'Outline')
LayerId[2] = EgtGetFirstNameInGroup( PartId or GDB_ID.NULL, 'Processings')
for nInd = 1, #LayerId do
local ProcId = EgtGetFirstInGroup( LayerId[nInd] or GDB_ID.NULL)
while ProcId do
local nEntType = EgtGetType( ProcId)
if nEntType == GDB_TY.SRF_MESH or nEntType == GDB_TY.EXT_TEXT or
nEntType == GDB_TY.CRV_LINE or nEntType == GDB_TY.CRV_ARC or nEntType == GDB_TY.CRV_BEZ or nEntType == GDB_TY.CRV_COMPO then
local nGrp = EgtGetInfo( ProcId, 'GRP', 'i')
local nPrc = EgtGetInfo( ProcId, 'PRC', 'i')
local nDo = EgtGetInfo( ProcId, 'DO', 'i') or 1
local nCutId = EgtGetInfo( EgtGetParent( EgtGetParent( ProcId)), 'CUTID', 'i') or 0
local nTaskId = EgtGetInfo( ProcId, 'TASKID', 'i') or 0
if nGrp and nPrc and nDo == 1 then
local Proc = {}
Proc.PartId = PartId
Proc.Id = ProcId
Proc.Grp = nGrp
Proc.Prc = nPrc
Proc.Flg = 1
Proc.Fct = EgtSurfTmFacetCount( ProcId) or 0
Proc.Diam = 0
Proc.Fcs = 0
Proc.Fce = 0
Proc.CutId = nCutId
Proc.TaskId = nTaskId
Proc.Box = EgtGetBBoxGlob( ProcId, GDB_BB.STANDARD)
if Proc.Box and not Proc.Box:isEmpty() then
if Drill.Identify( Proc) then
Proc.Diam, Proc.Fcs, Proc.Fce = Drill.GetData( Proc, b3Raw)
end
table.insert( vProc, Proc)
else
EgtOutLog( ' Feature ' .. tostring( Proc.Id) .. ' is empty (no geometry)')
end
end
end
ProcId = EgtGetNext( ProcId)
end
end
return vProc
end
-------------------------------------------------------------------------------------------------------------
local function ClassifyFeatures( vProc, b3Raw)
for i = 1, #vProc do
local Proc = vProc[i]
-- se taglio
if Cut.Identify( Proc) then
local bOk = Cut.Classify( Proc, b3Raw)
if not bOk then Proc.Flg = 0 end
-- se taglio doppio
elseif DoubleCut.Identify( Proc) then
local bOk = DoubleCut.Classify( Proc, b3Raw)
if not bOk then Proc.Flg = 0 end
-- se taglio con lama
elseif SawCut.Identify( Proc) then
local bOk = SawCut.Classify( Proc, b3Raw)
if not bOk then Proc.Flg = 0 end
-- se tasca
elseif LapJoint.Identify( Proc) then
local bOk = LapJoint.Classify( Proc, b3Raw)
if not bOk then Proc.Flg = 0 end
-- se foratura
elseif Drill.Identify( Proc) then
local bOk = Drill.Classify( Proc, b3Raw)
if not bOk then Proc.Flg = 0 end
-- se mortasatura
elseif Mortise.Identify( Proc) then
local bOk = Mortise.Classify( Proc, b3Raw)
if not bOk then Proc.Flg = 0 end
-- se mortasatura a coda di rondine
elseif DtMortise.Identify( Proc) then
local bOk = DtMortise.Classify( Proc, b3Raw)
if not bOk then Proc.Flg = 0 end
-- se marcatura
elseif Mark.Identify( Proc) then
local bOk = Mark.Classify( Proc, b3Raw)
if not bOk then Proc.Flg = 0 end
-- se testo
elseif Text.Identify( Proc) then
local bOk = Text.Classify( Proc, b3Raw)
if not bOk then Proc.Flg = 0 end
-- se contorno libero, outile o aperture
elseif FreeContour.Identify( Proc) then
local bOk = FreeContour.Classify( Proc, b3Raw)
if not bOk then Proc.Flg = 0 end
-- se feature custom (Variant)
elseif Variant.Identify( Proc) then
local bOk = Variant.Classify( Proc, b3Raw)
if not bOk then Proc.Flg = 0 end
end
end
end
-------------------------------------------------------------------------------------------------------------
local function PrintFeatures( vProc)
EgtOutLog( ' *** Feature List ***')
for i = 1, #vProc do
local Proc = vProc[i]
local sOut = string.format( 'Part=%3d Proc=%3d Grp=%1d Prc=%3d TC=%2d/%d Flg=%2d Fcse=%1d,%1d Diam=%.2f Fct=%2d Dbl=%2d Dlt=%.1f Box=%s',
Proc.PartId, Proc.Id, Proc.Grp, Proc.Prc, Proc.TaskId, Proc.CutId,
Proc.Flg, Proc.Fcs, Proc.Fce, Proc.Diam, Proc.Fct, Proc.Double or 0, Proc.Delta or 0, tostring( Proc.Box))
EgtOutLog( sOut)
end
end
-------------------------------------------------------------------------------------------------------------
local function AddFeatureMachining( Proc, nRawId, b3Raw)
local bOk = true
local sErr = ''
EgtOutLog( ' * Process ' .. tostring( Proc.Id) .. ' *', 1)
-- se taglio (1/2-010-X) o taglio longitudinale (0/3/4-010-X)
if Cut.Identify( Proc) then
-- esecuzione taglio
bOk, sErr = Cut.Make( Proc, nRawId, b3Raw)
-- se taglio doppio (1/2-011-X) o taglio doppio longitudinale (0-012-X)
elseif DoubleCut.Identify( Proc) then
-- esecuzione taglio
bOk, sErr = DoubleCut.Make( Proc, nRawId, b3Raw)
-- se taglio con lama (0/3/4-013-X)
elseif SawCut.Identify( Proc) then
-- esecuzione taglio
bOk, sErr = SawCut.Make( Proc, nRawId, b3Raw)
-- se tasca (3/4-030-X) o similari
elseif LapJoint.Identify( Proc) then
-- esecuzione tasca
bOk, sErr = LapJoint.Make( Proc, nRawId, b3Raw)
-- se foratura ( 3/4-040-X)
elseif Drill.Identify( Proc) then
-- esecuzione foratura
bOk, sErr = Drill.Make( Proc, nRawId, b3Raw)
-- se mortasatura (3/4-050-X) o similari
elseif Mortise.Identify( Proc) then
-- esecuzione mortasatura
bOk, sErr = Mortise.Make( Proc, nRawId, b3Raw)
-- se mortasatura a coda di rondine (3/4-055-X)
elseif DtMortise.Identify( Proc) then
-- esecuzione mortasatura a coda di rondine
bOk, sErr = DtMortise.Make( Proc, nRawId, b3Raw)
-- se marcatura (3/4-060-X)
elseif Mark.Identify( Proc) then
-- esecuzione marcatura
bOk, sErr = Mark.Make( Proc, nRawId, b3Raw)
-- se testo (4-061-X)
elseif Text.Identify( Proc) then
-- esecuzione incisione testo
bOk, sErr = Text.Make( Proc, nRawId, b3Raw)
-- se contorno libero, outline o apertura ( 0/3/4-250/251/252-X)
elseif FreeContour.Identify( Proc) then
-- esecuzione contorno
bOk, sErr = FreeContour.Make( Proc, nRawId, b3Raw)
-- se feature custom (Variant)
elseif Variant.Identify( Proc) then
-- esecuzione
bOk, sErr = Variant.Make( Proc, nRawId, b3Raw)
-- altrimenti feature non riconosciuta
else
bOk = false
sErr = 'Feature type non recognized for machining'
end
return bOk, sErr
end
-------------------------------------------------------------------------------------------------------------
local function MoveMachiningsAtEnd( nPhase, nType, sStartName, sProperty)
local nOperId = EgtGetPhaseDisposition( nPhase)
local nLastId = EgtGetLastOperation()
local nInsertId = nLastId
while nOperId do
local nNextOperId = EgtGetNextOperation( nOperId)
if EgtGetOperationPhase( nOperId) == nPhase and EgtGetOperationType( nOperId) == nType and
( ( EgtGetInfo( nOperId, 'MOVE_AFTER', 'i') == 1 ) or
( not sStartName or string.sub( EgtGetName( nOperId), 1, #sStartName) == sStartName)) then
EgtRelocateGlob( nOperId, nInsertId, GDB_IN.AFTER)
nInsertId = nOperId
end
if nOperId == nLastId then
break
end
nOperId = nNextOperId
end
end
------ Ordinamento dei tagli, delle fresature e delle forature -------
local function SortMach( nPhase, PrevMch, nPartId, nType, sStartName, bExistName, sInfo, bExistInfo)
-- dichiarazione tabella
local TabCut = {}
-- Recupero gli identificativi delle lavorazioni e annullo eventuali allungamenti e Id di altre lavorazioni rappresentate
local nOperId = EgtGetNextOperation( PrevMch)
while nOperId do
-- Se appartiene alla fase corrente e taglio con lama non da sopra (sempre su 1 sola entità)
if EgtGetOperationPhase( nOperId) == nPhase and EgtGetOperationType( nOperId) == nType and
( not nPartId or EgtGetInfo( nOperId, 'Part', 'i') == nPartId) and
( not sStartName or ( bExistName and string.sub( EgtGetName( nOperId), 1, #sStartName) == sStartName) or
( not bExistName and string.sub( EgtGetName( nOperId), 1, #sStartName) ~= sStartName)) and
( not sInfo or ( bExistInfo and EgtGetInfo( nOperId, sInfo, 'i') == 1) or
( not bExistInfo and EgtGetInfo( nOperId, sInfo, 'i') ~= 1)) then
-- non si deve cambiare lo stato di attivazione della lavorazione (se disabilitata errata)
EgtSetCurrMachining( nOperId)
if not EgtIsMachiningEmpty() then
-- punto iniziale e finale e direzione della lavorazione
local ptStart = EgtGetMachiningStartPoint()
local ptEnd = EgtGetMachiningEndPoint()
table.insert( TabCut, {Mch=nOperId, Ent=nEntId, Start=ptStart, End=ptEnd})
end
end
-- Passo alla operazione successiva
nOperId = EgtGetNextOperation( nOperId)
end
-- ordino le lavorazioni
--EgtOutLog('Dati per ShortestPath :')
EgtSpInit()
for i = 1, #TabCut do
local ptS = TabCut[i].Start
local ptE = TabCut[i].End
EgtSpAddPoint( ptS:getX(), ptS:getY(), ptS:getZ(), 0, 0,
ptE:getX(), ptE:getY(), ptE:getZ(), 0, 0)
end
EgtSpSetAngularParams( 1000, 40, 2000, 60)
EgtSpSetOpenBound( true, SHP_OB.NEAR_PNT, 50000, 0, 0, 0, 0)
if WD.BEAM_MACHINE and nType == MCH_OY.SAWING then
EgtSpSetOpenBound( false, SHP_OB.NEAR_PNT, -50000, 0, 0, 0, 0)
end
local vOrd = EgtSpCalculate( SHP_TY.OPEN)
EgtSpTerminate()
-- applico ordinamento calcolato
if vOrd then
for i = 1, #vOrd do
EgtRelocateGlob( TabCut[vOrd[i]].Mch, PrevMch, GDB_IN.AFTER)
PrevMch = TabCut[vOrd[i]].Mch
end
end
return PrevMch
end
-------------------------------------------------------------------------------------------------------------
local function SortMachinings( nPhase, PrevMch, nPartId)
-- Chiodature
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, 'Nail_', true)
-- Tagli con sega a catena che sono rifiniture di spigoli
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MORTISING, 'Csaw_', false)
-- Forature
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, 'MOVE_AFTER', false)
-- Svuotature
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, nil, nil, 'MOVE_AFTER', false)
-- Lavorazioni di superficie
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFFINISHING, nil, nil, 'MOVE_AFTER', false)
-- Fresature che sono rifiniture di spigoli
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, 'Clean_', false, 'MOVE_AFTER', false)
-- Fresature che sono puliture di spigoli
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, 'Clean_', true, 'MOVE_AFTER', false)
-- Tagli con lama
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.SAWING)
-- Qui rimozione sfridi (se ci sono lavorazioni successive)
-- Tagli con sega a catena che vanno fatti dopo i tagli con lama
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MORTISING, 'Csaw_', true)
-- Fresature (puliture di spigoli) che vanno fatte dopo i tagli con lama
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, nil, nil, 'MOVE_AFTER', true)
-- Forature che vanno fatte dopo i tagli con lama
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, 'MOVE_AFTER', true)
-- Svuotature che vanno fatte dopo i tagli con lama
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, nil, nil, 'MOVE_AFTER', true)
-- Lavorazioni di superficie che vanno fatte dopo i tagli con lama
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFFINISHING, nil, nil, 'MOVE_AFTER', true)
return PrevMch
end
-------------------------------------------------------------------------------------------------------------
function WallExec.ProcessFeatures()
-- errori e stato
local nTotErr = 0
local Stats = {}
-- recupero il grezzo e il suo box
local nRawId = EgtGetFirstRawPart()
local b3Raw = EgtGetRawPartBBox( nRawId)
-- raccolgo l'elenco dei pezzi
local vPart = {}
local nPartId = EgtGetFirstPartInRawPart( nRawId)
while nPartId do
local Ls = EgtGetFirstNameInGroup( nPartId, 'Box')
local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD)
table.insert( vPart, {Id=nPartId, Box=b3Solid})
nPartId = EgtGetNextPartInRawPart( nPartId)
end
-- raccolgo l'elenco delle feature da lavorare, ciclando sui pezzi
local vProc = {}
for i = 1, #vPart do
-- recupero le feature di lavorazione della parete
local vPartProc = WallExec.CollectFeatures( vPart[i].Id, b3Raw)
vProc = EgtJoinTables( vProc, vPartProc)
end
-- classifico le feature
ClassifyFeatures( vProc, b3Raw)
-- Eventuale determinazione delle feature lavorabili in parallelo (implementata nella configurazione macchina)
-- si impostano i flag Double (nil/0=no, 1=su X, 2=su Y) e Delta (offset tra T14 e T12 positivo o negativo)
if WD.FindFeaturesInDouble then
WD.FindFeaturesInDouble( vProc, b3Raw)
end
-- debug
if EgtGetDebugLevel() >= 1 then
PrintFeatures( vProc)
end
EgtOutLog( ' *** AddMachinings ***', 1)
-- inserisco le lavorazioni
for i = 1, #vProc do
-- creo la lavorazione
local Proc = vProc[i]
if Proc.Flg ~= 0 then
local bOk, sMsg = AddFeatureMachining( Proc, nRawId, b3Raw)
if not bOk then
nTotErr = nTotErr + 1
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
elseif sMsg and #sMsg > 0 then
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
else
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
end
elseif not Proc.Double then
local sMsg = 'Feature not machinable by orientation'
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
end
end
EgtOutLog( ' *** End AddMachinings ***', 1)
-- se macchina pareti
if not WD.BEAM_MACHINE then
-- riordino le lavorazioni tra tutti i pezzi
local nPhase = 1
local PrevMch = EgtGetPhaseDisposition( nPhase)
SortMachinings( nPhase, PrevMch)
-- Aggiornamento finale di tutto
EgtSetCurrPhase( 1)
EgtApplyAllMachinings()
-- altrimenti macchina travi
else
-- dichiaro lavorazione pareti
EgtSetInfo( EgtGetCurrMachGroup() or GDB_ID.NULL, 'Wall', '1')
-- ordino i pezzi secondo le X decrescenti
local function CompareParts( P1, P2)
return P1.Box:getCenter():getX() > P2.Box:getCenter():getX()
end
table.sort( vPart, CompareParts)
-- riordino le lavorazioni sui singoli pezzi
local nPhase = 1
local PrevMch = EgtGetPhaseDisposition( nPhase)
for i = 1, #vPart do
PrevMch = SortMachinings( nPhase, PrevMch, vPart[i].Id)
end
-- aggiungo dati su prima disposizione
local nDispId = EgtGetPhaseDisposition( 1)
EgtSetInfo( nDispId, 'TYPE', 'START')
EgtSetInfo( nDispId, 'ORD', 1)
-- aggiungo flag su ultima lavorazione
local nLastMchId = EgtGetLastActiveOperation()
EgtSetCurrMachining( nLastMchId)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'Cut;')
-- aggiungo disposizione per lo scarico
EgtAddPhase()
local nRawId = EgtGetFirstRawPart()
EgtKeepRawPart( nRawId, 1)
local nDisp2Id = EgtGetPhaseDisposition( 2)
EgtSetInfo( nDisp2Id, 'TYPE', 'END')
EgtSetInfo( nDisp2Id, 'ORD', 1)
-- Aggiornamento finale di tutto
EgtSetCurrPhase( 1)
local bApplOk, sApplErrors, sApplWarns = EgtApplyAllMachinings()
if not bApplOk then
nTotErr = nTotErr + 1
table.insert( Stats, {Err = 1, Msg=sApplErrors, Rot=0, CutId=0, TaskId=0})
elseif sApplWarns and #sApplWarns > 0 then
-- non interessano perchè riguardano lo scarico delle travi
end
end
-- restituzione risultati
return ( nTotErr == 0), Stats
end
-------------------------------------------------------------------------------------------------------------
return WallExec