diff --git a/FlipRot.lua b/FlipRot.lua index ff24e16..f8e670a 100644 --- a/FlipRot.lua +++ b/FlipRot.lua @@ -188,7 +188,9 @@ local function MyProcessFeatures() end -- si calcolano alternative + TIMER:startElapsed('Alternatives') BeamExec.ProcessAlternatives( PARTS) + TIMER:stopElapsed('Alternatives') -- cancello gruppo temporaneo local idTempGroup = BeamLib.GetTempGroup() diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index 6cae827..da8fe19 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -1923,8 +1923,6 @@ end ------------------------------------------------------------------------------------------------------------- function BeamExec.ProcessAlternatives( PARTS) -- ciclo sui pezzi - local nTotErr = 0 - local Stats = {} local BestCombination = {} local nPart = 1 local nOrd = 1 @@ -1932,13 +1930,10 @@ function BeamExec.ProcessAlternatives( PARTS) local bTryToReProcess = false -- se non serve trovare altre soluzioni, si esce subito - if not PARTS[nPart].GeneralParameters.GEN_bTestAlternative or not PARTS[nPart].GeneralParameters.GEN_bGetAlternativesNesting2D then + if not ( PARTS[nPart].GeneralParameters.GEN_bTestAlternative and not PARTS[nPart].bSquareSection) or not PARTS[nPart].GeneralParameters.GEN_bGetAlternativesNesting2D then return end - -- si analizzano le alternative solo del primo pezzo (la FlipRot viene chiamata sempre con un solo pezzo) - local nCycles = 1 - -- si copia il MachGroup originale local nOriginalMachGroup = EgtGetCurrMachGroup() local sMachGroupName = EgtGetMachGroupName( nOriginalMachGroup) @@ -2015,12 +2010,12 @@ function BeamExec.ProcessAlternatives( PARTS) -- fino a che ci sono soluzioni da testare for z = 1, #TotalCombiToTest do - -- si svuota il machgroup e si resettano le variabili EgtRemoveAllOperations() MACHININGS = {} MACHININGS.Info = {} nOrd = 1 + local nCycles = 1 local bCombinationFound = true -- la parte di applicazione lavorazioni può essere lanciata più volte in caso della presenza di errori diff --git a/Strategies/GeneralParameters.json b/Strategies/GeneralParameters.json index 8e24c17..8e918ce 100644 --- a/Strategies/GeneralParameters.json +++ b/Strategies/GeneralParameters.json @@ -34,7 +34,7 @@ "nGroup": "PIECE LOADING", "sName": "GEN_bAllowPieceInversion", "sNameNge": "ADMIT_INVERSION", - "sValue": "true", + "sValue": "false", "sDescriptionShort": "Allow piece inversion", "sDescriptionLong": "", "sType": "b", @@ -45,7 +45,7 @@ "nGroup": "PIECE LOADING", "sName": "GEN_bTestAlternative", "sNameNge": "TEST_ALTERNATIVE", - "sValue": "true", + "sValue": "false", "sDescriptionShort": "Enable the possibility to load the piece 90° turned", "sDescriptionLong": "", "sType": "b", @@ -56,7 +56,7 @@ "nGroup": "PIECE LOADING", "sName": "GEN_bGetAlternativesNesting2D", "sNameNge": "GET_ALTERNATIVES_NEST2D", - "sValue": "true", + "sValue": "false", "sDescriptionShort": "Enable material optimization function in nesting", "sDescriptionLong": "", "sType": "b",