- Nella BasicCustomerStrategies aggiunte funzioni per leggere parametri Q per cliente Essetre
- I parametri delle BasicCustomerStrategies vengono letti all'inizio della Make di ogni strategia dalla BeamLib.LoadCustomParametersInStrategy - Se feature taglio compatibile con taglio testa/coda viene saltato ( controllo nella InfoAndDependency)
This commit is contained in:
@@ -32,6 +32,10 @@ local ID = require( 'Identity')
|
||||
-- end
|
||||
-- end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-- *** STRATEGIE ***
|
||||
----------------------------------------------------------------------------------
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-- *** EGALWARE ***
|
||||
----------------------------------------------------------------------------------
|
||||
@@ -323,6 +327,11 @@ local function GetStrategies_Egalware( Proc)
|
||||
---------------------------------------------------------------------
|
||||
end
|
||||
|
||||
-- si salva che la strategia è stata presa dallo script
|
||||
if #Strategies > 0 then
|
||||
Strategies.bIsBasicStrategy = true
|
||||
end
|
||||
|
||||
return Strategies
|
||||
end
|
||||
|
||||
@@ -335,7 +344,7 @@ local function GetStrategies_Essetre( Proc)
|
||||
---------------------------------------------------------------------
|
||||
-- Feature : Cut (1-340)
|
||||
if ID.IsHeadCut( Proc) then
|
||||
Strategies = { { sStrategyId = 'HEADCUT'}}
|
||||
Strategies = { { sStrategyId = 'HEADCUT'}}
|
||||
---------------------------------------------------------------------
|
||||
-- Feature : Cut (2-350)
|
||||
elseif ID.IsTailCut( Proc) then
|
||||
@@ -343,9 +352,11 @@ local function GetStrategies_Essetre( Proc)
|
||||
---------------------------------------------------------------------
|
||||
-- Feature : Cut (1-10)
|
||||
elseif ID.IsCut( Proc) then
|
||||
Strategies = { { sStrategyId = 'STR0005'}}
|
||||
---------------------------------------------------------------------
|
||||
-- Feature : Longitudinal Cut (0-10)
|
||||
elseif ID.IsLongitudinalCut( Proc) then
|
||||
Strategies = { { sStrategyId = 'STR0005'}}
|
||||
---------------------------------------------------------------------
|
||||
-- Feature : Double Cut (1-11)
|
||||
elseif ID.IsDoubleCut( Proc) then
|
||||
@@ -615,9 +626,41 @@ local function GetStrategies_Essetre( Proc)
|
||||
---------------------------------------------------------------------
|
||||
end
|
||||
|
||||
-- si salva che la strategia è stata presa dallo script
|
||||
if #Strategies > 0 then
|
||||
Strategies.bIsBasicStrategy = true
|
||||
end
|
||||
|
||||
return Strategies
|
||||
end
|
||||
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-- *** PARAMETRI ***
|
||||
----------------------------------------------------------------------------------
|
||||
----------------------------------------------------------------------------------
|
||||
-- *** ESSETRE ***
|
||||
----------------------------------------------------------------------------------
|
||||
-- funzione che recupera i paraemtri custom della strategia. Per cliente Essetre, vengono salvati dei valori 'Q' sul processing del file NGE per modificare il comportamento delle macro
|
||||
local function GetParameters_Essetre( Proc, sStrategyIdToGet)
|
||||
local Parameters = {}
|
||||
|
||||
-- Feature : Cut (1-340)
|
||||
if ID.IsHeadCut( Proc) then
|
||||
-- Per Essetre nion esiste il taglio di testa, quindi si leggono le variabili Q sul processing che coincide con il taglio di testa
|
||||
if sStrategyIdToGet == 'HEADCUT' then
|
||||
local dDepthChamfer = 0
|
||||
-- eventuali informazioni da recuperare sulla feature sostituita
|
||||
if Proc.SubstitutedProc then
|
||||
dDepthChamfer = EgtGetInfo( Proc.SubstitutedProc.id or GDB_ID.NULL, 'Q06', 'd') or 0
|
||||
end
|
||||
Parameters = { { sName = 'dDepthChamfer', sValue = dDepthChamfer, sType = 'd'}}
|
||||
end
|
||||
end
|
||||
|
||||
return Parameters
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-- *** Esecuzione ***
|
||||
----------------------------------------------------------------------------------
|
||||
@@ -636,9 +679,26 @@ function BasicCustomerStrategies.GetStrategiesFromBasicCustomerStrategies( Proc)
|
||||
else
|
||||
StrategiesFromScript = nil
|
||||
end
|
||||
|
||||
return StrategiesFromScript
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
-- lettura parametri che personalizzano le strategie. I parametri di default sono decisi con cliente
|
||||
function BasicCustomerStrategies.GetParametersFromBasicCustomerStrategies( Proc, sStrategyIdToGet)
|
||||
local ParametersFromScript = {}
|
||||
|
||||
-- CLIENTE : ESSETRE
|
||||
if BeamData.STRATEGIES_SCRIPT == 'Essetre' then
|
||||
ParametersFromScript = GetParameters_Essetre( Proc, sStrategyIdToGet)
|
||||
else
|
||||
ParametersFromScript = nil
|
||||
end
|
||||
|
||||
return ParametersFromScript
|
||||
end
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
return BasicCustomerStrategies
|
||||
Reference in New Issue
Block a user