- RidgeLap usa strategia STR0012 solo se 3 facce; 1 o 2 passano dalle strategie standard

- BasicCustomerStrategies e AvailableStrategies modificate di conseguenza
- in STR0012 correzioni varie
This commit is contained in:
luca.mazzoleni
2025-05-19 18:22:10 +02:00
parent 0a1c658b20
commit 9eeccf67a0
4 changed files with 51 additions and 6 deletions
+22 -2
View File
@@ -115,7 +115,17 @@ local function GetStrategies_Egalware( Proc)
---------------------------------------------------------------------
-- Feature : Ridge Lap (1-30)
elseif ID.IsRidgeLap( Proc) then
Strategies = { { sStrategyId = 'STR0012'}}
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
@@ -427,7 +437,17 @@ local function GetStrategies_Essetre( Proc)
---------------------------------------------------------------------
-- Feature : Ridge Lap (1-30)
elseif ID.IsRidgeLap( Proc) then
Strategies = { { sStrategyId = 'STR0012'}}
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
+8
View File
@@ -80,6 +80,12 @@ function FeatureLib.NeedTopologyFeature( Proc)
return true
elseif ID.IsBlockHaus( Proc) then
return true
elseif ID.IsRidgeLap( Proc) then
if Proc.nFct == 3 then
return false
else
return true
end
end
-- se feature non tra quelle sopra, riconoscimento topologico non necessario
@@ -246,6 +252,8 @@ function FeatureLib.GetTopologyFromFeature( Proc, Part)
elseif Proc.FeatureInfo.bIsMortiseThrough then
Topology.sName = Topology.sName .. '-Through'
end
elseif ID.IsRidgeLap( Proc) then
Topology.sName = 'RidgeLap-3-Through'
else
Topology.sName = 'FEATURE'
end
+13 -1
View File
@@ -131,8 +131,20 @@
"nPrc": "30",
"nGrp": "1",
"TopologyList" : [
{ "sName": "Feature",
{ "sName": "RidgeLap-3-Through",
"StrategyList" : [ { "sStrategyId": "STR0012"} ]
},
{ "sName": "Groove-3-Blind",
"StrategyList" : [ { "sStrategyID": "STR0002" } ]
},
{ "sName": "Bevel-3-Blind",
"StrategyList" : [ { "sStrategyID": "STR0002" } ]
},
{ "sName": "Rabbet-2-Through",
"StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyId": "STR0010"} ]
},
{ "sName": "Cut-1-Through",
"StrategyList" : [ { "sStrategyID": "STR0002" }, { "sStrategyID": "STR0005" } ]
}
]
},
+8 -3
View File
@@ -18,6 +18,9 @@ local RidgeLap = {}
RidgeLap.Result = {}
-------------------------------------------------------------------------------------------------------------
-- TODO risolvere problemi calcolo volume nullo se facce rimosse
-- TODO gestire lavorazione con svuotatura
-- TODO risolvere problema ultimo cubetto troppo profondo!!
function STR0012.Make( bAddMachining, Proc, Part, CustomParameters)
-- carico parametri da default e li aggiorno con quelli passati dal chiamante (potrebbero non essere congruenti)
local StrategyLib = {}
@@ -39,9 +42,9 @@ function STR0012.Make( bAddMachining, Proc, Part, CustomParameters)
local dCompletionPercentageAddedFace = 0
local nQualityAddedFace = 0
-- RidgeLap ha sempre 3 facce
-- gestito solo RidgeLap 3 facce
if Proc.nFct ~= 3 then
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable( 'RidgeLap must have 3 faces')
Strategy.Result = FeatureLib.GetStrategyResultNotApplicable( 'Only RidgeLap 3 faces is applicable')
end
-- estensione oltre la coda
@@ -67,8 +70,10 @@ function STR0012.Make( bAddMachining, Proc, Part, CustomParameters)
-- rimozione della terza faccia dalla Proc
local idNewProc = EgtCopyGlob( Proc.id, nAddGrpId)
EgtSurfTmRemoveFacet( idNewProc, nAddedFace)
local OriginalProc = Proc
Proc = FeatureLib.GetProcFromTrimesh( idNewProc, Part, Proc)
-- TODO rimuovere??? codolo da implementare o no??
-- considerazioni necessarie a determinare se lavorare con codolo oppure no
local bKeepWasteAttached = ( Strategy.Parameters.sCuttingStrategy == 'KEEP_WASTE_ATTACHED')
local bDropWaste = ( Strategy.Parameters.sCuttingStrategy == 'DROP_WASTE')
@@ -148,7 +153,7 @@ function STR0012.Make( bAddMachining, Proc, Part, CustomParameters)
if RidgeLap.Result[i].bIsApplicable then
nIsApplicableCount = nIsApplicableCount + 1
if bAddMachining then
local bIsMachiningAdded = MachiningLib.AddMachinings( Proc, RidgeLap.Result[i])
local bIsMachiningAdded = MachiningLib.AddMachinings( OriginalProc, RidgeLap.Result[i])
if not bIsMachiningAdded then
bAreAllMachiningsAdded = false
end