- GetBestStrategy suddivisa in : GetBestStrategyFromProcList e GetFeatureBestStrategy

- Se si deve riprocessare, si riporta il pezzo in posizione originale
- in GetCombinationListFromMatrix si ricalcola la migliore strategia in caso ChosenStrategy non presente (solo se ReProcess)
- Piccole migliorie
This commit is contained in:
andrea.villa
2026-02-10 09:02:31 +01:00
parent 1c24f1046d
commit fe6c0bb31c
5 changed files with 64 additions and 47 deletions
+9 -9
View File
@@ -1145,15 +1145,15 @@ end
-------------------------------------------------------------------------------------------------------------
-- funzione che verifica se ha senso riprocessare tutto dall'inizio,
-- perchè ci sono buone probabilità che l'errore trovato in fase di applicazione si possa risolvere (escludendo la lavorazione scelta in precedenza)
local function IsReprocessWorthIt( nError)
local bReprocess = false
local function IsReProcessWorthIt( nError)
local bReProcess = false
-- errori di Extra-corsa
if nError == 2110 or nError == 2216 or nError == 2318 or nError == 2424 or nError == 2508 then
bReprocess = true
bReProcess = true
end
return bReprocess
return bReProcess
end
-------------------------------------------------------------------------------------------------------------
@@ -1163,7 +1163,7 @@ function MachiningLib.AddOperations( MACHININGS, Part, sRotation)
local sErr = ''
local bAreAllMachiningApplyOk = true
local bSplitExecuted = false
local bTryToReprocess = false
local bTryToReProcess = false
-- parametri generali lavorazione
local MachiningParameters = {
@@ -1366,8 +1366,8 @@ function MachiningLib.AddOperations( MACHININGS, Part, sRotation)
CurrProc.AvailableStrategies[CurrProc.nIndexBestStrategy].Result.sStatus = 'Not-Applicable'
CurrProc.ChosenStrategy= nil
-- si verifica se vale la pena riprocessare tutto (perchè si pensa possa risolvere il problema)
if IsReprocessWorthIt( nErr) then
bTryToReprocess = true
if IsReProcessWorthIt( nErr) then
bTryToReProcess = true
end
-- update risultati
-- TODO è corretto mettere non applicabile????? disattivare e dare un'incompleta gialla?
@@ -1470,13 +1470,13 @@ function MachiningLib.AddOperations( MACHININGS, Part, sRotation)
EgtSetInfo( idDisp, 'TCING', Part.NotClampableLength[sRotation].dTail or 0)
end
return bAreAllMachiningApplyOk, sErr, bSplitExecuted, bTryToReprocess
return bAreAllMachiningApplyOk, sErr, bSplitExecuted, bTryToReProcess
end
-------------------------------------------------------------------------------------------------------------
function MachiningLib.ApplyMachining( bRecalc, bApplyPost)
local bResult = EgtApplyMachining( bRecalc, bApplyPost)
return bResult
end