This commit is contained in:
luca.mazzoleni
2025-02-27 14:29:58 +01:00
5 changed files with 271 additions and 10 deletions
+3 -3
View File
@@ -214,7 +214,7 @@ function MachiningLib.FindMill( Proc, ToolSearchParameters)
elseif TOOLS[i].bIsProfiledTool then
bIsToolCompatible = false
-- controlli standard
elseif TOOLS[i].dDiameter > ToolSearchParameters.dMaxToolDiameter then
elseif ToolSearchParameters.dMaxToolDiameter and TOOLS[i].dDiameter > ToolSearchParameters.dMaxToolDiameter then
bIsToolCompatible = false
elseif TOOLS[i].SetupInfo.dMinNz and ToolSearchParameters.vtToolDirection:getZ() < TOOLS[i].SetupInfo.dMinNz - GEO.EPS_ZERO then
bIsToolCompatible = false
@@ -228,7 +228,7 @@ function MachiningLib.FindMill( Proc, ToolSearchParameters)
bIsToolCompatible = false
elseif ToolSearchParameters.sMillShape == 'PEN' and not TOOLS[i].bIsPen then
bIsToolCompatible = false
elseif TOOLS[i].sType ~= ToolSearchParameters.sType then
elseif ToolSearchParameters.sType and TOOLS[i].sType ~= ToolSearchParameters.sType then
-- se sto cercando una fresa che non può lavorare di testa, quelle che lavorano di testa sono comunque ammesse
if TOOLS[i].sType == 'MILL_STD' and ToolSearchParameters.sType == 'MILL_NOTIP' then
bIsToolCompatible = true
@@ -252,7 +252,7 @@ function MachiningLib.FindMill( Proc, ToolSearchParameters)
if ToolEntryAngle.dValue > 0 and ToolEntryAngle.dValue < 90 then
dCurrentMaxMatReduction = dCurrentMaxMatReduction / ToolEntryAngle.dSin + ( ( dDimObjToCheck - TOOLS[i].dDiameter) / 2) / ToolEntryAngle.dTan
end
-- dCurrMachReduction = negativo -> limitare, positivo -> mm extra disponibili
-- dCurrentResidualDepth = negativo -> mm extra disponibili, positivo -> limitare
local dCurrentResidualDepth = ToolSearchParameters.dElevation + dCurrentMaxMatReduction - TOOLS[i].dMaxDepth
-- se non ancora trovato, oppure se completo e il migliore fino ad ora non è completo: corrente è il migliore