implementato sorting lavorazioni ma non corretto, serve un algoritmo di STABLE SORTING

This commit is contained in:
luca.mazzoleni
2024-12-23 09:08:03 +01:00
parent 99e0bd27d9
commit 3bce7b5fd6
6 changed files with 91 additions and 9 deletions
+6
View File
@@ -146,11 +146,13 @@ function BeamExec.GetToolsFromDB()
Tool.dStep = EgtGetValInNotes( Tool.sUserNotes, 'STEP', 'd') or ( Tool.dMaxMaterial / 3) -- se non settato nell'utensile, considero metà del tagliente
Tool.dSideStep = EgtGetValInNotes( Tool.sUserNotes, 'SIDESTEP', 'd') or floor( Tool.dDiameter / 3) -- se non settato nell'utensile, considero metà del diametro
Tool.bIsPen = abs( Tool.dSpeed) < 5
Tool.dPerformanceIndex = ( Tool.dDiameter * Tool.dMaxMaterial) / Tool.dLength
-- recupero parametri propri delle lame
elseif sToolFamily == 'SAWBLADE' then
Tool.bIsUsedForLongCut = EgtGetValInNotes( Tool.sUserNotes, 'LONGCUT') == 1 or false -- false come valore di default
Tool.dStep = EgtGetValInNotes( Tool.sUserNotes, 'STEP', 'd') or Tool.dThickness -- se non settato nell'utensile, considero lo spessore lama
Tool.dSideStep = EgtGetValInNotes( Tool.sUserNotes, 'SIDESTEP', 'd') or Tool.dMaxMaterial -- se non settato nell'utensile, considero un quarto del diametro
Tool.dPerformanceIndex = 1 / ( Tool.dDiameter * Tool.dLength)
-- recupero parametri propri delle motoseghe
elseif sToolFamily == 'MORTISE' then
Tool.dDistance = EgtTdbGetCurrToolParam( MCH_TP.DIST) or 90 -- 90mm dimensione standard aggregato catena
@@ -160,7 +162,11 @@ function BeamExec.GetToolsFromDB()
Tool.dSideStep = EgtGetValInNotes( Tool.sUserNotes, 'SIDESTEP', 'd') or ( Tool.dThickness - 1) -- se non settato nell'utensile, considero spessore catena meno 1mm di sicurezza
Tool.dCornerRadius = EgtTdbGetCurrToolParam( MCH_TP.CORNRAD)
Tool.dWidth = Tool.dDiameter
Tool.dPerformanceIndex = 1 / Tool.dLength
end
-- drillbit
else
Tool.dPerformanceIndex = Tool.dDiameter / Tool.dLength
end
-- se tutti i dati necessari sono disponibili, inserisco utensile nella lista globale degli utensili disponibili