From 7193f2595d033f757ed8601c546de939e04030d4 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Fri, 19 Apr 2024 09:59:59 +0200 Subject: [PATCH] =?UTF-8?q?-=20Per=20valori=20default=20strategia=20si=20l?= =?UTF-8?q?egge=20Config.lua=20e=20non=20pi=C3=B9=20JSON-Strategia=20-=20p?= =?UTF-8?q?iccole=20correzioni=20gestione=20lista=20strategie=20-=20creazi?= =?UTF-8?q?one=20cartelle=20delle=20prime=20due=20strategie=20(vuote,=20so?= =?UTF-8?q?lo=20per=20test)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/BasicCustomerStrategies.lua | 359 +++++++++++++++++++++++++-- LuaLibs/BeamExec.lua | 76 +++--- LuaLibs/FeatureData.lua | 9 +- Process.lua | 9 +- Strategies/STR0001/STR0001.lua | 0 Strategies/STR0001/STR0001Config.lua | 16 ++ Strategies/STR0002/STR0002.lua | 0 Strategies/STR0002/STR0002Config.lua | 0 8 files changed, 395 insertions(+), 74 deletions(-) create mode 100644 Strategies/STR0001/STR0001.lua create mode 100644 Strategies/STR0001/STR0001Config.lua create mode 100644 Strategies/STR0002/STR0002.lua create mode 100644 Strategies/STR0002/STR0002Config.lua diff --git a/LuaLibs/BasicCustomerStrategies.lua b/LuaLibs/BasicCustomerStrategies.lua index cd754ca..b9dd076 100644 --- a/LuaLibs/BasicCustomerStrategies.lua +++ b/LuaLibs/BasicCustomerStrategies.lua @@ -12,6 +12,343 @@ require( 'EgtBase') local BD = require( 'BeamData') local ID = require( 'Identity') + +---------------------------------------------------------------------------------- +-- *** EGALWARE *** +---------------------------------------------------------------------------------- +local function GetStrategies_Egalware( Proc) + local Strategy_Egalware = {} + local Strategies_Egalware = {} + + -- TODO tabella da compleatare man mano che si inseriscono le varie strategie + + -- Feature : Cut + if ID.IsCut( Proc) then + --------------------------------------------------------------------- + -- Feature : Longitudinal Cut + elseif ID.IsLongitudinalCut( Proc) then + --------------------------------------------------------------------- + -- Feature : Double Cut + elseif ID.IsDoubleCut( Proc) then + --------------------------------------------------------------------- + -- Feature : Ridge or Valley Cut + elseif ID.IsDoubleLongitudinalCut( Proc) then + --------------------------------------------------------------------- + -- Feature : Saw Cut + elseif ID.IsSawCut( Proc) then + --------------------------------------------------------------------- + -- Feature : Slot + elseif ID.IsSlot( Proc) then + --------------------------------------------------------------------- + -- Feature : Front Slot + elseif ID.IsFrontSlot( Proc) then + --------------------------------------------------------------------- + -- Feature : Birds Mouth + elseif ID.IsBirdsMouth( Proc) then + --------------------------------------------------------------------- + -- Feature : Hip or Valley Rafter Notch + elseif ID.IsHipValleyRafterNotch( Proc) then + --------------------------------------------------------------------- + -- Feature : Ridge Lap + elseif ID.IsRidgeLap( Proc) then + --------------------------------------------------------------------- + -- Feature : Lap Joint + elseif ID.IsLapJoint( Proc) then + --------------------------------------------------------------------- + -- Feature : Notch/Rabbet + elseif ID.IsNotchRabbet( Proc) then + --------------------------------------------------------------------- + -- Feature : Block Haus + elseif ID.IsBlockHaus( Proc) then + --------------------------------------------------------------------- + -- Feature : Notch + elseif ID.IsNotch( Proc) then + --------------------------------------------------------------------- + -- Feature : French Ridge Lap + elseif ID.IsFrenchRidgeLap( Proc) then + --------------------------------------------------------------------- + -- Feature : Chamfer + elseif ID.IsChamfer( Proc) then + --------------------------------------------------------------------- + -- Feature : Block Haus Half Lap + elseif ID.IsHalfBlockHaus( Proc) then + --------------------------------------------------------------------- + -- Feature : Block Haus Front + elseif ID.IsFrontBlockHaus( Proc) then + --------------------------------------------------------------------- + -- Feature : Pocket + elseif ID.IsPocket( Proc) then + --------------------------------------------------------------------- + -- Feature : Drilling + elseif ID.IsDrilling( Proc) then + --------------------------------------------------------------------- + -- Feature : Tenon + elseif ID.IsTenon( Proc) then + --------------------------------------------------------------------- + -- Feature : Mortise + elseif ID.IsMortise( Proc) then + --------------------------------------------------------------------- + -- Feature : Front Mortise + elseif ID.IsFrontMortise( Proc) then + --------------------------------------------------------------------- + -- Feature : House + elseif ID.IsHouse( Proc) then + --------------------------------------------------------------------- + -- Feature : House Mortise + elseif ID.IsHouseMortise( Proc) then + --------------------------------------------------------------------- + -- Feature : Dovetail Tenon + elseif ID.IsDovetailTenon( Proc) then + --------------------------------------------------------------------- + -- Feature : Dovetail Mortise + elseif ID.IsDovetailMortise( Proc) then + --------------------------------------------------------------------- + -- Feature : Dovetail Mortise Front + elseif ID.IsFrontDovetailMortise( Proc) then + --------------------------------------------------------------------- + -- Feature : Marking + elseif ID.IsMarking( Proc) then + --------------------------------------------------------------------- + -- Feature : Text + elseif ID.IsText( Proc) then + --------------------------------------------------------------------- + -- Feature : Scarf Simple + elseif ID.IsScarfSimple( Proc) then + --------------------------------------------------------------------- + -- Feature : Scarf Joint + elseif ID.IsScarfJoint( Proc) then + --------------------------------------------------------------------- + -- Feature : Step Joint + elseif ID.IsStepJoint( Proc) then + --------------------------------------------------------------------- + -- Feature : Step Joint Notch + elseif ID.IsStepJointNotch( Proc) then + --------------------------------------------------------------------- + -- Feature : Planing + elseif ID.IsPlaning( Proc) then + --------------------------------------------------------------------- + -- Feature : Front Profile + elseif ID.IsFrontProfile( Proc) then + --------------------------------------------------------------------- + -- Feature : Head Concave Profile + elseif ID.IsHeadConcaveProfile( Proc) then + --------------------------------------------------------------------- + -- Feature : Head Convex Profile + elseif ID.IsHeadConvexProfile( Proc) then + --------------------------------------------------------------------- + -- Feature : Head Cambered Profile + elseif ID.IsHeadCamberedProfile( Proc) then + --------------------------------------------------------------------- + -- Feature : Round Arch + elseif ID.IsRoundArch( Proc) then + --------------------------------------------------------------------- + -- Feature : Head Profile + elseif ID.IsHeadProfile( Proc) then + --------------------------------------------------------------------- + -- Feature : Sphere + elseif ID.IsSphere( Proc) then + --------------------------------------------------------------------- + -- Feature : Triangle Cut + elseif ID.IsTriangleCut( Proc) then + --------------------------------------------------------------------- + -- Feature : TyroleanDovetail + elseif ID.IsTyroleanDovetail( Proc) then + --------------------------------------------------------------------- + -- Feature : Dovetail + elseif ID.IsDovetail( Proc) then + --------------------------------------------------------------------- + -- Feature : Free Contour + elseif ID.IsFreeContour( Proc) then + --------------------------------------------------------------------- + -- Feature : Outline + elseif ID.IsOutline( Proc) then + --------------------------------------------------------------------- + -- Feature : Aperture + elseif ID.IsAperture( Proc) then + --------------------------------------------------------------------- + -- Feature : Variant + elseif ID.IsVariant( Proc) then + end + + return Strategies_Egalware +end + +---------------------------------------------------------------------------------- +-- *** ESSETRE *** +---------------------------------------------------------------------------------- +local function GetStrategies_Essetre( Proc) + local Strategy_Essetre = {} + local Strategies_Essetre = {} + + -- TODO tabella da compleatare man mano che si inseriscono le varie strategie + + --------------------------------------------------------------------- + -- Feature : Cut + if ID.IsCut( Proc) then + if Proc.TopologyName == 'FEATURE' then + Strategy_Essetre = { + StrategyID = 'STR0001', + Parameters = { + { + { Value = '15', Name = 'Step', Description = 'Questo è lo step di lavorazione', Type = 'd'}, + { Value = '2', Name = 'Depth', Description = 'Affondamento lavorazione', Type = 'd'}, + { Value = 'false', Name = 'AntiSplint', Description = 'Antischeggia', Type = 'b'} + } + } + } + table.insert( Strategies_Essetre, Strategy_Essetre) + Strategy_Essetre = {} + end + --------------------------------------------------------------------- + -- Feature : Longitudinal Cut + elseif ID.IsLongitudinalCut( Proc) then + --------------------------------------------------------------------- + -- Feature : Double Cut + elseif ID.IsDoubleCut( Proc) then + --------------------------------------------------------------------- + -- Feature : Ridge or Valley Cut + elseif ID.IsDoubleLongitudinalCut( Proc) then + --------------------------------------------------------------------- + -- Feature : Saw Cut + elseif ID.IsSawCut( Proc) then + --------------------------------------------------------------------- + -- Feature : Slot + elseif ID.IsSlot( Proc) then + --------------------------------------------------------------------- + -- Feature : Front Slot + elseif ID.IsFrontSlot( Proc) then + --------------------------------------------------------------------- + -- Feature : Birds Mouth + elseif ID.IsBirdsMouth( Proc) then + --------------------------------------------------------------------- + -- Feature : Hip or Valley Rafter Notch + elseif ID.IsHipValleyRafterNotch( Proc) then + --------------------------------------------------------------------- + -- Feature : Ridge Lap + elseif ID.IsRidgeLap( Proc) then + --------------------------------------------------------------------- + -- Feature : Lap Joint + elseif ID.IsLapJoint( Proc) then + --------------------------------------------------------------------- + -- Feature : Notch/Rabbet + elseif ID.IsNotchRabbet( Proc) then + --------------------------------------------------------------------- + -- Feature : Block Haus + elseif ID.IsBlockHaus( Proc) then + --------------------------------------------------------------------- + -- Feature : Notch + elseif ID.IsNotch( Proc) then + --------------------------------------------------------------------- + -- Feature : French Ridge Lap + elseif ID.IsFrenchRidgeLap( Proc) then + --------------------------------------------------------------------- + -- Feature : Chamfer + elseif ID.IsChamfer( Proc) then + --------------------------------------------------------------------- + -- Feature : Block Haus Half Lap + elseif ID.IsHalfBlockHaus( Proc) then + --------------------------------------------------------------------- + -- Feature : Block Haus Front + elseif ID.IsFrontBlockHaus( Proc) then + --------------------------------------------------------------------- + -- Feature : Pocket + elseif ID.IsPocket( Proc) then + --------------------------------------------------------------------- + -- Feature : Drilling + elseif ID.IsDrilling( Proc) then + --------------------------------------------------------------------- + -- Feature : Tenon + elseif ID.IsTenon( Proc) then + --------------------------------------------------------------------- + -- Feature : Mortise + elseif ID.IsMortise( Proc) then + --------------------------------------------------------------------- + -- Feature : Front Mortise + elseif ID.IsFrontMortise( Proc) then + --------------------------------------------------------------------- + -- Feature : House + elseif ID.IsHouse( Proc) then + --------------------------------------------------------------------- + -- Feature : House Mortise + elseif ID.IsHouseMortise( Proc) then + --------------------------------------------------------------------- + -- Feature : Dovetail Tenon + elseif ID.IsDovetailTenon( Proc) then + --------------------------------------------------------------------- + -- Feature : Dovetail Mortise + elseif ID.IsDovetailMortise( Proc) then + --------------------------------------------------------------------- + -- Feature : Dovetail Mortise Front + elseif ID.IsFrontDovetailMortise( Proc) then + --------------------------------------------------------------------- + -- Feature : Marking + elseif ID.IsMarking( Proc) then + --------------------------------------------------------------------- + -- Feature : Text + elseif ID.IsText( Proc) then + --------------------------------------------------------------------- + -- Feature : Scarf Simple + elseif ID.IsScarfSimple( Proc) then + --------------------------------------------------------------------- + -- Feature : Scarf Joint + elseif ID.IsScarfJoint( Proc) then + --------------------------------------------------------------------- + -- Feature : Step Joint + elseif ID.IsStepJoint( Proc) then + --------------------------------------------------------------------- + -- Feature : Step Joint Notch + elseif ID.IsStepJointNotch( Proc) then + --------------------------------------------------------------------- + -- Feature : Planing + elseif ID.IsPlaning( Proc) then + --------------------------------------------------------------------- + -- Feature : Front Profile + elseif ID.IsFrontProfile( Proc) then + --------------------------------------------------------------------- + -- Feature : Head Concave Profile + elseif ID.IsHeadConcaveProfile( Proc) then + --------------------------------------------------------------------- + -- Feature : Head Convex Profile + elseif ID.IsHeadConvexProfile( Proc) then + --------------------------------------------------------------------- + -- Feature : Head Cambered Profile + elseif ID.IsHeadCamberedProfile( Proc) then + --------------------------------------------------------------------- + -- Feature : Round Arch + elseif ID.IsRoundArch( Proc) then + --------------------------------------------------------------------- + -- Feature : Head Profile + elseif ID.IsHeadProfile( Proc) then + --------------------------------------------------------------------- + -- Feature : Sphere + elseif ID.IsSphere( Proc) then + --------------------------------------------------------------------- + -- Feature : Triangle Cut + elseif ID.IsTriangleCut( Proc) then + --------------------------------------------------------------------- + -- Feature : TyroleanDovetail + elseif ID.IsTyroleanDovetail( Proc) then + --------------------------------------------------------------------- + -- Feature : Dovetail + elseif ID.IsDovetail( Proc) then + --------------------------------------------------------------------- + -- Feature : Free Contour + elseif ID.IsFreeContour( Proc) then + --------------------------------------------------------------------- + -- Feature : Outline + elseif ID.IsOutline( Proc) then + --------------------------------------------------------------------- + -- Feature : Aperture + elseif ID.IsAperture( Proc) then + --------------------------------------------------------------------- + -- Feature : Variant + elseif ID.IsVariant( Proc) then + end + + return Strategies_Essetre +end + + ---------------------------------------------------------------------------------- -- *** Esecuzione *** ---------------------------------------------------------------------------------- @@ -32,28 +369,6 @@ function BasicCustomerStrategies.GetStrategiesFromBasicCustomerStrategies( Proc) return StrategiesFromScript end ----------------------------------------------------------------------------------- --- *** EGALWARE *** ----------------------------------------------------------------------------------- -local function GetStrategies_Egalware( Proc) - local Strategy_Egalware = {} - local Strategies_Egalware = {} - - -- TODO tabella da compleatare man mano che si inseriscono le varie strategie - return Strategies_Egalware -end - ----------------------------------------------------------------------------------- --- *** ESSETRE *** ----------------------------------------------------------------------------------- -local function GetStrategies_Essetre( Proc) - local Strategy_Essetre = {} - local Strategies_Essetre = {} - - -- TODO tabella da compleatare man mano che si inseriscono le varie strategie - return Strategies_Essetre -end - ------------------------------------------------------------------------------------------------------------- return BasicCustomerStrategies \ No newline at end of file diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index b97ff7f..9cb3b01 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -95,6 +95,8 @@ function BeamExec.GetToolsFromDB() -- se verifica condizioni minime, recupero tutti gli altri dati if bToolLoadedOnSetup and sToolType then + -- TODO Tool.AName -> da rimuovere perchè non serve. Per il momento lo manteniamo solo perchè è più facile vedere e interpretare la lista utensili nella watch di zerobrane + -- Nell'utilizzo, si legge sempre il Tool.Name Tool.AName = Tool.Name Tool.TcPos = sToolTCPos Tool.Family = sToolFamily @@ -110,6 +112,7 @@ function BeamExec.GetToolsFromDB() Tool.Feeds.StartFeed = EgtTdbGetCurrToolParam( MCH_TP.STARTFEED) Tool.Feeds.EndFeed = EgtTdbGetCurrToolParam( MCH_TP.ENDFEED) Tool.Feeds.TipFeed = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED) + -- TODO serve funzione in BeamData che data la posizione dell'utensile e della testa, capisca il montaggio (testa sopra - testa sotto - aggregato - ecc...) Tool.Head = EgtTdbGetCurrToolParam( MCH_TP.HEAD) Tool.UUID = EgtTdbGetCurrToolParam( MCH_TP.UUID) Tool.UserNotes = EgtTdbGetCurrToolParam( MCH_TP.USERNOTES) @@ -180,7 +183,6 @@ local function ImportFileJSON( sFileToImport) end local content = readAll( sFileToImport) - return JSON:decode( content) end @@ -190,7 +192,11 @@ function BeamExec.GetStrategiesFromJSONinBD() local sMachDir = EgtGetCurrMachineDir() if BD.STRATEGIES_CONFIG_FILE then local sFile = sMachDir .. '\\Beam\\' .. BD.STRATEGIES_CONFIG_FILE - if not sFile then return end + -- se non esiste file JSON, annullo la lista contenente le strategie + if not EgtExistsFile( sFile) then + STRATEGIES = nil + return + end local FeaturesList = {} FeaturesList = ImportFileJSON( sFile) @@ -396,69 +402,43 @@ end local function GetStrategies( Proc) local AvailableStrategiesForProc = {} -- se la lista STRATEGIES è stata letta da JSON (quindi non è vuota), ritorno le strategie possibili - if STRATEGIES then + if STRATEGIES and #STRATEGIES > 0 then AvailableStrategiesForProc = GetStrategiesFromGlobalList( Proc) -- altrimenti lancio script che setta le strategie in modo statico, come definito con cliente else AvailableStrategiesForProc = BCS.GetStrategiesFromBasicCustomerStrategies( Proc) end - -- TODO se ci sono strategie, posso caricare qui le varie librerie delle strategie + -- TODO se ci sono strategie, posso caricare qui le varie librerie delle strategie. Oppure farlo quando si lanciano return AvailableStrategiesForProc end ------------------------------------------------------------------------------------------------------------- local function GetFeatureForcedStrategy( Proc) - local ForcedStrategiesForProc = {} - local ForcedStrategyForProc = {} - local ForcedParametersForProc = {} - local ForcedParameter = {} + -- cerco nelle note se è stata forzata una strategia specifica local sStrategyID = EgtGetInfo( Proc.Id, 'STRATEGY', 's') + -- se è presente la strategia forzata if sStrategyID then - -- importo JSON della strategia per leggere nomi parametri configurabili - local sJSONFile = BEAM.BASEDIR .. '\\Strategies\\' .. sStrategyID .. '\\' .. sStrategyID .. '.lua' - -- se non trovo file esco - if not sJSONFile then return end + local StrategyData = require( sStrategyID .. '\\' .. sStrategyID .. 'Config.lua') + -- se ID strategia letto in NGE è differente da quello letto nella strategia, esco subito + if StrategyData.StrategyID ~= sStrategyID then return nil end - local JSONStrategy = {} - JSONStrategy = ImportFileJSON( sJSONFile) - - -- cerco tra le feature del JSON strategia - for i = 1, #JSONStrategy.Features do - -- se trovo la feature - if Proc.Prc == JSONStrategy.Features[i].Prc and Proc.Grp == JSONStrategy.Features[i].Grp then - -- cerco tra le topologie - for j = 1, #JSONStrategy.Features[i].Topologies do - -- se trovo la topologia - if Proc.Topology.Name == JSONStrategy.Features[i].Topologies[j].Name then - -- leggo i parametri - for k = 1, #JSONStrategy.Features[i].Topologies[j].Parameters do - local sParameterNameToSearch = sStrategyID .. '_' .. JSONStrategy.Features[i].Topologies[j].Parameters[k].Name - -- leggo i parametri configurabili della strategia sulla Proc - local xValue = EgtGetInfo( Proc.Id, sParameterNameToSearch, JSONStrategy.Features[i].Topologies[j].Parameters[k].Type) - -- salvo in lista il parametro letto se presente, altrimenti prendo quello nel JSON di default. Teoricamernte dovrebbero esserci sempre tutti - if xValue then - ForcedParameter.Value = xValue - else - ForcedParameter.Value = JSONStrategy.Features[i].Topologies[j].Parameters[k].Name - end - ForcedParameter.Name = JSONStrategy.Features[i].Topologies[j].Parameters[k].Name - table.insert( ForcedStrategyForProc, ForcedParameter) - end - end - end + -- cerco e aggiorno i parametri come sono settati nel processing + for i = 1, #StrategyData do + local sParameterToRead = StrategyData.StrategyID .. '_' .. StrategyData.Parameters[i].Name + ForcedParameterForProc = EgtGetInfo( Proc.Id, sParameterToRead, 's') + -- se ho trovato il valore, lo sovrascrivo al default + if ForcedParameterForProc then + StrategyData.Parameters[i].Value = ForcedParameterForProc end end - ForcedStrategyForProc.StrategyID = sStrategyID - ForcedStrategyForProc.Parameters = ForcedParametersForProc - -- per il momento sarà sempre e solo una strategia, ma la inserisco comunque in una lista per analogia con gestione standard - table.insert( ForcedStrategiesForProc, ForcedStrategyForProc) - else - ForcedStrategiesForProc = nil + -- ritorno la lista strategia con parametri + local StrategyToProc = {} + table.insert( StrategyToProc, StrategyData) + return StrategyToProc end - - return ForcedStrategiesForProc + return nil end ------------------------------------------------------------------------------------------------------------- @@ -524,7 +504,7 @@ local function CollectFeatures( PartId, b3Raw) Proc.Strategies = GetStrategies( Proc) end -- se ci sono strategie disponibili, aggiungo a lista delle feature da lavorare - if Proc.Strategies then + if Proc.Strategies and #Proc.Strategies > 0 then table.insert( vProc, Proc) -- altrimenti errore (non ci sono strategie per lavorare la topologia riconosciuta) else diff --git a/LuaLibs/FeatureData.lua b/LuaLibs/FeatureData.lua index 4fb67f6..bb92361 100644 --- a/LuaLibs/FeatureData.lua +++ b/LuaLibs/FeatureData.lua @@ -132,6 +132,11 @@ local function GetFacesWithGivenAdjacencyNumber( Proc, vAdj) if not vAdj then vAdj = GetAdjacencyMatrix( Proc) end local nFct = #( vAdj or {}) local vFacesWithAdj = {} + vFacesWithAdj[1] = {} + vFacesWithAdj[2] = {} + vFacesWithAdj[3] = {} + vFacesWithAdj[4] = {} + vFacesWithAdj[5] = {} for i = 1, nFct do local nAdjCount = 0 for j = 1, nFct do @@ -163,7 +168,7 @@ end -- restituisce una stringa con il nome esteso della topologia della feature -- *famiglia - numero di facce - passante* local function GetTopologyName( sFamily, nNumberOfFaces, bIsThrough) - return sFamily .. '-' .. nNumberOfFaces .. '-' .. EgtIf( bIsThrough, 'Through', 'Blind') + return sFamily .. '-' .. tostring( nNumberOfFaces) .. '-' .. EgtIf( bIsThrough, 'Through', 'Blind') end --------------------------------------------------------------------- -- recupera topologia feature @@ -235,7 +240,7 @@ local function ClassifyTopology( Proc, b3Raw) FeatureTopology.Family = sFamily FeatureTopology.IsThrough = bIsThrough FeatureTopology.AllRightAngles = bAllRightAngles - FeatureTopology.Name = GetTopologyName( sFamily, bIsThrough, bAllRightAngles) + FeatureTopology.Name = GetTopologyName( sFamily, Proc.Fct, bIsThrough) FeatureTopology.vAdj = vAdj -- feature che necessita di essere catalogata, ma non si capisce come else diff --git a/Process.lua b/Process.lua index 3c824bc..19f868e 100644 --- a/Process.lua +++ b/Process.lua @@ -3,14 +3,16 @@ -- Si opera sulla macchina corrente -- 2024/04/02 PRIMA VERSIONE + -- Intestazioni require( 'EgtBase') _ENV = EgtProtectGlobal() EgtEnableDebug( true) --- TODO caricare strategie come librerie -- Imposto direttorio libreria specializzata per Travi EgtAddToPackagePath( BEAM.BASEDIR .. '\\LuaLibs\\?.lua') +-- Imposto direttorio strategie. N.B. Le strategie dovranno essere caricate con il nome del direttorio padre +EgtAddToPackagePath( BEAM.BASEDIR .. '\\Strategies') -- Verifico che la macchina corrente sia abilitata per la lavorazione delle Travi local sMachDir = EgtGetCurrMachineDir() @@ -34,6 +36,10 @@ EgtOutLog( '*** Beam Process Start ***', 1) _G.package.loaded.BeamExec = nil _G.package.loaded.BeamLib = nil _G.package.loaded.BeamData = nil +_G.package.loaded.Identity = nil +_G.package.loaded.BasicCustomerStrategies = nil +_G.package.loaded.FeatureData = nil + local BE = require( 'BeamExec') local BL = require( 'BeamLib') @@ -264,7 +270,6 @@ end -- *** Inserimento delle lavorazioni nelle travi *** ------------------------------------------------------------------------------------------------------------- local function MyProcessFeatures() - local bOk, Stats = BE.ProcessFeatures() local nErrCnt = 0 local nWarnCnt = 0 diff --git a/Strategies/STR0001/STR0001.lua b/Strategies/STR0001/STR0001.lua new file mode 100644 index 0000000..e69de29 diff --git a/Strategies/STR0001/STR0001Config.lua b/Strategies/STR0001/STR0001Config.lua new file mode 100644 index 0000000..27e090f --- /dev/null +++ b/Strategies/STR0001/STR0001Config.lua @@ -0,0 +1,16 @@ +-- Parametri configurabili da cliente per strategia: STR0001 + +local STR0001Data = { + { + StrategyID = 'STR0001', + Parameters = { + { + { Value = '15', Name = 'Step', Description = 'Questo è lo step di lavorazione', Type = 'd'}, + { Value = '2', Name = 'Depth', Description = 'Affondamento lavorazione', Type = 'd'}, + { Value = 'false', Name = 'AntiSplint', Description = 'Antischeggia', Type = 'b'} + } + } + } +} + +return STR0001Data \ No newline at end of file diff --git a/Strategies/STR0002/STR0002.lua b/Strategies/STR0002/STR0002.lua new file mode 100644 index 0000000..e69de29 diff --git a/Strategies/STR0002/STR0002Config.lua b/Strategies/STR0002/STR0002Config.lua new file mode 100644 index 0000000..e69de29