DataBeam :

- aggiunta possibilità di foro su spigolo di L20 da parametro Q
- corretti profili per copia lavorazione di sgrossatura per finitura con nome originale e non effettivo.
This commit is contained in:
Dario Sassi
2020-03-05 17:16:45 +00:00
parent d5cb4e3df8
commit 901ba42814
8 changed files with 294 additions and 165 deletions
+9 -24
View File
@@ -1,4 +1,4 @@
-- ProcessProfConcave.lua by Egaltech s.r.l. 2020/02/18
-- ProcessProfConcave.lua by Egaltech s.r.l. 2020/03/04
-- Gestione calcolo profilo caudato per Travi
-- Tabella per definizione modulo
@@ -77,7 +77,7 @@ local function ModifySideAndInvertAndLead( Proc, bHead, dToolDiam, bNotModifLead
EgtSetMachiningParam( MCH_MP.ENDADDLEN, (dToolDiam/3*2))
end
-- riapplico la lavorazione
EgtApplyMachining()
EgtApplyMachining( true, false)
else
-- modifico attacco e uscita
if not bNotModifLeadPar then
@@ -86,7 +86,7 @@ local function ModifySideAndInvertAndLead( Proc, bHead, dToolDiam, bNotModifLead
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, 0)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, (dToolDiam/3*2))
-- riapplico la lavorazione
EgtApplyMachining()
EgtApplyMachining( true, false)
end
end
end
@@ -116,7 +116,6 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly
-- recupero i dati della curva e del profilo
local dWidth = abs( EgtCurveThickness( AuxId))
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
local nCanVert = 0
-- eseguo lo smusso solo se direzione orizzontale e il flag di lavorazione verticale è disabilitato
if abs( vtExtr:getZ()) > 0.1 then
if not bMakeVertCham then
@@ -129,20 +128,6 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly
EgtOutLog( sWarn)
return 0, dDepth
end
else
nCanVert = 1
end
end
-- eseguo lo smusso solo se feature larga come la trave
if dWidth < EgtIf( nCanVert == 1, b3Raw:getDimZ(), b3Raw:getDimY()) - 1 then
if nChamfer == 2 then -- se devo fare solo smusso, genero errore
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' feature smaller than beam'
EgtOutLog( sErr)
return -1, dDepth, sErr
else
local sWarn = 'Warning on process ' .. tostring( Proc.Id) .. ' skipped chamfer (feature smaller than beam)'
EgtOutLog( sWarn)
return 0, dDepth
end
end
-- recupero la lavorazione
@@ -416,8 +401,8 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
if bFinish then
-- inserisco la lavorazione
local sNewName = 'Prof_Fin_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchId = EgtCopyMachining( sNewName, sName)
if not nMchId then
local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId))
if not nMch2Id then
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
EgtOutLog( sErr)
return false, sErr
@@ -428,7 +413,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch2Id, false)
return false, sErr
end
end
@@ -475,8 +460,8 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
if bFinish then
-- inserisco la lavorazione
local sNewName = 'ProfB_Fin_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchId = EgtCopyMachining( sNewName, sName)
if not nMchId then
local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId))
if not nMch2Id then
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
EgtOutLog( sErr)
return false, sErr
@@ -487,7 +472,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch2Id, false)
return false, sErr
end
end