DataBeam :
- prime modifiche per lavorazione fori in Doppio - correzione a attacchi/uscite dei profili di Testa - modifiche a punto di attacco tenone se lavorato con testa da sotto.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- ProcessDrill.lua by Egaltech s.r.l. 2020/12/17
|
||||
-- ProcessDrill.lua by Egaltech s.r.l. 2020/12/29
|
||||
-- Gestione calcolo forature per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -109,8 +109,10 @@ function ProcessDrill.Split( Proc, b3Raw)
|
||||
if not bTrySplit then
|
||||
return false
|
||||
end
|
||||
-- abilitazione foratura da sotto
|
||||
local bDrillDown = ( BD.DOWN_HEAD and ( Proc.Down or vtExtr:getZ() < 0.1 or EgtExistsInfo( Proc.Id, 'MAIN')) and not EgtExistsInfo( Proc.Id, 'DOU'))
|
||||
-- recupero la lavorazione
|
||||
local sDrilling, _, dMaxMat = ML.FindDrilling( dDiam, nil, BD.DOWN_HEAD and ( Proc.Down or vtExtr:getZ() < 0.1))
|
||||
local sDrilling, _, dMaxMat = ML.FindDrilling( dDiam, 0, bDrillDown)
|
||||
if not sDrilling then dMaxMat = 0 end
|
||||
-- restituisco se va fatto in doppio (solo fori orizzontali)
|
||||
local bHoriz = ( abs( vtExtr:getZ()) < abs( BD.DRILL_VZ_MIN) and
|
||||
@@ -203,7 +205,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
dCheckDepth2 = nil
|
||||
end
|
||||
-- abilitazione foratura da sotto
|
||||
local bDrillDown = ( BD.DOWN_HEAD and ( Proc.Down or vtExtr:getZ() < 0.1))
|
||||
local bDrillDown = ( BD.DOWN_HEAD and ( Proc.Down or vtExtr:getZ() < 0.1 or EgtExistsInfo( Proc.Id, 'MAIN')) and not EgtExistsInfo( Proc.Id, 'DOU'))
|
||||
-- primo gruppo di controlli con lunghezza utensile calcolata
|
||||
-- recupero la lavorazione
|
||||
local sDrilling, nType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, dCheckDepth, bDrillDown)
|
||||
@@ -211,7 +213,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
-- se ho passato altezza di taglio utensile allora rifaccio la ricerca senza passare altezza utensile
|
||||
if dCheckDepth then
|
||||
dCheckDepth = nil
|
||||
sDrilling, nType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, nil, bDrillDown)
|
||||
sDrilling, nType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, 0, bDrillDown)
|
||||
end
|
||||
if not sDrilling then
|
||||
nErrorCode = 1
|
||||
@@ -225,7 +227,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
nErrorCode = 2
|
||||
-- rifaccio ricerca lavorazione senza specificare la profondità (dovrebbe trovare l'utensile più corto)
|
||||
else
|
||||
sDrilling, nType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, nil, bDrillDown)
|
||||
sDrilling, nType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, 0, bDrillDown)
|
||||
if not sDrilling then
|
||||
nErrorCode = 1
|
||||
end
|
||||
@@ -244,7 +246,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
-- se ho passato altezza di taglio utensile allora rifaccio la ricerca senza passare altezza utensile
|
||||
if dCheckDepth2 then
|
||||
dCheckDepth2 = nil
|
||||
sDrilling2, nType2, dMaxDepth2, dMaxToolLength2, dToolDiam2, dDiamTh2, dToolFreeLen2 = ML.FindDrilling( dDiam, nil, bDrillDown)
|
||||
sDrilling2, nType2, dMaxDepth2, dMaxToolLength2, dToolDiam2, dDiamTh2, dToolFreeLen2 = ML.FindDrilling( dDiam, 0, bDrillDown)
|
||||
end
|
||||
if not sDrilling2 then
|
||||
nErrorCode = 1
|
||||
@@ -258,7 +260,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
nErrorCode = 2
|
||||
-- rifaccio ricerca lavorazione senza specificare la profondità (dovrebbe trovare l'utensile più corto)
|
||||
else
|
||||
sDrilling2, nType2, dMaxDepth2, dMaxToolLength2, dToolDiam2, dDiamTh2, dToolFreeLen2 = ML.FindDrilling( dDiam, nil, bDrillDown)
|
||||
sDrilling2, nType2, dMaxDepth2, dMaxToolLength2, dToolDiam2, dDiamTh2, dToolFreeLen2 = ML.FindDrilling( dDiam, 0, bDrillDown)
|
||||
if not sDrilling2 then
|
||||
nErrorCode = 1
|
||||
end
|
||||
@@ -396,6 +398,12 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
sUserNotes = sUserNotes .. 'Open=1;'
|
||||
end
|
||||
end
|
||||
-- se lavorazione in doppio
|
||||
if EgtExistsInfo( Proc.Id, 'MAIN') then
|
||||
sUserNotes = sUserNotes .. 'Double;'
|
||||
elseif EgtExistsInfo( Proc.Id, 'DOU') then
|
||||
sUserNotes = sUserNotes .. 'Main;'
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
-- eseguo
|
||||
local bOk = EgtApplyMachining( true, false)
|
||||
|
||||
Reference in New Issue
Block a user