- varie modifiche, principalmente a MachiningLib e LapJoint, che migliorano il funzionamento delle tasche, anche in doppio.

This commit is contained in:
luca.mazzoleni
2023-11-09 18:17:17 +01:00
parent f9bb10bf6e
commit a84fb0608f
4 changed files with 104 additions and 68 deletions
+10 -2
View File
@@ -9,6 +9,7 @@
-- 2023/10/30 In FindPocketing aggiunto parametro per poter escludere le frese che non lavorano di testa.
-- 2023/10/31 In IsToolDoubleOk permessa una lunghezza lievemente inferiore dell'utensile secondario rispetto al principale.
-- 2023/10/31 In FindPocketing le lavorazioni con attacco speciale (rampa molto lunga e step basso) ignorano il flag per escludere le frese che non lavorano di testa.
-- 2023/11/06 In FindPocketing aggiunto parametro dDistanceToNearestPart per ridurre il massimo diametro in caso di altro pezzo troppo vicino.
-- Tabella per definizione modulo
local WMachiningLib = {}
@@ -106,7 +107,8 @@ function WMachiningLib.FindNailing( nType)
end
---------------------------------------------------------------------
function WMachiningLib.FindPocketing( sType, dMaxDiam, dDepth, nTool_ID, sHead, bExcludeNoTipFeed)
function WMachiningLib.FindPocketing( sType, dMaxDiam, dDepth, nTool_ID, sHead, bExcludeNoTipFeed, dDistanceToNearestPart)
if not dMaxDiam then dMaxDiam = 999 end
for i = 1, #Pocketings do
local Pocketing = Pocketings[i]
if Pocketing.On and Pocketing.Type == sType and SetCurrMachiningAndTool( Pocketing.Name) then
@@ -116,9 +118,15 @@ function WMachiningLib.FindPocketing( sType, dMaxDiam, dDepth, nTool_ID, sHead,
local nMyTool_ID = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i')
local sMyHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
local bHasTipFeed = ( EgtTdbGetCurrToolParam( MCH_TP.TIPFEED) ~= 0)
-- attacco con rampa molto lunga e step basso, utilizzabile anche con frese che non lavorano di testa
local bIsSpecialLeadIn = ( EgtMdbGetCurrMachiningParam( MCH_MP.LEADINTYPE) == MCH_POCK_LI.ZIGZAG or MCH_POCK_LI.HELIX) and
( ( EgtMdbGetCurrMachiningParam( MCH_MP.LITANG) or 0) > dTDiam - 10 * GEO.EPS_SMALL) and
( ( EgtMdbGetCurrMachiningParam( MCH_MP.LITANG) or 0) > dTDiam - 1 - 10 * GEO.EPS_SMALL) and
( ( EgtMdbGetCurrMachiningParam( MCH_MP.LIELEV) or 999) <= 2)
local bIsSpiralOut = EgtMdbGetCurrMachiningParam( MCH_MP.SUBTYPE) == MCH_POCK_SUB.SPIRALOUT
-- se ho un altro pezzo troppo vicino riduco il diametro massimo utensile
if dDistanceToNearestPart then
dMaxDiam = min( dMaxDiam, EgtIf( bIsSpiralOut, dDistanceToNearestPart * 2 + 5, dDistanceToNearestPart + 5))
end
if nMchType == MCH_MY.POCKETING and
( not dMaxDiam or dTDiam < dMaxDiam + GEO.EPS_SMALL) and
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and