DataBeam :

- migliorie e correzioni in ProfCambered (103) e ProfHead (106) per lavorazione con testa da sotto.
This commit is contained in:
DarioS
2021-10-13 15:39:04 +02:00
parent aa6f7abec4
commit 24bcc8cabf
2 changed files with 36 additions and 29 deletions
+20 -13
View File
@@ -1,7 +1,8 @@
-- ProcessProfHead.lua by Egaltech s.r.l. 2021/06/28
-- ProcessProfHead.lua by Egaltech s.r.l. 2021/10/12
-- Gestione calcolo profilo di testa per Travi
-- 2021/05/03 Aggiunta gestione smusso da sopra e sotto per macchina con testa sotto.
-- 2021/06/28 Per macchine con testa sotto, smussi di lato con questa testa se non c'è lav.ne da sopra.
-- 2021/10/12 Estesa gestione di testa da sotto, se presente.
-- Tabella per definizione modulo
local ProcessProfHead = {}
@@ -140,11 +141,11 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly
if abs( vtExtr:getZ()) > 0.1 then
if not bMakeVertCham then
if nChamfer == 2 then -- se devo fare solo smusso, genero errore
local sErr = 'Error : not horizontale chamfer'
local sErr = 'Error : not horizontal chamfer'
EgtOutLog( sErr)
return -1, dDepth, sErr
else
local sWarn = 'Warning : skipped not horizontale chamfer'
local sWarn = 'Warning : skipped not horizontal chamfer'
EgtOutLog( sWarn)
return 0, dDepth
end
@@ -153,16 +154,16 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly
-- recupero la lavorazione
local sMilling, sMilling2
if nChamfer > 0 then
sMilling = ML.FindMilling( 'Mark')
if BD.DOWN_HEAD and abs( vtExtr:getZ()) < 0.1 and BD.DH_MAX_TOP and ( Proc.Box:getMax():getZ() - b3Raw:getMax():getZ()) < BD.DH_MAX_TOP then
sMilling = ML.FindMilling( 'Mark_H2')
if not sMilling then sMilling = ML.FindMilling( 'Mark') end
else
sMilling = ML.FindMilling( 'Mark')
end
if not sMilling then
if BD.DOWN_HEAD and abs( vtExtr:getZ()) < 0.1 then
sMilling = ML.FindMilling( 'Mark_H2')
end
if not sMilling then
local sErr = 'Error : chamfer not found in library'
EgtOutLog( sErr)
return -1, 0, sErr
end
local sErr = 'Error : chamfer not found in library'
EgtOutLog( sErr)
return -1, 0, sErr
end
if BD.DOWN_HEAD and abs( vtExtr:getZ()) > 0.9 then
sMilling2 = ML.FindMilling( 'Mark_H2')
@@ -229,6 +230,8 @@ function ProcessProfHead.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)
-- verifico se necessari ripassi negli angoli
local vAngs = {}
for i = 1, Proc.Fct do
@@ -392,7 +395,11 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- se il chamfer non è esclusivo continuo con le altre lavorazioni
if nChamfer < 2 then
-- recupero la lavorazione
local sMilling = ML.FindMilling( 'Prof')
local sMillType = 'Prof'
local sMilling = ML.FindMilling( sMillType .. EgtIf( bMillDown, '_H2', ''))
if not sMilling then
sMilling = ML.FindMilling( sMillType)
end
if not sMilling then
local sErr = 'Error : milling not found in library'
EgtOutLog( sErr)