DataBeam :
- modifiche per ottimizzazione con più teste - modifiche per compilazione.
This commit is contained in:
+16
-20
@@ -99,7 +99,7 @@ local function MakeSideFace( nId, nFac, nSide, sMilling, dToolDiam, bForcedLim,
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LOTANG, dToolDiam / 2 + 30)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
@@ -114,7 +114,7 @@ local function MakeAntiSplintBySaw( Proc, nFacet, vtN, b3Raw, nFacInd, bReduceDe
|
||||
if sMasterCutting and #sMasterCutting > 0 then
|
||||
sCutting = sMasterCutting
|
||||
else
|
||||
sCutting = ML.FindCutting( 'HeadSide' .. EgtIf( bMillDown, '_H2', ''))
|
||||
sCutting = ML.FindCutting( 'HeadSide', not bMillDown, bMillDown)
|
||||
end
|
||||
if not sCutting then
|
||||
local sErr = 'Error : HeadSide (cutting) not found in library'
|
||||
@@ -261,7 +261,7 @@ local function ManageAntiSplintBySaw( Proc, b3Raw, bIsU, vtN, nFacet, nFacInd, s
|
||||
EgtSetMachiningParam( MCH_MP.SCC, nPrevSCC)
|
||||
end
|
||||
-- rieseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nIdMach, false)
|
||||
return false, false, sErr
|
||||
@@ -320,10 +320,10 @@ local function MakeByPocketing( Proc, nPhase, nRawId, nPartId)
|
||||
sNotes = sNotes .. 'VMRS=0;'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
-- provo ad allargare leggermente la tasca
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, -0.1)
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
@@ -473,7 +473,7 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
||||
local dMaxDepthDn = 0
|
||||
-- recupero la lavorazione
|
||||
if bCanUseUnderBlade then
|
||||
sCuttingDn = ML.FindCutting( 'HeadSide_H2')
|
||||
sCuttingDn = ML.FindCutting( 'HeadSide_H2', false, true)
|
||||
if not sCuttingDn then
|
||||
local sErr = 'Error : sawing HeadSide_H2 not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -668,12 +668,7 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
||||
-- determino la massima elevazione
|
||||
local dElev = BL.GetFaceElevation( Proc.Id, 0, nPartId)
|
||||
-- recupero la lavorazione
|
||||
local sMilling
|
||||
if bCanUseUnderBlade then
|
||||
sMilling = ML.FindMilling( 'Long2Cut_H2', dElev)
|
||||
else
|
||||
sMilling = ML.FindMilling( 'Long2Cut', dElev)
|
||||
end
|
||||
local sMilling = ML.FindMilling( 'Long2Cut_H2', dElev, nil, nil, nil, not bCanUseUnderBlade, bCanUseUnderBlade)
|
||||
if not sMilling then
|
||||
local sErr = 'Error : milling Long2Cut (_H2) not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -846,7 +841,7 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
||||
-- imposto posizione braccio porta testa per non ingombrare agli estremi
|
||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
@@ -859,8 +854,9 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
||||
-- determino la massima elevazione
|
||||
local dElev = BL.GetFaceElevation( Proc.Id, 0, nPartId)
|
||||
-- recupero la lavorazione
|
||||
local sMchType = EgtIf( nSide ~= - 1, 'Long2Cut', 'Long2Cut_H2')
|
||||
local sMilling = ML.FindMilling( sMchType, dElev)
|
||||
local bDownHead = ( nSide == - 1)
|
||||
sMchType = EgtIf( bDownHead, 'Long2Cut_H2', 'Long2Cut')
|
||||
local sMilling = ML.FindMilling( sMchType, dElev, nil, nil, nil, not bDownHead, bDownHead)
|
||||
if not sMilling then
|
||||
local sErr = 'Error : milling '..sMchType..' not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -1014,7 +1010,7 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
||||
local dDepth = min( 0, dMaxDepth - dElev )
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
@@ -1076,7 +1072,7 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
||||
-- se testa da sotto
|
||||
if nSide ~= 1 and BD.DOWN_HEAD then
|
||||
sMchTypeDn = 'Long2CutSide_H2'
|
||||
sMillingDn = ML.FindMilling( sMchTypeDn)
|
||||
sMillingDn = ML.FindMilling( sMchTypeDn, nil, nil, nil, nil, false, true)
|
||||
sPrefixDn = 'L2CSH2_'
|
||||
end
|
||||
-- lavorazione da sotto
|
||||
@@ -1091,7 +1087,7 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
||||
-- se testa da sotto
|
||||
if BD.DOWN_HEAD then
|
||||
sMchTypeDn = 'Long2CutDown_H2'
|
||||
sMillingDn = ML.FindMilling( sMchTypeDn)
|
||||
sMillingDn = ML.FindMilling( sMchTypeDn, nil, nil, nil, nil, false, true)
|
||||
sPrefixDn = 'L2CDH2_'
|
||||
end
|
||||
end
|
||||
@@ -1399,12 +1395,12 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, dLioPerp1)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, dLioPerp1)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
-- se feature orientata su faccia da sotto provo a cambiare l'attacco
|
||||
if nSide == -1 then
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, min( dLioPerp1, dLioPerp2))
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, min( dLioPerp1, dLioPerp2))
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
-- esco se non sono nella seconda lavorazione o non nella faccia da sotto
|
||||
|
||||
Reference in New Issue
Block a user