diff --git a/LuaLibs/BasicCustomerStrategies.lua b/LuaLibs/BasicCustomerStrategies.lua index 04569ea..f0a2a80 100644 --- a/LuaLibs/BasicCustomerStrategies.lua +++ b/LuaLibs/BasicCustomerStrategies.lua @@ -44,8 +44,8 @@ local function GetStrategies_Egalware( Proc) Strategies = { { sStrategyId = 'HEADCUT'}} --------------------------------------------------------------------- -- Feature : Cut - elseif ID.IsSplitCut( Proc) then - Strategies = { { sStrategyId = 'SPLITCUT'}} + elseif ID.IsTailCut( Proc) then + Strategies = { { sStrategyId = 'TAILCUT'}} --------------------------------------------------------------------- -- Feature : Cut elseif ID.IsCut( Proc) then @@ -302,8 +302,8 @@ local function GetStrategies_Essetre( Proc) Strategies = { { sStrategyId = 'HEADCUT'}} --------------------------------------------------------------------- -- Feature : Cut - elseif ID.IsSplitCut( Proc) then - Strategies = { { sStrategyId = 'SPLITCUT'}} + elseif ID.IsTailCut( Proc) then + Strategies = { { sStrategyId = 'TAILCUT'}} --------------------------------------------------------------------- -- Feature : Cut elseif ID.IsCut( Proc) then diff --git a/LuaLibs/FeatureLib.lua b/LuaLibs/FeatureLib.lua index 141e6be..7aee02c 100644 --- a/LuaLibs/FeatureLib.lua +++ b/LuaLibs/FeatureLib.lua @@ -22,7 +22,7 @@ function FeatureLib.NeedTopologyFeature( Proc) return true elseif ID.IsHeadCut( Proc) then return true - elseif ID.IsSplitCut( Proc) then + elseif ID.IsTailCut( Proc) then return true elseif ID.IsDoubleCut( Proc) then return true diff --git a/LuaLibs/Identity.lua b/LuaLibs/Identity.lua index e54fb91..e1f600f 100644 --- a/LuaLibs/Identity.lua +++ b/LuaLibs/Identity.lua @@ -13,8 +13,8 @@ function Identity.IsHeadCut( Proc) return ( Proc.nGrp == 1 and Proc.nPrc == 340) end --------------------------------------------------------------------- --- Feature : Split Cut -function Identity.IsSplitCut( Proc) +-- Feature : Tail Cut +function Identity.IsTailCut( Proc) return ( Proc.nGrp == 2 and Proc.nPrc == 350) end diff --git a/LuaLibs/StrategyLib.lua b/LuaLibs/StrategyLib.lua new file mode 100644 index 0000000..5c85449 --- /dev/null +++ b/LuaLibs/StrategyLib.lua @@ -0,0 +1,19 @@ +-- StrategyLib.lua by Egalware s.r.l. 2024/04/02 +-- Libreria di supporto a strategie con funzioni comune a strategie diverse. + +-- Tabella per definizione modulo +local StrategyLib = {} + +-- Include +require( 'EgtBase') + +-- Carico i dati globali +local BeamData = require( 'BeamData') +local BeamLib = require( 'BeamLib') +local FeatureLib = require( 'FeatureLib') + +EgtOutLog( ' StrategyLib started', 1) + + +------------------------------------------------------------------------------------------------------------- +return StrategyLib diff --git a/Process.lua b/Process.lua index 8a9ad60..ab5cfe2 100644 --- a/Process.lua +++ b/Process.lua @@ -42,12 +42,13 @@ _G.package.loaded.BasicCustomerStrategies = nil _G.package.loaded.FeatureLib = nil _G.package.loaded.FaceData = nil _G.package.loaded.MachiningLib = nil +_G.package.loaded.StrategyLib = nil _G.package.loaded.Logs = nil -- strategie di base sempre presenti -_G.package.loaded['SPLITCUT\\SPLITCUT'] = nil -_G.package.loaded['SPLITCUT\\SPLITCUTConfig'] = nil _G.package.loaded['HEADCUT\\HEADCUT'] = nil _G.package.loaded['HEADCUT\\HEADCUTConfig'] = nil +_G.package.loaded['TAILCUT\\TAILCUT'] = nil +_G.package.loaded['TAILCUT\\TAILCUTConfig'] = nil -- TODO controllare se c'รจ un modo migliore per resettare librerie delle strategie caricate precedentemente -- Per ottimizzare potremmo anche ciclare solo fino al numero di strategie raggiunto per il momento. diff --git a/Strategies/Standard/SPLITCUT/SPLITCUT.lua b/Strategies/Standard/TAILCUT/TAILCUT.lua similarity index 98% rename from Strategies/Standard/SPLITCUT/SPLITCUT.lua rename to Strategies/Standard/TAILCUT/TAILCUT.lua index 666363d..3b73a1b 100644 --- a/Strategies/Standard/SPLITCUT/SPLITCUT.lua +++ b/Strategies/Standard/TAILCUT/TAILCUT.lua @@ -1,7 +1,7 @@ --- Strategia: SPLITCUT +-- Strategia: TAILCUT -- Descrizione -- Taglio di separazione --- Feature: SplitCut +-- Feature: TailCut -- carico librerie local BeamLib = require( 'BeamLib') @@ -12,13 +12,13 @@ local FeatureLib = require( 'FeatureLib') local FaceByBlade = require('FACEBYBLADE') -- Tabella per definizione modulo -local SPLITCUT = {} +local TAILCUT = {} local Strategy = {} ------------------------------------------------------------------------------------------------------------- local function LoadStrategyParameters( CustomParameters) local StrategyLib = {} - StrategyLib.Config = require( 'SPLITCUT\\SPLITCUTConfig') + StrategyLib.Config = require( 'TAILCUT\\TAILCUTConfig') Strategy.sName = StrategyLib.Config.sStrategyId CustomParameters = BeamLib.GetUpdateCustomParameters( CustomParameters, StrategyLib.Config.Parameters) Strategy.Parameters = BeamLib.LoadCustomParametersInStrategy( CustomParameters) @@ -245,7 +245,7 @@ local function GetSplitStrategy( Proc, Part) end ------------------------------------------------------------------------------------------------------------- -function SPLITCUT.Make( bAddMachining, Proc, Part, CustomParameters) +function TAILCUT.Make( bAddMachining, Proc, Part, CustomParameters) Strategy = LoadStrategyParameters( CustomParameters) local bAreAllMachiningsAdded = true local Splitting = {} @@ -382,4 +382,4 @@ end ------------------------------------------------------------------------------------------------------------- - return SPLITCUT \ No newline at end of file + return TAILCUT \ No newline at end of file diff --git a/Strategies/Standard/SPLITCUT/SPLITCUTConfig.lua b/Strategies/Standard/TAILCUT/TAILCUTConfig.lua similarity index 83% rename from Strategies/Standard/SPLITCUT/SPLITCUTConfig.lua rename to Strategies/Standard/TAILCUT/TAILCUTConfig.lua index 4f544a7..2336f7f 100644 --- a/Strategies/Standard/SPLITCUT/SPLITCUTConfig.lua +++ b/Strategies/Standard/TAILCUT/TAILCUTConfig.lua @@ -1,7 +1,7 @@ --- Parametri configurabili da cliente per strategia: SPLITCUT +-- Parametri configurabili da cliente per strategia: TAILCUT -local SPLITCUTData = { - sStrategyId = 'SPLITCUT', +local TAILCUTData = { + sStrategyId = 'TAILCUT', Parameters = { { sName = 'bMakeChamfer', sValue = 'false', sDescriptionShort = 'Execute Chamfer', sDescriptionLong = 'Use the V-Mill to execute chamfers on cut-edges', sType = 'b', sMessageId = '', sMinUserLevel = '1'}, { sName = 'bForceChainSaw', sValue = 'false', sDescriptionShort = 'Force to use chain saw', sDescriptionLong = 'Force to use chain saw', sType = 'b', sMessageId = '', sMinUserLevel = '1'}, @@ -9,4 +9,4 @@ local SPLITCUTData = { } } -return SPLITCUTData \ No newline at end of file +return TAILCUTData \ No newline at end of file diff --git a/Strategies/Strategies.ini b/Strategies/Strategies.ini index 673fd9d..23343ee 100644 --- a/Strategies/Strategies.ini +++ b/Strategies/Strategies.ini @@ -139,8 +139,8 @@ STR0003 = Topologia tipo LapJoint. Lama + motosega 252,0,Feature, ; Feature : HEADCUT 340,0,Feature,HEADCUT -; Feature : SPLITCUT -350,0,Feature,SPLITCUT +; Feature : TAILCUT +350,0,Feature,TAILCUT ; Feature : Variant 900,0,Feature, ; Feature Decor