DataBeam :

- migliorie e correzioni varie.
This commit is contained in:
Dario Sassi
2020-12-01 11:10:24 +00:00
parent 7c6961985c
commit e0698bb00d
8 changed files with 235 additions and 53 deletions
+13 -4
View File
@@ -1,4 +1,4 @@
-- ProcessDrill.lua by Egaltech s.r.l. 2020/11/06
-- ProcessDrill.lua by Egaltech s.r.l. 2020/12/01
-- Gestione calcolo forature per Travi
-- Tabella per definizione modulo
@@ -197,7 +197,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
dCheckDepth = nil
end
-- recupero la lavorazione
local sDrilling, nType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, dCheckDepth, Proc.Down)
local sDrilling, nType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, dCheckDepth, BD.DOWN_HEAD and Proc.Down)
if not sDrilling then
-- se non ho passato altezza di taglio utensile allora non è stato trovato utensile
if not dCheckDepth then
@@ -207,7 +207,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
-- altrimenti rifaccio la ricerca foratura senza passare altezza utensile
else
dCheckDepth = nil
sDrilling, nType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, nil, Proc.Down)
sDrilling, nType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, nil, BD.DOWN_HEAD and Proc.Down)
if not sDrilling then
local sErr = 'Error : drilling not found in library'
EgtOutLog( sErr)
@@ -330,7 +330,16 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
end
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- eseguo
if not EgtApplyMachining( true, false) then
local bOk = EgtApplyMachining( true, false)
if not bOk and BD.DOWN_HEAD then
if nType == 'Drill' then
EgtSetMachiningParam( MCH_MP.INVERT, true)
else
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
end
bOk = EgtApplyMachining( true, false)
end
if not bOk then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
return false, sErr