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 @@
-- ProcessProfFront.lua by Egaltech s.r.l. 2020/02/07
-- ProcessProfFront.lua by Egaltech s.r.l. 2020/03/04
-- Gestione calcolo profilo caudato per Travi
-- Tabella per definizione modulo
@@ -68,7 +68,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
@@ -77,7 +77,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
@@ -107,7 +107,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
@@ -120,20 +119,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
@@ -411,8 +396,8 @@ function ProcessProfFront.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
@@ -423,7 +408,7 @@ function ProcessProfFront.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
@@ -470,8 +455,8 @@ function ProcessProfFront.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
@@ -482,7 +467,7 @@ function ProcessProfFront.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