This commit is contained in:
luca.mazzoleni
2024-05-30 18:17:41 +02:00
2 changed files with 21 additions and 6 deletions
+18 -5
View File
@@ -477,14 +477,27 @@ function MachiningLib.ApplyMachining( bRecalc, bApplyPost)
end
-------------------------------------------------------------------------------------------------------------
-- funzione che restituisce l'indice MRR (Material Removal Rate) della strategia.
function MachiningLib.GetToolMRR( dMachiningStep, dMachiningSideStep, dFeed)
-- funzione che restituisce l'indice MRR (Material Removal Rate) della strategia. Dati in ingresso: Step, SideStep, Feed, ToolIndex, MachiningType
function MachiningLib.GetToolMRR( Parameters)
local dMRR = 1
-- Unità: dm/min per avere un indice vicino alle unità
dMRR = ( dMachiningStep * dMachiningSideStep * dFeed) / pow( 10, 6)
-- se ho già tutti i parametri
if not Parameters.dStep or not Parameters.dSideStep or not Parameters.dFeed then
-- se manca qualche parametro, lo recupero da parametro di default dell'utensile
if Parameters.nToolIndex then
Parameters.dStep = Parameters.dStep or TOOLS[Parameters.nToolIndex].dStep
Parameters.dSideStep = Parameters.dSideStep or TOOLS[Parameters.nToolIndex].dSideStep
Parameters.dFeed = Parameters.dFeed or TOOLS[Parameters.nToolIndex].Feeds.dFeed
-- se non riesco a calcolare, ritorno un indice molto basso
else
return GEO.EPS_SMALL
end
end
return dMRR
dMRR = Parameters.dStep * Parameters.dSideStep * Parameters.dFeed
-- Unità: dm/min per avere un indice vicino alle unità
return dMRR / pow( 10, 6)
end
-------------------------------------------------------------------------------------------------------------
+3 -1
View File
@@ -84,7 +84,9 @@ function STR0002.Make( bAddMachining, Proc, Part, CustomParameters)
local dCompletionPercentage = min( 100, ( ( Proc.MainFaces.BottomFace.dElevation - ToolInfo.dResidualDepth) / Proc.MainFaces.BottomFace.dElevation) * 100)
Strategy.Result.nCompletionIndex = FeatureData.GetFeatureCompletionIndex( dCompletionPercentage)
Strategy.Result.nQuality = FeatureData.GetFeatureQuality( 'Mill')
Strategy.Result.dMRR = MachiningLib.GetToolMRR( TOOLS[ToolInfo.nToolIndex].dStep, TOOLS[ToolInfo.nToolIndex].dSideStep, TOOLS[ToolInfo.nToolIndex].Feeds.dFeed)
local ParametersMRR = {}
ParametersMRR.nToolIndex = nToolIndex
Strategy.Result.dMRR = MachiningLib.GetToolMRR( ParametersMRR)
Strategy.Result.sInfo = ''
-- se richiesto applico lavorazione