DataBeam :

- correzioni e migliorie varie.
This commit is contained in:
Dario Sassi
2019-07-29 15:01:19 +00:00
parent 7e3c951901
commit 8dee1a0c97
12 changed files with 325 additions and 159 deletions
+5 -3
View File
@@ -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