Merge remote-tracking branch 'origin/develop' into STR0002_ImprovePocketing
This commit is contained in:
@@ -87,6 +87,12 @@ function MachiningLib.FindMill( Proc, ToolSearchParameters)
|
||||
bIsToolCompatible = false
|
||||
elseif TOOLS[i].dDiameter > ToolSearchParameters.dMaxToolDiameter then
|
||||
bIsToolCompatible = false
|
||||
elseif TOOLS[i].SetupInfo.bIsTopHead and ToolSearchParameters.vtToolDirection:getZ() < TOOLS[i].SetupInfo.dMaxNegativeAngle then
|
||||
bIsToolCompatible = false
|
||||
elseif TOOLS[i].SetupInfo.bIsBottomHead and ToolSearchParameters.vtToolDirection:getZ() > TOOLS[i].SetupInfo.dMaxPositiveAngle then
|
||||
bIsToolCompatible = false
|
||||
elseif TOOLS[i].sType == 'MILL_NOTIP' and ToolSearchParameters.sType == 'MILL_STD' then
|
||||
bIsToolCompatible = false
|
||||
elseif ToolSearchParameters.sMillShape == 'STANDARD' and ( TOOLS[i].dSideAngle ~= 0 or TOOLS[i].bIsPen) then
|
||||
bIsToolCompatible = false
|
||||
elseif ToolSearchParameters.sMillShape == 'DOVETAIL' and not TOOLS[i].bIsDoveTail then
|
||||
@@ -101,7 +107,7 @@ function MachiningLib.FindMill( Proc, ToolSearchParameters)
|
||||
-- scelgo il migliore
|
||||
if bIsToolCompatible then
|
||||
-- calcolo riduzione del massimo materiale utilizzabile
|
||||
local ToolEntryAngle = GetToolEntryAngle( Proc, ToolSearchParameters.vtToolDir)
|
||||
local ToolEntryAngle = GetToolEntryAngle( Proc, ToolSearchParameters.vtToolDirection)
|
||||
-- se ToolHolder più grande dell'utensile, il primo oggetto in collisione è il ToolHolder. Altrimenti il motore.
|
||||
local dDimObjToCheck = EgtIf( TOOLS[i].ToolHolder.dDiameter > TOOLS[i].dDiameter, TOOLS[i].ToolHolder.dDiameter, BeamData.C_SIMM_ENC)
|
||||
local dCurrentMaxMatReduction = BeamData.COLL_SIC or 5
|
||||
@@ -130,7 +136,7 @@ function MachiningLib.FindMill( Proc, ToolSearchParameters)
|
||||
dBestToolResidualDepth = dCurrentResidualDepth
|
||||
-- se hanno stesso montaggio
|
||||
elseif TOOLS[i].SetupInfo.bToolOnAggregate == TOOLS[nBestToolIndex].SetupInfo.bToolOnAggregate then
|
||||
-- scelgo utensile con rapporto lunghezza / diametro minore
|
||||
-- scelgo utensile con indice di bontà utensile calcolato come: lunghezza / massimo materiale / diametro
|
||||
if ( TOOLS[i].dLength / TOOLS[i].dMaxMaterial) / TOOLS[i].dDiameter < ( TOOLS[nBestToolIndex].dLength / TOOLS[nBestToolIndex].dMaxMaterial) / TOOLS[nBestToolIndex].dDiameter then
|
||||
nBestToolIndex = i
|
||||
dBestToolResidualDepth = dCurrentResidualDepth
|
||||
|
||||
Reference in New Issue
Block a user