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
+19 -6
View File
@@ -1,4 +1,4 @@
-- ProcessProfCamb.lua by Egaltech s.r.l. 2020/11/17
-- ProcessProfCamb.lua by Egaltech s.r.l. 2020/11/19
-- Gestione calcolo profilo caudato per Travi
-- Tabella per definizione modulo
@@ -23,7 +23,8 @@ local sOverMaterialForFinish = 'Q04' -- d
local sPreemptiveChamfer = 'Q05' -- i
-- abilitazioni extra
dMakeAntiSplintOnHead = 0 -- valore impronta antischeggia, per disattivare settare = nil o = 0
local dMakeAntiSplintOnHead = 1 -- valore impronta antischeggia, per disattivare settare = nil o = 0
local dActivateCompoAng = 0.175 -- valore componente Y per disattivare settare = nil
---------------------------------------------------------------------
-- Riconoscimento della feature
@@ -236,6 +237,18 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local dToolMaxDepth = 0
local dMillDiam = 0
local sMilling
-- in base alla direzione iniziale della curva e al valore di entrata valido, setto l'antischeggia
local bMakeAs
local vtStart = EgtSV( AuxId, GDB_ID.ROOT)
if nSide == 0 then
if abs(vtStart:getY()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs(dMakeAntiSplintOnHead) > 0 then
bMakeAs = true
end
else
if abs(vtStart:getZ()) >= dActivateCompoAng and dMakeAntiSplintOnHead and abs(dMakeAntiSplintOnHead) > 0 then
bMakeAs = true
end
end
-- se smusso non è esclusivo, aggiungo sgrossatura con taglio di lama
if nChamfer < 2 then
-- aggiungo taglio di lama di sgrossatura e lo lavoro
@@ -392,7 +405,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local dDepth = min( dToolMaxDepth, dProfDepth / 2 + BD.MILL_OVERLAP)
-- inserisco la lavorazione
local sName
if dMakeAntiSplintOnHead and abs(dMakeAntiSplintOnHead) > 0 then
if bMakeAs then
sName = 'Prof_As_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
else
sName = 'Prof_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
@@ -463,7 +476,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
ModifySideAndInvert( Proc, bHead)
end
-- se devo fare l'antischeggia in testa
if dMakeAntiSplintOnHead and abs(dMakeAntiSplintOnHead) > 0 then
if bMakeAs then
local sNewName = 'Prof_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
-- copio lavorazione per ingresso antischeggia (la copia è la lavorazione finale)
local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId))
@@ -502,7 +515,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
if bDouble then
-- inserisco la lavorazione
local sName
if dMakeAntiSplintOnHead and abs(dMakeAntiSplintOnHead) > 0 then
if bMakeAs then
sName = 'ProfB_As_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
else
sName = 'ProfB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
@@ -541,7 +554,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
ModifySideAndInvert( Proc, bHead)
end
-- se devo fare l'antischeggia in testa
if dMakeAntiSplintOnHead and abs(dMakeAntiSplintOnHead) > 0 then
if bMakeAs then
local sNewName = 'ProfB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
-- copio lavorazione per ingresso antischeggia (la copia è la lavorazione finale)
local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId))