- Migliorie varie per adeguamento strategia e funzioni necessarie
This commit is contained in:
+39
-1
@@ -143,7 +143,6 @@ function FeatureData.ClassifyTopology( Proc, Part)
|
||||
local vTriangularFaces = FaceData.GetTriangularFaces( Proc)
|
||||
local vFacesByAdjNumber = FaceData.GetFacesByAdjacencyNumber( Proc)
|
||||
|
||||
|
||||
local sFamily
|
||||
local bIsThrough
|
||||
if Proc.Fct == 1 and ( bIsFeatureCuttingEntireSection or bIsFeatureCuttingEntireLength) then
|
||||
@@ -229,6 +228,45 @@ function FeatureData.GetDrillingData( Proc)
|
||||
return dDiam, dLen, nFcs, nFce
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- funzione che restituisce rating feature in base al numero di lavorazioni, tipo di utensili e indice di completamento
|
||||
-- TODO feature da sistemare
|
||||
function FeatureData.GetFeatureRating( sTypeTools, dCompletionPercentage)
|
||||
local dRating = 5
|
||||
local dCompletionIndex = 0
|
||||
local TypeTools = EgtSplitString( sTypeTools)
|
||||
|
||||
-- se non è stato fatto nulla, esco subito
|
||||
if dCompletionPercentage == 0 then
|
||||
return 0
|
||||
end
|
||||
|
||||
-- indice in base a utensile
|
||||
for i=1, #TypeTools do
|
||||
if TypeTools[i] == 'Blade' then
|
||||
dRating = min( dRating, 5)
|
||||
elseif TypeTools[i] == 'Mill' then
|
||||
dRating = min( dRating, 4)
|
||||
elseif TypeTools[i] == 'ChainSaw' then
|
||||
dRating = min( dRating, 3)
|
||||
else
|
||||
dRating = min( dRating, 1)
|
||||
end
|
||||
end
|
||||
|
||||
-- indice di completamento
|
||||
if dCompletionPercentage < 50 then
|
||||
dCompletionIndex = 1
|
||||
elseif dCompletionPercentage < 80 then
|
||||
dCompletionIndex = 2
|
||||
else
|
||||
dCompletionIndex = 5
|
||||
end
|
||||
|
||||
dRating = dRating + dCompletionIndex
|
||||
return dRating
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
return FeatureData
|
||||
Reference in New Issue
Block a user