diff --git a/LuaLibs/WMachiningLib.lua b/LuaLibs/WMachiningLib.lua index d41caad..e2714d4 100644 --- a/LuaLibs/WMachiningLib.lua +++ b/LuaLibs/WMachiningLib.lua @@ -7,7 +7,7 @@ -- 2023/07/13 In FindMilling, FindPocketing aggiunta la possibilità di limitare la ricerca lavorazioni alla sola testa specificata. -- 2023/10/18 In SetCurrMachiningAndTool sostituito controllo di utensile attivo con controllo utensile nel setup corrente. -- 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 inferiore di 5.5mm dell'utensile secondario rispetto al principale. +-- 2023/10/31 In IsToolDoubleOk permessa una lunghezza lievemente inferiore dell'utensile secondario rispetto al principale. -- Tabella per definizione modulo local WMachiningLib = {} @@ -228,10 +228,11 @@ function WMachiningLib.IsToolDoubleOk( sToolMasterName, sToolDoubleName) local bHasTipFeedDouble = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED) ~= 0 local dTMaxDepthOnSideDouble = EgtIf( bIsBladeDouble, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or 999, 0.5 * ( dTDiamDouble - dTDiamThDouble))) -- controllo che siano uguali ( permetto una leggera differenza di lunghezza) + local dMaxLengthDifference = 6.5 bIsToolDoubleOk = bIsPrimaryHead and ( bIsBlade == bIsBladeDouble) and ( dTMaxMatDouble > dTMaxMat - 100 * GEO.EPS_SMALL) and - ( dTMaxDepthDouble > dTMaxDepth - 5.5) and + ( dTMaxDepthDouble > dTMaxDepth - dMaxLengthDifference) and ( abs( dTDiam - dTDiamDouble) < 100 * GEO.EPS_SMALL) and ( abs( dTDiamTh - dTDiamThDouble) < 100 * GEO.EPS_SMALL) and ( bHasTipFeed == bHasTipFeedDouble) and diff --git a/LuaLibs/WProcessLapJoint.lua b/LuaLibs/WProcessLapJoint.lua index 748fee0..224bea3 100644 --- a/LuaLibs/WProcessLapJoint.lua +++ b/LuaLibs/WProcessLapJoint.lua @@ -31,6 +31,7 @@ -- 2023/09/21 In MakeByMill modificato SCC per correggere caso con lama su testa fresa. -- 2023/10/02 Aggiunta segnalazione lavorazione tipo Side non trovata. -- 2023/10/30 In VerifyPocket, per tasche in doppio forzata ricerca fresa che possa lavorare di testa. +-- 2023/10/31 In VerifyPocket, se topologia pocket, forzata ricerca fresa che possa lavorare di testa. -- Tabella per definizione modulo local WPL = {} @@ -2198,13 +2199,14 @@ local function VerifyPocket( Proc, dMaxDiameter, dElev, nRawId, dH, dV) end local bForceClosedPocket = false + local bExcludeNoTipFeed = Proc.Topology == 'Pocket' -- recupero la lavorazione local bUseDElevToFindPocketing = true - local sPocketing = WM.FindPocketing( 'Pocket', dMaxDiameter, dElev) + local sPocketing = WM.FindPocketing( 'Pocket', dMaxDiameter, dElev, nil, nil, bExcludeNoTipFeed) -- se tasca troppo profonda cerco senza elevazione e limiterò la profondità if not sPocketing then bUseDElevToFindPocketing = false - sPocketing = WM.FindPocketing( 'Pocket', dMaxDiameter) + sPocketing = WM.FindPocketing( 'Pocket', dMaxDiameter, nil, nil, nil, bExcludeNoTipFeed) end local dMillDiam = 20 local dMaxDepth = 0 @@ -2242,10 +2244,10 @@ local function VerifyPocket( Proc, dMaxDiameter, dElev, nRawId, dH, dV) if bForceClosedPocket then dMaxDiameter = min( dH, dV) bUseDElevToFindPocketing = true - sPocketing = WM.FindPocketing( 'Pocket', dMaxDiameter, dElev) + sPocketing = WM.FindPocketing( 'Pocket', dMaxDiameter, dElev, nil, nil, bExcludeNoTipFeed) if not sPocketing then bUseDElevToFindPocketing = false - sPocketing = WM.FindPocketing( 'Pocket', dMaxDiameter) + sPocketing = WM.FindPocketing( 'Pocket', dMaxDiameter, nil, nil, nil, bExcludeNoTipFeed) end -- se doppio cerco una lavorazione adatta if Proc.Double and Proc.Double == 2 then