From 5f06b160b93a5ad1d7172e03fae79be26c2bb222 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Thu, 3 Jul 2025 15:35:00 +0200 Subject: [PATCH] - BasicCustomerStrategies Egalware sono lette ora da JSON. Quelle Essetre restano nel lua. - Corretta formattazione AvailableStrategyList.json --- LuaLibs/BasicCustomerStrategies.lua | 330 ++-------------------- LuaLibs/BeamExec.lua | 68 ++--- LuaLibs/BeamLib.lua | 63 ++++- Strategies/AvailableStrategyList.json | 376 +++++++++++++------------- 4 files changed, 274 insertions(+), 563 deletions(-) diff --git a/LuaLibs/BasicCustomerStrategies.lua b/LuaLibs/BasicCustomerStrategies.lua index 3c87680..897ec82 100644 --- a/LuaLibs/BasicCustomerStrategies.lua +++ b/LuaLibs/BasicCustomerStrategies.lua @@ -10,6 +10,7 @@ require( 'EgtBase') -- Carico i dati globali local BeamData = require( 'BeamData') +local BeamLib = require( 'BeamLib') local ID = require( 'Identity') @@ -42,318 +43,19 @@ local ID = require( 'Identity') local function GetStrategies_Egalware( Proc) local Strategies = {} - --------------------------------------------------------------------- - -- Feature : Cut (1-340) - if ID.IsHeadCut( Proc) then - Strategies = { { sStrategyId = 'HEADCUT'}} - --------------------------------------------------------------------- - -- Feature : Cut (2-350) - elseif ID.IsTailCut( Proc) then - Strategies = { { sStrategyId = 'TAILCUT'}} - --------------------------------------------------------------------- - -- Feature : Cut (1-10) - elseif ID.IsCut( Proc) then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0005'}} - --------------------------------------------------------------------- - -- Feature : Longitudinal Cut (0-10) - elseif ID.IsLongitudinalCut( Proc) then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0005'}, { sStrategyId = 'STR0010'}} - --------------------------------------------------------------------- - -- Feature : Double Cut (1-11) - elseif ID.IsDoubleCut( Proc) then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0005'}, { sStrategyId = 'STR0010'}} - --------------------------------------------------------------------- - -- Feature : Ridge or Valley Cut (0-12) - elseif ID.IsDoubleLongitudinalCut( Proc) then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0005'}, { sStrategyId = 'STR0010'}} - --------------------------------------------------------------------- - -- Feature : Saw Cut (0-13) - elseif ID.IsSawCut( Proc) then - --------------------------------------------------------------------- - -- Feature : Slot (0-16) - elseif ID.IsSlot( Proc) then - if Proc.Topology.sName == 'Pocket-5-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-4-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Tunnel-4-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Bevel-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Rabbet-2-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0010'}} + local sFile = BEAM.BASEDIR .. '\\Strategies\\AvailableStrategyList.json' + -- se non esiste file JSON, annullo la lista contenente le strategie + if not EgtExistsFile( sFile) then + return nil end - --------------------------------------------------------------------- - -- Feature : Front Slot (0-17) - elseif ID.IsFrontSlot( Proc) then - if Proc.Topology.sName == 'Pocket-5-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-4-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Tunnel-4-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Bevel-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Rabbet-2-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0010'}} - end - --------------------------------------------------------------------- - -- Feature : Birds Mouth (0-20) - elseif ID.IsBirdsMouth( Proc) then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0010'}} - --------------------------------------------------------------------- - -- Feature : Hip or Valley Rafter Notch (0-25) - elseif ID.IsHipValleyRafterNotch( Proc) then - --------------------------------------------------------------------- - -- Feature : Ridge Lap (1-30) - elseif ID.IsRidgeLap( Proc) then - if Proc.Topology.sName == 'RidgeLap-3-Through' then - Strategies = { { sStrategyId = 'STR0012'}} - elseif Proc.Topology.sName == 'Groove-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Bevel-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Rabbet-2-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0010'}} - elseif Proc.Topology.sName == 'Cut-1-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0005'}} - end - --------------------------------------------------------------------- - -- Feature : Lap Joint (0-30) - elseif ID.IsLapJoint( Proc) then - if Proc.Topology.sName == 'Pocket-5-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-4-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Tunnel-4-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Bevel-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Rabbet-2-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0010'}} - end - --------------------------------------------------------------------- - -- Feature : Notch/Rabbet (0-32) - elseif ID.IsNotchRabbet( Proc) then - if Proc.Topology.sName == 'Pocket-5-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-4-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Tunnel-4-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Bevel-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Rabbet-2-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0010'}} - end - --------------------------------------------------------------------- - -- Feature : Block Haus (0-33) - elseif ID.IsBlockHaus( Proc) then - if Proc.Topology.sName == 'Groove-3-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - end - --------------------------------------------------------------------- - -- Feature : Notch (0-34) - elseif ID.IsNotch( Proc) then - if Proc.Topology.sName == 'Pocket-5-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-4-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Tunnel-4-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Bevel-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Rabbet-2-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0010'}} - end - --------------------------------------------------------------------- - -- Feature : French Ridge Lap (1-35) - elseif ID.IsFrenchRidgeLap( Proc) then - --------------------------------------------------------------------- - -- Feature : Chamfer (0-36) - elseif ID.IsChamfer( Proc) then - --------------------------------------------------------------------- - -- Feature : Block Haus Half Lap (0-37) - elseif ID.IsHalfBlockHaus( Proc) then - --------------------------------------------------------------------- - -- Feature : Block Haus Front (0-38) - elseif ID.IsFrontBlockHaus( Proc) then - --------------------------------------------------------------------- - -- Feature : Pocket (0-39) - elseif ID.IsPocket( Proc) then - if Proc.Topology.sName == 'Pocket-5-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-4-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Tunnel-4-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Bevel-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Rabbet-2-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0010'}} - end - --------------------------------------------------------------------- - -- Feature : Drilling (0-40) - elseif ID.IsDrilling( Proc) then - Strategies = { { sStrategyId = 'STR0011'}} - --------------------------------------------------------------------- - -- Feature : Tenon (1-50) - elseif ID.IsTenon( Proc) then - Strategies = { { sStrategyId = 'STR0006'}} - --------------------------------------------------------------------- - -- Feature : Mortise (0-50) - elseif ID.IsMortise( Proc) then - if Proc.Topology.sName == 'Pocket-5-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-4-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Tunnel-4-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Bevel-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Rabbet-2-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0010'}} - elseif Proc.Topology.sName == 'Pocket-Round' or Proc.Topology.sName == 'Pocket-Round-Front' or Proc.Topology.sName == 'Pocket-Round-Through' then - Strategies = { { sStrategyId = 'STR0008'}} - end - --------------------------------------------------------------------- - -- Feature : Front Mortise (0-51) - elseif ID.IsFrontMortise( Proc) then - if Proc.Topology.sName == 'Pocket-5-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-4-Blind' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Tunnel-4-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0003'}, { sStrategyId = 'STR0004'}} - elseif Proc.Topology.sName == 'Groove-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Bevel-3-Blind' then - Strategies = { { sStrategyId = 'STR0002'}} - elseif Proc.Topology.sName == 'Rabbet-2-Through' then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0010'}} - elseif Proc.Topology.sName == 'Pocket-Round' or Proc.Topology.sName == 'Pocket-Round-Front' or Proc.Topology.sName == 'Pocket-Round-Through' then - Strategies = { { sStrategyId = 'STR0008'}} - end - --------------------------------------------------------------------- - -- Feature : House (1-52) - elseif ID.IsHouse( Proc) then - --------------------------------------------------------------------- - -- Feature : House Mortise (0-53) - elseif ID.IsHouseMortise( Proc) then - --------------------------------------------------------------------- - -- Feature : Dovetail Tenon (1-55) - elseif ID.IsDovetailTenon( Proc) then - Strategies = { { sStrategyId = 'STR0001'}} - --------------------------------------------------------------------- - -- Feature : Dovetail Mortise (0-55) - elseif ID.IsDovetailMortise( Proc) then - Strategies = { { sStrategyId = 'STR0007'}} - --------------------------------------------------------------------- - -- Feature : Dovetail Mortise Front (0-56) - elseif ID.IsFrontDovetailMortise( Proc) then - Strategies = { { sStrategyId = 'STR0007'}} - --------------------------------------------------------------------- - -- Feature : Marking (0-60) - elseif ID.IsMarking( Proc) then - --------------------------------------------------------------------- - -- Feature : Text (0-61) - elseif ID.IsText( Proc) then - --------------------------------------------------------------------- - -- Feature : Scarf Simple (1-70) - elseif ID.IsScarfSimple( Proc) then - --------------------------------------------------------------------- - -- Feature : Scarf Joint (1-71) - elseif ID.IsScarfJoint( Proc) then - --------------------------------------------------------------------- - -- Feature : Step Joint (1-80) - elseif ID.IsStepJoint( Proc) then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0010'}} - --------------------------------------------------------------------- - -- Feature : Step Joint Notch (0-80) - elseif ID.IsStepJointNotch( Proc) then - Strategies = { { sStrategyId = 'STR0002'}, { sStrategyId = 'STR0010'}} - --------------------------------------------------------------------- - -- Feature : Planing (0-90) - elseif ID.IsPlaning( Proc) then - --------------------------------------------------------------------- - -- Feature : Front Profile (0-100) - elseif ID.IsFrontProfile( Proc) then - --------------------------------------------------------------------- - -- Feature : Head Concave Profile (0-101) - elseif ID.IsHeadConcaveProfile( Proc) then - --------------------------------------------------------------------- - -- Feature : Head Convex Profile (0-102) - elseif ID.IsHeadConvexProfile( Proc) then - Strategies = { { sStrategyId = 'STR0009'}} - --------------------------------------------------------------------- - -- Feature : Head Cambered Profile (0-103) - elseif ID.IsHeadCamberedProfile( Proc) then - --------------------------------------------------------------------- - -- Feature : Round Arch (0-104) - elseif ID.IsRoundArch( Proc) then - Strategies = { { sStrategyId = 'STR0009'}} - --------------------------------------------------------------------- - -- Feature : Head Profile (0-106) - elseif ID.IsHeadProfile( Proc) then - --------------------------------------------------------------------- - -- Feature : Sphere (0-107) - elseif ID.IsSphere( Proc) then - --------------------------------------------------------------------- - -- Feature : Triangle Cut (0-120) - elseif ID.IsTriangleCut( Proc) then - --------------------------------------------------------------------- - -- Feature : TyroleanDovetail (0-136) - elseif ID.IsTyroleanDovetail( Proc) then - --------------------------------------------------------------------- - -- Feature : Dovetail (0-138) - elseif ID.IsDovetail( Proc) then - --------------------------------------------------------------------- - -- Feature : Free Contour (0-250) - elseif ID.IsFreeContour( Proc) then - --------------------------------------------------------------------- - -- Feature : Outline (0-251) - elseif ID.IsOutline( Proc) then - --------------------------------------------------------------------- - -- Feature : Aperture (0-252) - elseif ID.IsAperture( Proc) then - --------------------------------------------------------------------- - -- Feature : Variant (0-900) - elseif ID.IsVariant( Proc) then - --------------------------------------------------------------------- - end - -- si salva che la strategia è stata presa dallo script - if #Strategies > 0 then + local CompleteList = {} + CompleteList.FeatureList = BeamLib.ImportFileJSON( sFile) + + Strategies = BeamLib.GetStrategiesFromList( Proc, CompleteList) + + -- si salva che la strategia è stata presa dallo standard + if Strategies and #Strategies > 0 then Strategies.bIsBasicStrategy = true end @@ -721,12 +423,12 @@ end function BasicCustomerStrategies.GetStrategiesFromBasicCustomerStrategies( Proc) local StrategiesFromScript = {} - -- se nessuno script specifico in BeamData, si carica standard di default EGALWARE - if not BeamData.STRATEGIES_SCRIPT or BeamData.STRATEGIES_SCRIPT == 'Egalware' then - StrategiesFromScript = GetStrategies_Egalware( Proc) -- CLIENTE : ESSETRE - elseif BeamData.STRATEGIES_SCRIPT == 'Essetre' then + if BeamData.STRATEGIES_SCRIPT == 'Essetre' then StrategiesFromScript = GetStrategies_Essetre( Proc) + -- se nessuno script specifico in BeamData, si carica standard di default EGALWARE + elseif not BeamData.STRATEGIES_SCRIPT or BeamData.STRATEGIES_SCRIPT == 'Egalware' then + StrategiesFromScript = GetStrategies_Egalware( Proc) else StrategiesFromScript = nil end diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index 47c72ca..425bcd5 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -210,21 +210,6 @@ function BeamExec.GetToolsFromDB() end end -------------------------------------------------------------------------------------------------------------- -local function ImportFileJSON( sFileToImport) - local JSON = require( 'JSON') - - local function readAll( sFileToImport) - local f = io.open( sFileToImport, "rb") - local content = f:read( "*all") - f:close() - return content - end - - local content = readAll( sFileToImport) - return JSON:decode( content) -end - ------------------------------------------------------------------------------------------------------------- function BeamExec.GetStrategiesFromJSONinBD() -- si legge il JSON contenente la configurazione da utilizzare (nome del file salvato nel BeamData) @@ -238,7 +223,7 @@ function BeamExec.GetStrategiesFromJSONinBD() end local FeatureList = {} - FeatureList = ImportFileJSON( sFile) + FeatureList = BeamLib.ImportFileJSON( sFile) -- metto la tabella letta nella lista globale STRATEGIES STRATEGIES = {} @@ -546,49 +531,28 @@ end -- *** Inserimento delle lavorazioni nelle travi *** ------------------------------------------------------------------------------------------------------------- -local function GetStrategiesFromGlobalList( Proc) - -- cerco tra le feature - for i = 1, #STRATEGIES.FeatureList do - -- se trovo la feature - if Proc.nPrc == STRATEGIES.FeatureList[i].nPrc then - local bGroupIsCompatible = false - -- nel JSON il gruppo è sempre 0/1, mente da BTL possono arrivare altri valori. - if STRATEGIES.FeatureList[i].nGrp == 0 then - if Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4 then - bGroupIsCompatible = true - end - elseif STRATEGIES.FeatureList[i].nGrp == 1 then - if Proc.nGrp == 1 or Proc.nGrp == 2 then - bGroupIsCompatible = true - end - end - - -- si controlla gruppo - if bGroupIsCompatible then - -- cerco tra le topologie - for j = 1, #STRATEGIES.FeatureList[i].TopologyList do - -- se trovo la topologia - if Proc.Topology.sName == STRATEGIES.FeatureList[i].TopologyList[j].sName then - -- ritorno le strategie disponibili per la feature che sto analizzando - return BeamLib.TableCopyDeep( STRATEGIES.FeatureList[i].TopologyList[j].StrategyList) - end - end - end - end - end - return nil -end - ------------------------------------------------------------------------------------------------------------- local function GetStrategies( Proc) local AvailableStrategiesForProc = nil -- se la lista STRATEGIES è stata letta da JSON (quindi non è vuota), ritorno le strategie possibili if STRATEGIES and #STRATEGIES.FeatureList > 0 then - AvailableStrategiesForProc = GetStrategiesFromGlobalList( Proc) + AvailableStrategiesForProc = BeamLib.GetStrategiesFromList( Proc, STRATEGIES) end -- se non ho trovato strategie disponibili nel JSON, o se JSON non presente, lancio script che setta le strategie in modo statico, come definito con cliente if not AvailableStrategiesForProc then AvailableStrategiesForProc = BCS.GetStrategiesFromBasicCustomerStrategies( Proc) + -- se ci sono strategie disponibili, si recuperano eventuali parametri custom + if AvailableStrategiesForProc then + for i = 1, #AvailableStrategiesForProc do + -- se le strategie disponibili sono le basic, non si possono customizzare valori di default da interfaccia, si leggono allora eventuali parametri di default decisi con cliente + if AvailableStrategiesForProc.bIsBasicStrategy then + -- essendo una strategia basic, la lista dei parametri custom dovrebbe essere sempre vuota. Si leggono ora + if not AvailableStrategiesForProc[i].ParameterList then + AvailableStrategiesForProc[i].ParameterList = BCS.GetParametersFromBasicCustomerStrategies( Proc, AvailableStrategiesForProc[i].sStrategyId) + end + end + end + end end return AvailableStrategiesForProc end @@ -855,9 +819,9 @@ local function RunStrategyLibraries( sStrategyId) -- se config strategia non ancora caricato, importo il JSON if not STRATEGIES_CONFIG[sStrategyId] then if EgtExistsFile( StrategyConfigPathStandard) then - STRATEGIES_CONFIG[sStrategyId] = ImportFileJSON( StrategyConfigPathStandard) + STRATEGIES_CONFIG[sStrategyId] = BeamLib.ImportFileJSON( StrategyConfigPathStandard) else - STRATEGIES_CONFIG[sStrategyId] = ImportFileJSON( StrategyConfigPathSpecial) + STRATEGIES_CONFIG[sStrategyId] = BeamLib.ImportFileJSON( StrategyConfigPathSpecial) end end StrategyLib.Config = STRATEGIES_CONFIG[sStrategyId] diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index 76a6fc9..b34bc2e 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -9,7 +9,6 @@ local BeamLib = {} -- Include require( 'EgtBase') local BeamData = require( 'BeamData') -local BCS = require( 'BasicCustomerStrategies') EgtOutLog( ' BeamLib started', 1) @@ -429,14 +428,6 @@ function BeamLib.LoadCustomParametersInStrategy( Proc, CustomParameters, Default local UpdatedParameters = {} -- TODO serve controllare se campo 'sStrategyId' congruente tra il Config (DefaultStrategyParamList) e i parametri custom (CustomParameters)? if DefaultStrategyParamList and DefaultStrategyParamList.ParameterList and #DefaultStrategyParamList.ParameterList > 0 then - -- se le strategie disponibili sono le basic, non si possono customizzare valori di default da interfaccia, si leggono allora eventuali parametri di default decisi con cliente - if Proc.AvailableStrategies.bIsBasicStrategy then - -- essendo una strategia basic, la lista dei parametri custom dovrebbe essere sempre vuota. Si leggono ora - if not CustomParameters.ParameterList then - CustomParameters.ParameterList = BCS.GetParametersFromBasicCustomerStrategies( Proc, CustomParameters.sStrategyId) - end - end - -- lettura e settaggio parametri finali per la strategia (customizzati o default) for i=1, #DefaultStrategyParamList.ParameterList do local xParameterValue = nil @@ -672,6 +663,59 @@ function BeamLib.PutStartNearestToEdge( nCrvId, b3Raw, dMaxDist, nNearSide) return true end +------------------------------------------------------------------------------------------------------------- +function BeamLib.ImportFileJSON( sFileToImport) + local JSON = require( 'JSON') + + local function readAll( sFileToImport) + local f = io.open( sFileToImport, "rb") + local content = f:read( "*all") + f:close() + return content + end + + local content = readAll( sFileToImport) + return JSON:decode( content) +end + +------------------------------------------------------------------------------------------------------------- +function BeamLib.GetStrategiesFromList( Proc, StrategyList) + -- cerco tra le feature + for i = 1, #StrategyList.FeatureList do + -- se trovo la feature + if Proc.nPrc == StrategyList.FeatureList[i].nPrc then + local bGroupIsCompatible = false + -- nel JSON il gruppo è sempre 0/1, mente da BTL possono arrivare altri valori. + if StrategyList.FeatureList[i].nGrp == 0 then + if Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4 then + bGroupIsCompatible = true + end + elseif StrategyList.FeatureList[i].nGrp == 1 then + if Proc.nGrp == 1 or Proc.nGrp == 2 then + bGroupIsCompatible = true + end + end + + -- si controlla gruppo + if bGroupIsCompatible then + if #StrategyList.FeatureList[i].TopologyList == 1 and StrategyList.FeatureList[i].TopologyList[1].sName == 'Feature' then + return BeamLib.TableCopyDeep( StrategyList.FeatureList[i].TopologyList[1].StrategyList) + else + -- cerco tra le topologie + for j = 1, #StrategyList.FeatureList[i].TopologyList do + -- se trovo la topologia + if Proc.Topology.sName == StrategyList.FeatureList[i].TopologyList[j].sName then + -- ritorno le strategie disponibili per la feature che sto analizzando + return BeamLib.TableCopyDeep( StrategyList.FeatureList[i].TopologyList[j].StrategyList) + end + end + end + end + end + end + return nil +end + --------------------------------------------------------------------- -- Merge sorting - algoritmo di sorting stabile, ossia che mantiene l'ordine relativo se gli elementi sono equivalenti -- TODO vedere come riordinare (tutto in tabella MergeSort??) @@ -724,5 +768,6 @@ do end end + ------------------------------------------------------------------------------------------------------------- return BeamLib diff --git a/Strategies/AvailableStrategyList.json b/Strategies/AvailableStrategyList.json index 772f247..97b4d1d 100644 --- a/Strategies/AvailableStrategyList.json +++ b/Strategies/AvailableStrategyList.json @@ -1,49 +1,49 @@ - + [ { "sName":"Cut", - "nPrc": "10", - "nGrp": "1", + "nPrc": 10, + "nGrp": 1, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0005" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0005" } ] } ] }, { "sName":"Longitudinal Cut", - "nPrc": "10", - "nGrp": "0", + "nPrc": 10, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0005" }, { "sStrategyID": "STR0010" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0005" }, { "sStrategyId": "STR0010" } ] } ] }, { "sName":"Double Cut", - "nPrc": "11", - "nGrp": "1", + "nPrc": 11, + "nGrp": 1, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0005" }, { "sStrategyID": "STR0010" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0005" }, { "sStrategyId": "STR0010" } ] } ] }, { "sName":"Ridge or Valley Cut", - "nPrc": "12", - "nGrp": "0", + "nPrc": 12, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0005" }, { "sStrategyID": "STR0010" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0005" }, { "sStrategyId": "STR0010" } ] } ] }, { "sName":"Saw Cut", - "nPrc": "13", - "nGrp": "0", + "nPrc": 13, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -52,74 +52,74 @@ }, { "sName":"Slot", - "nPrc": "16", - "nGrp": "0", + "nPrc": 16, + "nGrp": 0, "TopologyList" : [ { "sName": "Pocket-5-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-4-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Tunnel-4-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Bevel-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Rabbet-2-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyId": "STR0010"} ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0010"} ] } ] }, { "sName":"Front Slot", - "nPrc": "17", - "nGrp": "0", + "nPrc": 17, + "nGrp": 0, "TopologyList" : [ { "sName": "Pocket-5-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-4-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Tunnel-4-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Bevel-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Rabbet-2-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyId": "STR0010"} ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0010"} ] } ] }, { "sName":"Birds Mouth", - "nPrc": "20", - "nGrp": "0", + "nPrc": 20, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyId": "STR0010"} ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0010"} ] } ] }, { "sName":"Hip or Valley Rafter Notch", - "nPrc": "25", - "nGrp": "0", + "nPrc": 25, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -128,124 +128,124 @@ }, { "sName":"Ridge Lap", - "nPrc": "30", - "nGrp": "1", + "nPrc": 30, + "nGrp": 1, "TopologyList" : [ { "sName": "RidgeLap-3-Through", "StrategyList" : [ { "sStrategyId": "STR0012"} ] }, { "sName": "Groove-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Bevel-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Rabbet-2-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyId": "STR0010"} ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0010"} ] }, { "sName": "Cut-1-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0005" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0005" } ] } ] }, { "sName":"Lap Joint", - "nPrc": "30", - "nGrp": "0", + "nPrc": 30, + "nGrp": 0, "TopologyList" : [ { "sName": "Pocket-5-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-4-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Tunnel-4-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Bevel-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Rabbet-2-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyId": "STR0010"} ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0010"} ] } ] }, { "sName":"Notch/Rabbet", - "nPrc": "32", - "nGrp": "0", + "nPrc": 32, + "nGrp": 0, "TopologyList" : [ { "sName": "Pocket-5-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-4-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Tunnel-4-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Bevel-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Rabbet-2-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyId": "STR0010"} ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0010"} ] } ] }, { "sName":"Block Haus", - "nPrc": "33", - "nGrp": "0", + "nPrc": 33, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] } ] }, { "sName":"Notch", - "nPrc": "34", - "nGrp": "0", + "nPrc": 34, + "nGrp": 0, "TopologyList" : [ { "sName": "Pocket-5-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-4-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Tunnel-4-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Bevel-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Rabbet-2-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyId": "STR0010"} ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0010"} ] } ] }, { "sName":"French Ridge Lap", - "nPrc": "35", - "nGrp": "1", + "nPrc": 35, + "nGrp": 1, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -254,8 +254,8 @@ }, { "sName":"Chamfer", - "nPrc": "36", - "nGrp": "0", + "nPrc": 36, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -264,8 +264,8 @@ }, { "sName":"Block Haus Half Lap", - "nPrc": "37", - "nGrp": "0", + "nPrc": 37, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -274,8 +274,8 @@ }, { "sName":"Block Haus Front", - "nPrc": "38", - "nGrp": "0", + "nPrc": 38, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -284,130 +284,130 @@ }, { "sName":"Pocket", - "nPrc": "39", - "nGrp": "0", + "nPrc": 39, + "nGrp": 0, "TopologyList" : [ { "sName": "Pocket-5-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-4-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Tunnel-4-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Bevel-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Rabbet-2-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyId": "STR0010"} ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0010"} ] } ] }, { "sName":"Drilling", - "nPrc": "40", - "nGrp": "0", + "nPrc": 40, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0011" } ] + "StrategyList" : [ { "sStrategyId": "STR0011" } ] } ] }, { "sName":"Tenon", - "nPrc": "50", - "nGrp": "1", + "nPrc": 50, + "nGrp": 1, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0006" } ] + "StrategyList" : [ { "sStrategyId": "STR0006" } ] } ] }, { "sName":"Mortise", - "nPrc": "50", - "nGrp": "0", + "nPrc": 50, + "nGrp": 0, "TopologyList" : [ { "sName": "Pocket-5-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-4-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Tunnel-4-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Bevel-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Rabbet-2-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyId": "STR0010"} ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0010"} ] }, { "sName": "Pocket-Round", - "StrategyList" : [ { "sStrategyID": "STR0008" } ] + "StrategyList" : [ { "sStrategyId": "STR0008" } ] }, { "sName": "Pocket-Round-Front", - "StrategyList" : [ { "sStrategyID": "STR0008" } ] + "StrategyList" : [ { "sStrategyId": "STR0008" } ] }, { "sName": "Pocket-Round-Through", - "StrategyList" : [ { "sStrategyID": "STR0008" } ] + "StrategyList" : [ { "sStrategyId": "STR0008" } ] } ] }, { "sName":"Front Mortise", - "nPrc": "51", - "nGrp": "0", + "nPrc": 51, + "nGrp": 0, "TopologyList" : [ { "sName": "Pocket-5-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-4-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Tunnel-4-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0003" }, { "sStrategyID": "STR0004" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0003" }, { "sStrategyId": "STR0004" } ] }, { "sName": "Groove-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Bevel-3-Blind", - "StrategyList" : [ { "sStrategyID": "STR0002" } ] + "StrategyList" : [ { "sStrategyId": "STR0002" } ] }, { "sName": "Rabbet-2-Through", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyId": "STR0010"} ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0010"} ] }, { "sName": "Pocket-Round", - "StrategyList" : [ { "sStrategyID": "STR0008" } ] + "StrategyList" : [ { "sStrategyId": "STR0008" } ] }, { "sName": "Pocket-Round-Front", - "StrategyList" : [ { "sStrategyID": "STR0008" } ] + "StrategyList" : [ { "sStrategyId": "STR0008" } ] }, { "sName": "Pocket-Round-Through", - "StrategyList" : [ { "sStrategyID": "STR0008" } ] + "StrategyList" : [ { "sStrategyId": "STR0008" } ] } ] }, { "sName":"House", - "nPrc": "52", - "nGrp": "1", + "nPrc": 52, + "nGrp": 1, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -416,8 +416,8 @@ }, { "sName":"House Mortise", - "nPrc": "53", - "nGrp": "0", + "nPrc": 53, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -426,38 +426,38 @@ }, { "sName":"Dovetail Tenon", - "nPrc": "55", - "nGrp": "1", + "nPrc": 55, + "nGrp": 1, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0001" } ] + "StrategyList" : [ { "sStrategyId": "STR0001" } ] } ] }, { "sName":"Dovetail Mortise", - "nPrc": "55", - "nGrp": "0", + "nPrc": 55, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0007" } ] + "StrategyList" : [ { "sStrategyId": "STR0007" } ] } ] }, { "sName":"Dovetail Mortise Front", - "nPrc": "56", - "nGrp": "0", + "nPrc": 56, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0007" } ] + "StrategyList" : [ { "sStrategyId": "STR0007" } ] } ] }, { "sName":"Marking", - "nPrc": "60", - "nGrp": "0", + "nPrc": 60, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -466,8 +466,8 @@ }, { "sName":"Text", - "nPrc": "61", - "nGrp": "0", + "nPrc": 61, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -476,8 +476,8 @@ }, { "sName":"Scarf Simple", - "nPrc": "70", - "nGrp": "1", + "nPrc": 70, + "nGrp": 1, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -486,8 +486,8 @@ }, { "sName":"Scarf Joint", - "nPrc": "71", - "nGrp": "1", + "nPrc": 71, + "nGrp": 1, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -496,28 +496,28 @@ }, { "sName":"Step Joint", - "nPrc": "80", - "nGrp": "1", + "nPrc": 80, + "nGrp": 1, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyId": "STR0010"} ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0010"} ] } ] }, { "sName":"Step Joint Notch", - "nPrc": "80", - "nGrp": "0", + "nPrc": 80, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyId": "STR0010"} ] + "StrategyList" : [ { "sStrategyId": "STR0002" }, { "sStrategyId": "STR0010"} ] } ] }, { "sName":"Planing", - "nPrc": "90", - "nGrp": "0", + "nPrc": 90, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -526,8 +526,8 @@ }, { "sName":"Front Profile", - "nPrc": "100", - "nGrp": "0", + "nPrc": 100, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -536,8 +536,8 @@ }, { "sName":"Head Concave Profile", - "nPrc": "101", - "nGrp": "0", + "nPrc": 101, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -546,18 +546,18 @@ }, { "sName":"Head Convex Profile", - "nPrc": "102", - "nGrp": "0", + "nPrc": 102, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0009" } ] + "StrategyList" : [ { "sStrategyId": "STR0009" } ] } ] }, { "sName":"Head Cambered Profile", - "nPrc": "103", - "nGrp": "0", + "nPrc": 103, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -566,18 +566,18 @@ }, { "sName":"Round Arch", - "nPrc": "104", - "nGrp": "0", + "nPrc": 104, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ { "sStrategyID": "STR0009" } ] + "StrategyList" : [ { "sStrategyId": "STR0009" } ] } ] }, { "sName":"Head Profile", - "nPrc": "106", - "nGrp": "0", + "nPrc": 106, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -586,8 +586,8 @@ }, { "sName":"Sphere", - "nPrc": "107", - "nGrp": "0", + "nPrc": 107, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -596,8 +596,8 @@ }, { "sName":"Triangle Cut", - "nPrc": "120", - "nGrp": "0", + "nPrc": 120, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -606,8 +606,8 @@ }, { "sName":"TyroleanDovetail", - "nPrc": "136", - "nGrp": "0", + "nPrc": 136, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -616,8 +616,8 @@ }, { "sName":"Dovetail", - "nPrc": "138", - "nGrp": "0", + "nPrc": 138, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -626,8 +626,8 @@ }, { "sName":"Free Contour", - "nPrc": "250", - "nGrp": "0", + "nPrc": 250, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -636,8 +636,8 @@ }, { "sName":"Outline", - "nPrc": "251", - "nGrp": "0", + "nPrc": 251, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -646,8 +646,8 @@ }, { "sName":"Aperture", - "nPrc": "252", - "nGrp": "0", + "nPrc": 252, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -656,28 +656,28 @@ }, { "sName":"HeadCut", - "nPrc": "340", - "nGrp": "0", + "nPrc": 340, + "nGrp": 1, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ ] + "StrategyList" : [ { "sStrategyId": "HEADCUT" } ] } ] }, { "sName":"TailCut", - "nPrc": "350", - "nGrp": "0", + "nPrc": 350, + "nGrp": 1, "TopologyList" : [ { "sName": "Feature", - "StrategyList" : [ ] + "StrategyList" : [ { "sStrategyId": "TAILCUT" } ] } ] }, { "sName":"Variant", - "nPrc": "900", - "nGrp": "0", + "nPrc": 900, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ] @@ -686,8 +686,8 @@ }, { "sName":"Decor", - "nPrc": "959", - "nGrp": "0", + "nPrc": 959, + "nGrp": 0, "TopologyList" : [ { "sName": "Feature", "StrategyList" : [ ]