- in BeamExec piccole modifiche a AddFeatureResultToGlobalList e gestito ritorno risultati anche in caso di nessuna feature lavorabile
This commit is contained in:
+14
-4
@@ -1037,12 +1037,18 @@ end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- TODO gestire Proc che non hanno una ChosenStrategy, perchè sono specchiate, multi (si legge il risultato da un'altra feature?) o non è stata trovata una strategia
|
||||
local function AddFeatureResultToGlobalList( Proc, nRotation)
|
||||
local function AddFeatureResultToGlobalList( Proc, OptionalParameters)
|
||||
local sStrategyId
|
||||
local sStatus
|
||||
local nCompletionIndex
|
||||
local dCompositeRating
|
||||
local sInfo
|
||||
|
||||
if not OptionalParameters then
|
||||
OptionalParameters = {}
|
||||
end
|
||||
local nRotation = OptionalParameters.nRotation or 1
|
||||
|
||||
if Proc.nIndexMasterProc then
|
||||
sStrategyId = PROCESSINGS[Proc.nIndexPartInParts].Rotation[Proc.nIndexRotation][Proc.nIndexMasterProc].ChosenStrategy.sStrategyId
|
||||
sStatus = PROCESSINGS[Proc.nIndexPartInParts].Rotation[Proc.nIndexRotation][Proc.nIndexMasterProc].ChosenStrategy.Result.sStatus
|
||||
@@ -1056,6 +1062,7 @@ local function AddFeatureResultToGlobalList( Proc, nRotation)
|
||||
dCompositeRating = Proc.ChosenStrategy.Result.dCompositeRating
|
||||
sInfo = Proc.ChosenStrategy.Result.sInfo
|
||||
end
|
||||
|
||||
RESULT[#RESULT+1] = {
|
||||
sType = 'Feature',
|
||||
id = Proc.id,
|
||||
@@ -1139,8 +1146,7 @@ local function CalculateMachinings( vProc, Part, nInitialRotation)
|
||||
end
|
||||
end
|
||||
-- scrivo risultato in tabella globale
|
||||
-- TODO serve un modo per aggiungere anche le feature non lavorabili (no strategie disponibili); vengono scartate al Collect
|
||||
AddFeatureResultToGlobalList( Proc, nCurrRotation)
|
||||
AddFeatureResultToGlobalList( Proc, { nRotation = nCurrRotation})
|
||||
end
|
||||
|
||||
-- ripristino pezzo in posizione originale
|
||||
@@ -1528,7 +1534,11 @@ function BeamExec.ProcessMachinings( PARTS)
|
||||
MatrixResult.nInitialPosition = 1
|
||||
MACHININGS.Info.nHeadCutRotation = 1
|
||||
MACHININGS.Info.nSplitCutRotation = 1
|
||||
-- sltrimenti si fanno tutti i calcoli
|
||||
-- anche se non ci sono feature da eseguire, bisogna comunque scrivrere i risultati
|
||||
for nProc = 1, #vProc do
|
||||
AddFeatureResultToGlobalList( vProc[nProc])
|
||||
end
|
||||
-- altrimenti si fanno tutti i calcoli
|
||||
else
|
||||
-- ordinamento di base delle feature
|
||||
vProc = OrderFeatures( vProc)
|
||||
|
||||
Reference in New Issue
Block a user