- Corretta chiamata della funzione GetAvailableCombinations
- Piccole correzioni varie
This commit is contained in:
+10
-10
@@ -482,7 +482,7 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, PARTS, b
|
||||
PARTS[i].bSquareSection = abs( PARTS[i].dWidth - PARTS[i].dHeight) < 100 * GEO.EPS_SMALL
|
||||
PARTS[i].b3Part = EgtGetBBoxGlob( EgtGetFirstNameInGroup( PARTS[i].id, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
PARTS[i].nIndexInParts = i
|
||||
PARTS[i].CombinationList = GetAvailableCombinations( PARTS[i])
|
||||
PARTS[i].CombinationList = BeamExec.GetAvailableCombinations( PARTS[i])
|
||||
PARTS[i].SplittingPoints = BeamLib.GetPartSplittingPoints( PARTS[i])
|
||||
else
|
||||
local sOut = 'Error: part L(' .. EgtNumToString( dPartLen, 1) .. ') too big for raw part L(' .. EgtNumToString( dLen - 0.1, 1) .. ')'
|
||||
@@ -1078,9 +1078,12 @@ local function AddFeatureResultToGlobalList( Proc, OptionalParameters)
|
||||
nCompletionIndex = nCompletionIndex,
|
||||
dCompositeRating = dCompositeRating,
|
||||
sInfo = sInfo
|
||||
},
|
||||
AvailableStrategies = BeamLib.TableCopyDeep( Proc.AvailableStrategies)
|
||||
}
|
||||
}
|
||||
-- scrivo le strategie disponibili solo se ne esistono
|
||||
if Proc.AvailableStrategies then
|
||||
RESULT[#RESULT].AvailableStrategies = BeamLib.TableCopyDeep( Proc.AvailableStrategies)
|
||||
end
|
||||
|
||||
return RESULT
|
||||
end
|
||||
@@ -1133,16 +1136,13 @@ local function CalculateMachinings( vProc, Part, nInitialRotation)
|
||||
local StrategyScript = require( StrategyScriptName)
|
||||
-- eseguo la strategia e si applicano le lavorazioni. Si passa la Proc e i parametri personalizzati
|
||||
_, _ = StrategyScript.Make( true, Proc, Part, Proc.ChosenStrategy)
|
||||
-- se tutte le strategie disponibili non sono applicabili
|
||||
else
|
||||
-- se non esiste una strategia scelta (non dovrebbe mai succedere) cancello da lista generale
|
||||
PROCESSINGS[Proc.nIndexPartInParts].Rotation[Proc.nIndexRotation][Proc.nIndexInVProc].ChosenStrategy = nil
|
||||
-- se taglio testa o coda, per il momento dico che è ok. Poi serve messaggio apposito
|
||||
if ID.IsHeadCut( Proc) or ID.IsTailCut( Proc) then
|
||||
-- TODO dare messaggio separazione impossibile
|
||||
else
|
||||
error( 'UNEXPECTED ERROR: Standard feature MUST HAVE ChosenStrategy')
|
||||
bAreAllApplyOk = false
|
||||
end
|
||||
|
||||
-- TODO dare messaggio che la feature non 0è stata eseguita nonostante la presenza di strategie disponibili
|
||||
|
||||
end
|
||||
end
|
||||
-- scrivo risultato in tabella globale
|
||||
|
||||
@@ -572,6 +572,10 @@ end
|
||||
--- copia una tabella lua in modo ricorsivo, ossia mantiene indipendenti anche tutte le sottotabelle
|
||||
--- ATTENZIONE: in caso di modifiche vanno gestiti anche i tipi custom; sarebbe meglio metterla nel LuaLibs
|
||||
function BeamLib.TableCopyDeep( OriginalTable)
|
||||
-- controllo se oggetto passato è valido, altrimenti errore. Non deve mai succedere
|
||||
if not OriginalTable then
|
||||
error( "TableCopyDeep : can't copy nil object")
|
||||
end
|
||||
local CopiedTable = {}
|
||||
for key, value in pairs( OriginalTable) do
|
||||
if type( value) == "table" then
|
||||
|
||||
Reference in New Issue
Block a user