- in MachiningLib corrette FindBlade e FindChainsaw (ancora da completare ma funzionano)

- in STR0003 altre modifiche nomi variabili
This commit is contained in:
luca.mazzoleni
2024-05-24 18:37:53 +02:00
parent 8cff8827a0
commit c7687419a6
2 changed files with 41 additions and 42 deletions
+14 -15
View File
@@ -173,17 +173,14 @@ function MachiningLib.FindBlade( Proc, ToolSearchParameters)
local nBestToolIndex
for i = 1, #TOOLS do
local bIsToolCompatible = true
local bIsToolCompatible = false
-- TODO non va bene - da sistemare!!!!!
if TOOLS[i].sFamily ~= 'SAWBLADE' then
bIsToolCompatible = false
end
if ToolSearchParameters.bAllowTopHead and not ToolSearchParameters.bAllowBottomHead then
bIsToolCompatible = TOOLS[i].SetupInfo.bIsTopHead
elseif ToolSearchParameters.bAllowBottomHead and not ToolSearchParameters.bAllowTopHead then
bIsToolCompatible = TOOLS[i].SetupInfo.bIsBottomHead
if TOOLS[i].sFamily == 'SAWBLADE' then
if ToolSearchParameters.bAllowTopHead and not ToolSearchParameters.bAllowBottomHead then
bIsToolCompatible = TOOLS[i].SetupInfo.bIsTopHead
elseif ToolSearchParameters.bAllowBottomHead and not ToolSearchParameters.bAllowTopHead then
bIsToolCompatible = TOOLS[i].SetupInfo.bIsBottomHead
end
end
if bIsToolCompatible then
@@ -230,12 +227,14 @@ function MachiningLib.FindChainSaw( Proc, ToolSearchParameters)
local nBestToolIndex
local dBestToolResidualDepth = 0
for i = 1, #TOOLS do
local bIsToolCompatible = true
local bIsToolCompatible = false
if ToolSearchParameters.bAllowTopHead and not ToolSearchParameters.bAllowBottomHead then
bIsToolCompatible = TOOLS[i].SetupInfo.bIsTopHead
elseif ToolSearchParameters.bAllowBottomHead and not ToolSearchParameters.bAllowTopHead then
bIsToolCompatible = TOOLS[i].SetupInfo.bIsBottomHead
if TOOLS[i].sFamily == 'MORTISE' then
if ToolSearchParameters.bAllowTopHead and not ToolSearchParameters.bAllowBottomHead then
bIsToolCompatible = TOOLS[i].SetupInfo.bIsTopHead
elseif ToolSearchParameters.bAllowBottomHead and not ToolSearchParameters.bAllowTopHead then
bIsToolCompatible = TOOLS[i].SetupInfo.bIsBottomHead
end
end
-- TODO nei confronti tra valori gestire tolleranze