53 lines
1.5 KiB
Lua
53 lines
1.5 KiB
Lua
-- ProcessSplit.lua by Egaltech s.r.l. 2025/06/20
|
|
-- Gestione tastatura
|
|
|
|
-- Tabella per definizione modulo
|
|
local ProcessProbing = {}
|
|
|
|
-- Include
|
|
require( 'EgtBase')
|
|
local BL = require( 'BeamLib')
|
|
|
|
-- Dati
|
|
local BD = require( 'BeamData')
|
|
|
|
---------------------------------------------------------------------
|
|
local function GetProbingMachining( Machinings, nHead)
|
|
local sProbeMachining
|
|
|
|
for i = 1, #Machinings do
|
|
if EgtEndsWith( Machinings[i], '_H2') then
|
|
sProbeMachining = Machinings[i]
|
|
break
|
|
end
|
|
end
|
|
|
|
return sProbeMachining
|
|
end
|
|
|
|
---------------------------------------------------------------------
|
|
-- Applicazione della lavorazione
|
|
function ProcessProbing.Make( Proc, nRawId, nPartId, Info)
|
|
local bOk, sErr
|
|
|
|
-- per eseguire tastatura servono tutti i dati, altriemnti impossibile
|
|
if Info.vtProbe and Info.ptProbe and Info.sType then
|
|
-- recupero gruppo per geometria addizionale
|
|
local nAddGrpId = BL.GetAddGroup( nPartId)
|
|
local nIdLine = EgtLinePVL( nAddGrpId, Info.ptProbe, Info.vtProbe, 10) -- TODO lunghezza da portare fuori come parametro
|
|
local Machinings = GetMachinings( MCH_MY.PROBING, Info.sType)
|
|
local Probing = GetProbingMachining( Machinings, Info.nHead)
|
|
-- se c'è la linea e la lavorazione, applico
|
|
if Probing and nIdLine then
|
|
end
|
|
else
|
|
bOk = true
|
|
sErr = 'Error on probing'
|
|
end
|
|
|
|
return bOk, sErr
|
|
end
|
|
|
|
---------------------------------------------------------------------
|
|
return ProcessProbing
|