DataBeam :
- correzioni e migliorie varie.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- MachiningLib.lua by Egaltech s.r.l. 2019/07/16
|
||||
-- MachiningLib.lua by Egaltech s.r.l. 2019/07/25
|
||||
-- Libreria ricerca lavorazioni per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -38,15 +38,17 @@ function MachiningLib.FindMilling( sType)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function MachiningLib.FindPocketing( sType, dMaxMat)
|
||||
function MachiningLib.FindPocketing( sType, dMaxDiam, dDepth)
|
||||
for i = 1, #Pocketings do
|
||||
local Pocketing = Pocketings[i]
|
||||
if Pocketing.On and Pocketing.Type == sType and EgtMdbSetCurrMachining( Pocketing.Name) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
local sTool = EgtTdbGetToolFromUUID( sTuuid)
|
||||
if sTool and EgtTdbSetCurrTool( sTool) then
|
||||
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||
local dTMaxDepth = EgtTdbGetCurrToolMaxDepth()
|
||||
if not dMaxMat or dMaxMat < dTMaxDepth then
|
||||
if ( not dMaxDiam or dTDiam < dMaxDiam) and
|
||||
( not dDepth or dTMaxDepth > dDepth) then
|
||||
return Pocketing.Name
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user