DataBeam :

- allungati grezzi di pezzi corti da View di B&W
- migliorato ordinamento di feature lunghe rispetto alle standard
- nei fori si premia il più possibile ricerca punta con adeguato affondamento
- migliorata gestione lame sui tagli longitudinali con teste da sotto
- in profilo di testa cambered (3/4-103-X) estesa gestione di eventuale testa da sotto.
This commit is contained in:
DarioS
2021-09-19 17:06:49 +02:00
parent 2386a280b9
commit 6942aac9e2
5 changed files with 451 additions and 159 deletions
+22 -10
View File
@@ -1,7 +1,8 @@
-- ProcessProfCamb.lua by Egaltech s.r.l. 2021/06/28
-- ProcessProfCamb.lua by Egaltech s.r.l. 2021/09/15
-- Gestione calcolo profilo caudato 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.
-- 2021/09/15 Estesa gestione di testa da sotto, se presente.
-- Tabella per definizione modulo
local ProcessProfCamb = {}
@@ -233,6 +234,8 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
elseif vtN:getZ() < -0.1 then
nSide = -1
end
-- abilitazione lavorazione da sotto
local bMillDown = ( BD.DOWN_HEAD and nSide == -1)
-- recupero gruppo per geometria addizionale
local nAddGrpId = BL.GetAddGroup( nPartId)
if not nAddGrpId then
@@ -282,7 +285,11 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- leggo anticipatamente i parametri utensile fresa per dare un valore opportuno all'elevazione della lama
-- recupero la lavorazione di fresatura
sMilling = ML.FindMilling( 'Prof')
local sMillType = 'Prof'
sMilling = ML.FindMilling( sMillType .. EgtIf( bMillDown, '_H2', ''))
if not sMilling then
sMilling = ML.FindMilling( sMillType)
end
if not sMilling then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' milling not found in library'
EgtOutLog( sErr)
@@ -298,9 +305,13 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
end
-- se non da sotto e abilitato dal parametro Q aggiungo taglio di lama
if nSide ~= -1 and nLastFacet and EgtGetInfo( Proc.Id, sEnableExtraBladeUpperFace, 'i') == 1 then
if ( nSide ~= -1 or bMillDown) and nLastFacet and EgtGetInfo( Proc.Id, sEnableExtraBladeUpperFace, 'i') == 1 then
-- recupero la lavorazione
local sCutting = ML.FindCutting( 'HeadSide')
local sCutType = 'HeadSide'
local sCutting = ML.FindCutting( sCutType .. EgtIf( bMillDown, '_H2', ''))
if not sCutting then
sCutting = ML.FindCutting( sCutType)
end
if not sCutting then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' sawing not found in library'
EgtOutLog( sErr)
@@ -318,7 +329,8 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
dToolThick = EgtTdbGetCurrToolParam(MCH_TP.THICK) or dToolThick
end
end
local vtOrthoO = Vector3d(vtN)
local vtOrthoO = Vector3d( vtN)
local dVzLimDwnUp = EgtIf( bMillDown, -2, nil)
local bOk, sNameOrErr = BL.MakeOneFaceBySaw( Proc.Id, nLastFacet, sCutting, dToolDiam, vtOrthoO, nil, -((dMillDiam/2)+1), BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
end
end
@@ -336,7 +348,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- se lavorazione da sopra o da sotto
-- se profilo sopra o sotto (lavorazioni di fianco)
if nSide ~= 0 then
bDoubleCham = true
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
@@ -345,7 +357,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
end
-- altrimenti lavorazione dal davanti o dal dietro
-- altrimenti profilo davanti o dietro (lavorazioni da sopra e/o sotto)
else
bDoubleCham = BD.DOWN_HEAD
-- se fresa verso il basso, la porto verso l'alto
@@ -620,7 +632,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
end
-- se non da sotto e parametro Q abilitato, inserisco lavorazione finitura angolo
if nSide ~= -1 and EgtGetInfo( Proc.Id, sEnableExtraMillUpperFace, 'i') == 1 then
if ( nSide ~= -1 or bMillDown) and EgtGetInfo( Proc.Id, sEnableExtraMillUpperFace, 'i') == 1 then
sName = 'ProfV_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchVId = EgtAddMachining( sName, sMilling)
if not nMchVId then
@@ -637,8 +649,8 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.OFFSR, -0.5)
-- imposto tipo uso faccia
local nFaceUse = MCH_MILL_FU.ORTHO_DOWN
if nSide ~= 1 then
local nFaceUse = EgtIf( bMillDown, MCH_MILL_FU.ORTHO_TOP, MCH_MILL_FU.ORTHO_DOWN)
if nSide == 0 then
nFaceUse = EgtIf( vtN:getY() > 0.1, MCH_MILL_FU.ORTHO_FRONT, MCH_MILL_FU.ORTHO_BACK)
end
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)