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:
@@ -1,4 +1,4 @@
|
||||
-- ProcessProfCamb.lua by Egaltech s.r.l. 2020/02/18
|
||||
-- ProcessProfCamb.lua by Egaltech s.r.l. 2020/03/04
|
||||
-- Gestione calcolo profilo caudato per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -88,7 +88,7 @@ local function ModifySideAndInvert( Proc, bHead, dToolDiam)
|
||||
local bInvertMode = EgtGetMachiningParam( MCH_MP.INVERT)
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, not bInvertMode)
|
||||
-- riapplico la lavorazione
|
||||
EgtApplyMachining()
|
||||
EgtApplyMachining( true, false)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -117,7 +117,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
|
||||
@@ -130,20 +129,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
|
||||
@@ -439,8 +424,8 @@ function ProcessProfCamb.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
|
||||
@@ -451,7 +436,7 @@ function ProcessProfCamb.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
|
||||
@@ -497,8 +482,8 @@ function ProcessProfCamb.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
|
||||
@@ -509,7 +494,7 @@ function ProcessProfCamb.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
|
||||
|
||||
Reference in New Issue
Block a user