DataBeam :
- aggiunto modulo FaceByPocket per lavorazione per svuotatura di una faccia da sorgenti in tenone - aggiunta possibilità di svuotatura per piano sgrossatura profili su macchine PF e pezzi alti - aggiunto modulo GetBeamData.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
-- ProcessProfFront.lua by Egaltech s.r.l. 2022/05/24
|
||||
-- ProcessProfFront.lua by Egaltech s.r.l. 2022/05/28
|
||||
-- Gestione calcolo profilo frontale per Travi
|
||||
-- 2021/05/03 Aggiunta gestione smusso da sopra e sotto per macchina con testa da sotto.
|
||||
-- 2021/06/28 Per macchine con testa sotto, smussi di lato con questa testa se non c'è lav.ne da sopra.
|
||||
-- 2022/02/02 Aggiunta funzione OnlyChamfer.
|
||||
-- 2022/05/24 Aggiunta fresatura da sotto su macchine con testa da sotto.
|
||||
-- 2022/05/28 Aggiunto calcolo svuotatura da modulo di libreria.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessProfFront = {}
|
||||
@@ -11,6 +12,7 @@ local ProcessProfFront = {}
|
||||
-- Include
|
||||
require( 'EgtBase')
|
||||
local BL = require( 'BeamLib')
|
||||
local Fbp = require( 'FaceByPocket')
|
||||
local Cut = require( 'ProcessCut')
|
||||
|
||||
EgtOutLog( ' ProcessProfFront started', 1)
|
||||
@@ -229,19 +231,38 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
if nChamfer < 0 then
|
||||
return false, sChamfer
|
||||
end
|
||||
-- se smusso non è esclusivo, aggiungo sgrossatura con taglio di lama
|
||||
-- se smusso non è esclusivo, aggiungo sgrossatura
|
||||
if nChamfer < 2 then
|
||||
-- aggiungo taglio di lama di sgrossatura e lo lavoro
|
||||
-- aggiungo piano di sgrossatura e lo lavoro
|
||||
local ptStart, vtNP = GetSawCutData( AuxId, vtN)
|
||||
local AddId = EgtSurfTmPlaneInBBox( nAddGrpId, ptStart, vtNP, b3Solid, GDB_RT.GLOB)
|
||||
if AddId and BL.GetFaceElevation( AddId, 0, nPartId) > 20.0 then
|
||||
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
|
||||
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
|
||||
-- applico la lavorazione
|
||||
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
|
||||
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
|
||||
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
if not bOk then return bOk, sErr end
|
||||
-- se macchina PF o ONE e profilo sopra davanti e pezzo alto applico svuotatura
|
||||
if BD.C_SIMM and not BD.DOWN_HEAD and vtNP:getZ() > 0 and vtNP:getX() > 0 and b3Raw:getDimZ() > 550 then
|
||||
-- recupero la lavorazione
|
||||
local sPockType = 'OpenPocket'
|
||||
local sPocketing = ML.FindPocketing( sPockType, nil, nil, nil, true, false)
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : pocketing '..sPockType..' not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- eseguo le svuotature necessarie
|
||||
local bOk, sErr = Fbp.Make( Proc, AddId, 0, sPocketing, nPartId, b3Solid)
|
||||
if not bOk then
|
||||
return false, sErr
|
||||
end
|
||||
-- altrimenti applico taglio di lama
|
||||
else
|
||||
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
|
||||
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
|
||||
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
if not bOk then
|
||||
return false, sErr
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- se devo inserire il chamfer
|
||||
|
||||
Reference in New Issue
Block a user