DataWall :

- aggiunta gestione Tool_ID anche su contorni liberi di tipo pocket.
This commit is contained in:
DarioS
2021-09-17 12:29:37 +02:00
parent 9fa6691c4f
commit be08ec92e1
2 changed files with 11 additions and 7 deletions
+6 -4
View File
@@ -1,4 +1,4 @@
-- MachiningLib.lua by Egaltech s.r.l. 2021/08/29
-- MachiningLib.lua by Egaltech s.r.l. 2021/09/17
-- Libreria ricerca lavorazioni per Pareti
-- Tabella per definizione modulo
@@ -58,7 +58,7 @@ function WMachiningLib.FindMilling( sType, dDepth, sTuuid, nTool_ID)
local nMyTool_ID = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i')
if ( not sTuuid or sTuuid == sMyTuuid) and
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and
( not nTool_ID or nTool_ID == nMyTool_ID) then
( not nTool_ID or nTool_ID == 0 or nTool_ID == nMyTool_ID) then
return Milling.Name, dTMaxDepth, dTMaxMat, dTDiam
end
end
@@ -79,14 +79,16 @@ function WMachiningLib.FindNailing( nType)
end
---------------------------------------------------------------------
function WMachiningLib.FindPocketing( sType, dMaxDiam, dDepth)
function WMachiningLib.FindPocketing( sType, dMaxDiam, dDepth, nTool_ID)
for i = 1, #Pocketings do
local Pocketing = Pocketings[i]
if Pocketing.On and Pocketing.Type == sType and SetCurrMachiningAndTool( Pocketing.Name) then
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')
if ( not dMaxDiam or dTDiam < dMaxDiam + GEO.EPS_SMALL) and
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) then
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and
( not nTool_ID or nTool_ID == 0 or nTool_ID == nMyTool_ID) then
return Pocketing.Name, dTDiam, dTMaxDepth
end
end