DataBeam :
- modifiche per ottimizzazione con più teste - modifiche per compilazione.
This commit is contained in:
+13
-21
@@ -135,7 +135,7 @@ local function ModifySideAndInvert( Proc, bHead, bForceInvert, nCutLengthMach)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, nCutLengthMach)
|
||||
end
|
||||
-- riapplico la lavorazione
|
||||
EgtApplyMachining( true, false)
|
||||
ML.ApplyMachining( true, false)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -181,19 +181,15 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly
|
||||
-- recupero la lavorazione
|
||||
local sMilling, sMilling2
|
||||
if nChamfer > 0 then
|
||||
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
|
||||
local bDownHead = 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
|
||||
sMilling = ML.FindMilling( 'Mark_H2', nil, nil, nil, nil, true, bDownHead)
|
||||
if not sMilling then
|
||||
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')
|
||||
sMilling2 = ML.FindMilling( 'Mark_H2', nil, nil, nil, nil, false, true)
|
||||
if not sMilling2 then
|
||||
local sErr = 'Error : chamfer2 not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -296,11 +292,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
-- leggo anticipatamente i parametri utensile fresa per dare un valore opportuno all'elevazione della lama
|
||||
-- recupero la lavorazione di fresatura
|
||||
local sMillType = 'Prof'
|
||||
sMilling = ML.FindMilling( sMillType .. EgtIf( bMillDown, '_H2', ''))
|
||||
if not sMilling and bMillDown then
|
||||
sMilling = ML.FindMilling( sMillType)
|
||||
bMillDown = false
|
||||
end
|
||||
sMilling, _, _, bMillDown = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bMillDown)
|
||||
if not sMilling then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' milling not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -319,7 +311,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
if ( nSide ~= -1 or bMillDown) and nLastFacet and EgtGetInfo( Proc.Id, sEnableExtraBladeUpperFace, 'i') == 1 then
|
||||
-- recupero la lavorazione
|
||||
local sCutType = 'HeadSide'
|
||||
local sCutting = ML.FindCutting( sCutType .. EgtIf( bMillDown, '_H2', ''))
|
||||
local sCutting = ML.FindCutting( sCutType, not bMillDown, bMillDown)
|
||||
-- se richiesto taglio con lama da sotto e non trovato non posso utilizzare quello da sopra
|
||||
if not sCutting then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' sawing not found in library'
|
||||
@@ -390,7 +382,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
-- posizione braccio porta testa
|
||||
EgtSetMachiningParam( MCH_MP.SCC, EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM))
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
@@ -437,7 +429,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
-- posizione braccio porta testa
|
||||
EgtSetMachiningParam( MCH_MP.SCC, EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM))
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
@@ -516,7 +508,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
bFinish = true
|
||||
end
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
@@ -554,7 +546,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dOriOffset)
|
||||
EgtSetMachiningParam( MCH_MP.STEP, dToolMaxMat)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMch2Id, false)
|
||||
return false, sErr
|
||||
@@ -594,7 +586,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, ( dOriOffset + dOffsetPar))
|
||||
end
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
@@ -632,7 +624,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dOriOffset)
|
||||
EgtSetMachiningParam( MCH_MP.STEP, dToolMaxMat)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMch2Id, false)
|
||||
return false, sErr
|
||||
@@ -670,7 +662,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchVId, false)
|
||||
return false, sErr
|
||||
|
||||
Reference in New Issue
Block a user