DataBeam :
- modifiche per ottimizzazione con più teste - modifiche per compilazione.
This commit is contained in:
+13
-20
@@ -116,7 +116,7 @@ local function ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst,
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEndAddLen)
|
||||
end
|
||||
-- riapplico la lavorazione
|
||||
EgtApplyMachining( true, false)
|
||||
ML.ApplyMachining( true, false)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -161,19 +161,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)
|
||||
@@ -335,7 +331,7 @@ function ProcessProfHead.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
|
||||
@@ -387,7 +383,7 @@ function ProcessProfHead.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
|
||||
@@ -403,10 +399,7 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
if nChamfer < 2 then
|
||||
-- recupero la lavorazione
|
||||
local sMillType = 'Prof'
|
||||
local sMilling = ML.FindMilling( sMillType .. EgtIf( bMillDown, '_H2', ''))
|
||||
if not sMilling then
|
||||
sMilling = ML.FindMilling( sMillType)
|
||||
end
|
||||
local sMilling = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bMillDown)
|
||||
if not sMilling then
|
||||
local sErr = 'Error : milling not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -491,7 +484,7 @@ function ProcessProfHead.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
|
||||
@@ -516,7 +509,7 @@ function ProcessProfHead.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
|
||||
@@ -554,7 +547,7 @@ function ProcessProfHead.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
|
||||
@@ -579,7 +572,7 @@ function ProcessProfHead.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
|
||||
@@ -625,7 +618,7 @@ function ProcessProfHead.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( nMchV2Id, false)
|
||||
return false, sErr
|
||||
@@ -665,7 +658,7 @@ function ProcessProfHead.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