From 698e7d1639ccc0e0a2e018c7774896bf3a099890 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 11 Jul 2025 15:08:21 +0200 Subject: [PATCH] - in BALDETOWASTE -> CutWholeWaste in caso di feature lunga si ritorna non applicabile --- StrategyLibs/BLADETOWASTE.lua | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/StrategyLibs/BLADETOWASTE.lua b/StrategyLibs/BLADETOWASTE.lua index 10831a7..abe394b 100644 --- a/StrategyLibs/BLADETOWASTE.lua +++ b/StrategyLibs/BLADETOWASTE.lua @@ -300,6 +300,12 @@ local function CutWholeWaste( Proc, Part, OptionalParameters) local dDepthToMachine = 0 local dCompletionPercentage = 0 + -- controlli preventivi + local bIsFeatureLong = FeatureLib.IsMachiningLong( Proc.b3Box:getDimX(), Part, { dMaxSegmentLength = BeamData.LONGCUT_ENDLEN}) + if bIsFeatureLong then + Result = FeatureLib.GetStrategyResultNotApplicable('Feature too long') + end + -- parametri opzionali e default if not OptionalParameters then OptionalParameters = {} @@ -394,14 +400,14 @@ local function CutWholeWaste( Proc, Part, OptionalParameters) else Result.sStatus = 'Not-Completed' end + Result.dCompletionPercentage = dCompletionPercentage + Result.nCompletionIndex = FeatureLib.GetFeatureCompletionIndex( dCompletionPercentage) + Result.nQuality = TOOLS[nToolIndex].nQuality + Result.dTimeToMachine = FeatureLib.GetStrategyTimeToMachine( {Cutting}) + Result.dMRR = ( FeatureInfo.dFeatureVolume / Result.dTimeToMachine) / pow( 10, 6) else - Result.sStatus = 'Not-Applicable' + Result = FeatureLib.GetStrategyResultNotApplicable() end - Result.dCompletionPercentage = dCompletionPercentage - Result.nCompletionIndex = FeatureLib.GetFeatureCompletionIndex( dCompletionPercentage) - Result.nQuality = TOOLS[nToolIndex].nQuality - Result.dTimeToMachine = FeatureLib.GetStrategyTimeToMachine( {Cutting}) - Result.dMRR = ( FeatureInfo.dFeatureVolume / Result.dTimeToMachine) / pow( 10, 6) return Machinings, Result end @@ -783,7 +789,6 @@ function BLADETOWASTE.Make( ProcOrId, Part, OptionalParameters) elseif Result1.sStatus == 'Completed' or Result2.sStatus == 'Completed' then Result.sStatus = 'Not-Completed' else - Result.sStatus = 'Not-Applicable' Result = FeatureLib.GetStrategyResultNotApplicable() end