DataBeam :

- in processo FreeContour ora viene gestita la scelta utensile di BTL
- aggiunta gestione processo Variant (custom)
- aggiunta gestione lavorazioni di superficie
- anche in forature, svuotature e superfici fatte di lato sui fianchi si imposta il flag di esecuzione dopo i tagli dei contorni (MOVE_AFTER).
This commit is contained in:
DarioS
2021-08-29 19:51:33 +02:00
parent aaaddb9262
commit eb479dc5ee
6 changed files with 182 additions and 15 deletions
+22 -6
View File
@@ -1,4 +1,4 @@
-- MachiningLib.lua by Egaltech s.r.l. 2021/03/05
-- MachiningLib.lua by Egaltech s.r.l. 2021/08/29
-- Libreria ricerca lavorazioni per Pareti
-- Tabella per definizione modulo
@@ -16,6 +16,10 @@ local Millings = require( 'MillingData')
local Pocketings = require( 'PocketingData')
local Sawings = require( 'SawingData')
local Drillings = require( 'DrillData')
local Surfacings
if EgtExistsFile( EgtGetCurrMachineDir() .. '\\Wall\\SurfacingData.lua') then
Surfacings = require( 'SurfacingData')
end
---------------------------------------------------------------------
local function SetCurrMachiningAndTool( sMachName)
@@ -43,16 +47,18 @@ function WMachiningLib.FindCutting( sType, dDepth)
end
---------------------------------------------------------------------
function WMachiningLib.FindMilling( sType, dDepth, sTuuidMstr)
function WMachiningLib.FindMilling( sType, dDepth, sTuuid, nTool_ID)
for i = 1, #Millings do
local Milling = Millings[i]
if Milling.On and Milling.Type == sType and SetCurrMachiningAndTool( Milling.Name) then
local sTuuid = EgtGetMachiningParam( MCH_MP.TUUID)
local sMyTuuid = EgtGetMachiningParam( MCH_MP.TUUID)
local dTMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
local dTMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, dTMaxMat, EgtTdbGetCurrToolMaxDepth())
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
if ( not sTuuidMstr or sTuuidMstr == sTuuid) and
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) then
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
return Milling.Name, dTMaxDepth, dTMaxMat, dTDiam
end
end
@@ -95,7 +101,6 @@ function WMachiningLib.FindSawing( sType)
return Sawing.Name
end
end
end
---------------------------------------------------------------------
@@ -124,5 +129,16 @@ function WMachiningLib.FindDrilling( dDiam)
end
end
---------------------------------------------------------------------
function WMachiningLib.FindSurfacing( sType)
if not Surfacings then return end
for i = 1, #Surfacings do
local Surfacing = Surfacings[i]
if Surfacing.On and Surfacing.Type == sType and SetCurrMachiningAndTool( Surfacing.Name) then
return Surfacing.Name
end
end
end
-------------------------------------------------------------------------------------------------------------
return WMachiningLib