- qualche piccola modifica a WallExec
- in LapJoint (MakeTwoFaces e altri make, manca MakeMoreFaces) implementata parzialmente gestione doppio - in MachiningLib aggiunta la possibilità di forzare una testa per milling e pocketing
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
-- 2023/03/09 Piccola correzione alla SideDepth in FindMilling
|
||||
-- In FindMilling aggiunta gestione spessore e massimo materiale nel caso di lam
|
||||
-- 2023/05/25 Aggiunta funzione AddMachining che incapsula EgtAddMachining trascrivendo le priorità btl dalle feature alle lavorazioni.
|
||||
-- 2023/06/07 Alla funzione AddMachining aggiunta la scrittura dell'info ISOUTLINE alle lavorazioni.
|
||||
-- 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.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local WMachiningLib = {}
|
||||
@@ -55,7 +56,7 @@ function WMachiningLib.FindCutting( sType, dDepth, nTool_ID)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function WMachiningLib.FindMilling( sType, dDepth, sTuuid, nTool_ID, dMaxDiam, dMaxMat, bTipFeed, dMinSideElev)
|
||||
function WMachiningLib.FindMilling( sType, dDepth, sTuuid, nTool_ID, dMaxDiam, dMaxMat, bTipFeed, dMinSideElev, sHead)
|
||||
for i = 1, #Millings do
|
||||
local Milling = Millings[i]
|
||||
if Milling.On and Milling.Type == sType and SetCurrMachiningAndTool( Milling.Name) then
|
||||
@@ -69,6 +70,7 @@ function WMachiningLib.FindMilling( sType, dDepth, sTuuid, nTool_ID, dMaxDiam, d
|
||||
local dTTipFeed = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED)
|
||||
local dTMaxDepthOnSide = EgtIf( bIsBlade, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or 999, 0.5 * ( dTDiam - dTDiamTh)))
|
||||
local nMyTool_ID = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i')
|
||||
local sMyHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
||||
if nMchType == MCH_MY.MILLING and
|
||||
( not sTuuid or sTuuid == sMyTuuid) and
|
||||
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and
|
||||
@@ -76,7 +78,8 @@ function WMachiningLib.FindMilling( sType, dDepth, sTuuid, nTool_ID, dMaxDiam, d
|
||||
( not dMaxMat or dTMaxMat < dMaxMat + GEO.EPS_SMALL) and
|
||||
( not bTipFeed or dTTipFeed > 1) and
|
||||
( not dMinSideElev or dTMaxDepthOnSide > dMinSideElev - GEO.EPS_SMALL) and
|
||||
( not nTool_ID or nTool_ID == 0 or nTool_ID == nMyTool_ID) then
|
||||
( not nTool_ID or nTool_ID == 0 or nTool_ID == nMyTool_ID) and
|
||||
( not sHead or sHead == sMyHead) then
|
||||
return Milling.Name, dTMaxDepth, dTMaxMat, dTDiam
|
||||
end
|
||||
end
|
||||
@@ -99,18 +102,20 @@ function WMachiningLib.FindNailing( nType)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function WMachiningLib.FindPocketing( sType, dMaxDiam, dDepth, nTool_ID)
|
||||
function WMachiningLib.FindPocketing( sType, dMaxDiam, dDepth, nTool_ID, sHead)
|
||||
for i = 1, #Pocketings do
|
||||
local Pocketing = Pocketings[i]
|
||||
if Pocketing.On and Pocketing.Type == sType and SetCurrMachiningAndTool( Pocketing.Name) then
|
||||
local nMchType = EgtMdbGetCurrMachiningParam( MCH_MP.TYPE)
|
||||
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||
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 nMyTool_ID = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i')
|
||||
local sMyHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
||||
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) then
|
||||
( not nTool_ID or nTool_ID == 0 or nTool_ID == nMyTool_ID) and
|
||||
( not sHead or sHead == sMyHead) then
|
||||
return Pocketing.Name, dTDiam, dTMaxDepth
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user