DataBeam :
- aggiunta gestione lavorazioni da sotto con rinvio in DtMortise e Mortise.
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
-- ProcessDtMortise.lua by Egaltech s.r.l. 2021/06/28
|
||||
-- ProcessDtMortise.lua by Egaltech s.r.l. 2021/07/20
|
||||
-- Gestione calcolo mortase a coda di rondine per Travi
|
||||
-- 2021/04/08 Aggiunto controllo massimo materiale lavorabile dalla fresa.
|
||||
-- 2021/04/08 Miglioria scelta lavorazione in presenza di testa da sotto.
|
||||
-- 2021/06/28 Aggiunta gestione attacco e uscita con pocket.
|
||||
-- 2021/07/20 Aggiunta gestione rinvio angolare su FAST.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessDtMortise = {}
|
||||
@@ -63,7 +64,13 @@ function ProcessDtMortise.Classify( Proc)
|
||||
AuxId = AuxId + Proc.Id
|
||||
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
||||
-- verifico se la mortasa è lavorabile solo da sotto
|
||||
local bDown = ( vtExtr:getZ() < - 0.1)
|
||||
local bDown = ( vtExtr:getZ() < -0.1)
|
||||
-- se da sotto e presente rinvio angolare verifico se c'è opportuna lavorazione
|
||||
if bDown and BD.ANG_TRASM then
|
||||
if ML.FindMilling( 'DtMortise_AT') then
|
||||
bDown = false
|
||||
end
|
||||
end
|
||||
return true, bDown
|
||||
end
|
||||
|
||||
@@ -131,9 +138,9 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
-- recupero i dati della curva
|
||||
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
||||
local ptBC = EgtGP( AuxId, GDB_RT.GLOB)
|
||||
-- verifico che la mortasa non sia orientata verso il basso (-5 deg) o che ci sia una testa da sotto
|
||||
local bFaceDown = ( vtExtr:getZ() < - 0.1)
|
||||
if bFaceDown and not BD.DOWN_HEAD then
|
||||
-- verifico che la mortasa non sia orientata verso il basso (-5 deg) o che ci sia una testa da sotto o un rinvio angolare
|
||||
local bFaceDown = ( vtExtr:getZ() < -0.1)
|
||||
if bFaceDown and not BD.DOWN_HEAD and not BD.ANG_TRASM then
|
||||
local sErr = 'Machining from bottom impossible : Error on DtMortise ' .. tostring( Proc.Id)
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
@@ -180,9 +187,15 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
-- abilitazione lavorazione da sotto
|
||||
local bMillUp = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.259)
|
||||
local bMillDown = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.174)
|
||||
local bMillAngTrasm = ( BD.ANG_TRASM and vtExtr:getZ() < -0.1)
|
||||
-- recupero la lavorazione
|
||||
local sMillType = 'DtMortise'
|
||||
local sMchExt = EgtIf( bMillDown, '_H2', '')
|
||||
local sMchExt = ''
|
||||
if bMillDown then
|
||||
sMchExt = '_H2'
|
||||
elseif bMillAngTrasm then
|
||||
sMchExt = '_AT'
|
||||
end
|
||||
-- recupero la lavorazione : prima ricerca per sola tipologia
|
||||
local sMilling = ML.FindMilling( sMillType..sMchExt)
|
||||
if not sMilling and bMillUp then
|
||||
@@ -243,11 +256,15 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
end
|
||||
-- recupero la lavorazione
|
||||
local sPocketing
|
||||
if Proc.Prc ~= 53 then
|
||||
sPocketing = ML.FindPocketing( 'Mortise'..sMchExt, dToolDiam)
|
||||
sPocketing = ML.FindPocketing( 'Mortise'..sMchExt, dToolDiam)
|
||||
if not sPocketing and bMillUp then
|
||||
sPocketing = ML.FindPocketing( 'Mortise', dToolDiam)
|
||||
end
|
||||
if not sPocketing then
|
||||
sPocketing = ML.FindPocketing( 'Pocket'..sMchExt, dToolDiam)
|
||||
if not sPocketing and bMillUp then
|
||||
sPocketing = ML.FindPocketing( 'Pocket', dToolDiam)
|
||||
end
|
||||
end
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : Mortise or Pocket not found in library'
|
||||
|
||||
Reference in New Issue
Block a user