- In LapJoint -> VerifyPocket, per tasche in doppio forzata ricerca fresa che possa lavorare di testa.
- In MachiningLib -> FindPocketing aggiunto parametro per poter escludere le frese che non lavorano di testa. - In WallExec -> SetMirroredFeatures permesso il doppio per groove con specchiata non sul fianco se settate per essere lavorate come pocket.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
-- 2023/06/07 Alla funzione AddMachining aggiunta la scrittura di alcune info alle lavorazioni.
|
||||
-- 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.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local WMachiningLib = {}
|
||||
@@ -103,7 +104,7 @@ function WMachiningLib.FindNailing( nType)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function WMachiningLib.FindPocketing( sType, dMaxDiam, dDepth, nTool_ID, sHead)
|
||||
function WMachiningLib.FindPocketing( sType, dMaxDiam, dDepth, nTool_ID, sHead, bExcludeNoTipFeed)
|
||||
for i = 1, #Pocketings do
|
||||
local Pocketing = Pocketings[i]
|
||||
if Pocketing.On and Pocketing.Type == sType and SetCurrMachiningAndTool( Pocketing.Name) then
|
||||
@@ -112,11 +113,13 @@ function WMachiningLib.FindPocketing( sType, dMaxDiam, dDepth, nTool_ID, sHead)
|
||||
local dTMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), EgtTdbGetCurrToolMaxDepth())
|
||||
local nMyTool_ID = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i')
|
||||
local sMyHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
||||
local bHasTipFeed = ( EgtTdbGetCurrToolParam( MCH_TP.TIPFEED) ~= 0)
|
||||
if nMchType == MCH_MY.POCKETING and
|
||||
( not dMaxDiam or dTDiam < dMaxDiam + GEO.EPS_SMALL) and
|
||||
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and
|
||||
( not nTool_ID or nTool_ID == 0 or nTool_ID == nMyTool_ID) and
|
||||
( not sHead or sHead == sMyHead) then
|
||||
( not sHead or sHead == sMyHead) and
|
||||
( not bExcludeNoTipFeed or bHasTipFeed) then
|
||||
return Pocketing.Name, dTDiam, dTMaxDepth
|
||||
end
|
||||
end
|
||||
@@ -211,7 +214,7 @@ function WMachiningLib.IsToolDoubleOk( sToolMasterName, sToolDoubleName)
|
||||
local dTMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, dTMaxMat, EgtTdbGetCurrToolMaxDepth())
|
||||
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||
local dTDiamTh = EgtTdbGetCurrToolThDiam() or 0
|
||||
local bTipFeed = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED) > 0
|
||||
local bHasTipFeed = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED) ~= 0
|
||||
local dTMaxDepthOnSide = EgtIf( bIsBlade, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or 999, 0.5 * ( dTDiam - dTDiamTh)))
|
||||
local bIsPrimaryHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD) == 'H1'
|
||||
-- dimensioni utensile double
|
||||
@@ -221,7 +224,7 @@ function WMachiningLib.IsToolDoubleOk( sToolMasterName, sToolDoubleName)
|
||||
local dTMaxDepthDouble = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, dTMaxMatDouble, EgtTdbGetCurrToolMaxDepth())
|
||||
local dTDiamDouble = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||
local dTDiamThDouble = EgtTdbGetCurrToolThDiam() or 0
|
||||
local bTipFeedDouble = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED) > 0
|
||||
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
|
||||
bIsToolDoubleOk = bIsPrimaryHead and
|
||||
@@ -230,7 +233,7 @@ function WMachiningLib.IsToolDoubleOk( sToolMasterName, sToolDoubleName)
|
||||
( dTMaxDepthDouble > dTMaxDepth - 100 * GEO.EPS_SMALL) and
|
||||
( abs( dTDiam - dTDiamDouble) < 100 * GEO.EPS_SMALL) and
|
||||
( abs( dTDiamTh - dTDiamThDouble) < 100 * GEO.EPS_SMALL) and
|
||||
( bTipFeed == bTipFeedDouble) and
|
||||
( bHasTipFeed == bHasTipFeedDouble) and
|
||||
( abs( dTMaxDepthOnSide - dTMaxDepthOnSideDouble) < GEO.EPS_SMALL) and
|
||||
EgtFindToolInCurrSetup( sToolDoubleName)
|
||||
return bIsToolDoubleOk
|
||||
|
||||
Reference in New Issue
Block a user