primo implemento ciclo priorità

This commit is contained in:
luca.mazzoleni
2023-05-15 13:31:33 +02:00
parent 78cf115748
commit 63a3cfe698
+14 -1
View File
@@ -535,7 +535,7 @@ local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName
end
-------------------------------------------------------------------------------------------------------------
local function SortMachinings( nPhase, PrevMch, nPartId)
local function SortMachinings( nPhase, PrevMch, nPartId, bOnlyPriority)
-- Chiodature
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Nail_'}, true, nil, nil, nil, true)
-- Tagli con sega a catena che sono rifiniture di spigoli
@@ -641,6 +641,19 @@ function WallExec.ProcessFeatures()
-- riordino le lavorazioni tra tutti i pezzi
local nPhase = 1
local PrevMch = EgtGetPhaseDisposition( nPhase)
local vPriority = {}
local nOperId = EgtGetNextOperation( PrevMch)
local nCurrentPriorityId = 1
while nOperId do
local nPriority = EgtGetInfo( nOperId or GDB_ID.NULL, 'PRIORITY', 'i')
if nPriority and nPriority ~= 0 then vPriority[nCurrentPriorityId] = nPriority end
nCurrentPriorityId = nCurrentPriorityId + 1
end
for i = 1, #vPriority do
PrevMch = SortMachinings( nPhase, PrevMch, nil, vPriority[i])
end
SortMachinings( nPhase, PrevMch)
-- Aggiornamento finale di tutto
EgtSetCurrPhase( 1)