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
+16 -16
View File
@@ -1,8 +1,8 @@
-- ProcessProfCamb.lua by Egaltech s.r.l. 2021/09/15
-- ProcessProfCamb.lua by Egaltech s.r.l. 2021/10/12
-- 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.
-- 2021/10/12 Estesa gestione di testa da sotto, se presente.
-- Tabella per definizione modulo
local ProcessProfCamb = {}
@@ -146,7 +146,7 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly
nChamfer = nChamfer + 1
-- altrimenti se non ho l'affondamento esco
else
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' no chamfer depth'
local sErr = 'Error : no chamfer depth'
EgtOutLog( sErr)
return -1, dDepth, sErr
end
@@ -171,16 +171,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')
@@ -204,7 +204,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local Ls = EgtGetFirstNameInGroup( nPartId, 'Box')
local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD)
if not b3Solid then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' part box not found'
local sErr = 'Error : part box not found'
EgtOutLog( sErr)
return false, sErr
end
@@ -212,7 +212,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
if AuxId then AuxId = AuxId + Proc.Id end
if not AuxId or ( EgtGetType( AuxId) & GDB_FY.GEO_CURVE) == 0 then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' missing profile geometry'
local sErr = 'Error : missing profile geometry'
EgtOutLog( sErr)
return false, sErr
end
@@ -239,7 +239,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- recupero gruppo per geometria addizionale
local nAddGrpId = BL.GetAddGroup( nPartId)
if not nAddGrpId then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' missing AddGroup'
local sErr = 'Error : missing AddGroup'
EgtOutLog( sErr)
return false, sErr
end
@@ -331,7 +331,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
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)
local bOk, sNameOrErr = BL.MakeOneFaceBySaw( Proc.Id, nLastFacet, sCutting, dToolDiam, vtOrthoO, dVzLimDwnUp, -((dMillDiam/2)+1), BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
end
end
-- se devo inserire il chamfer