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