DataBeam :
- modifiche per ottimizzazione con più teste - modifiche per compilazione.
This commit is contained in:
+56
-59
@@ -318,16 +318,16 @@ local function VerifyChainSaw( Proc, dMinDim, dMaxDim)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function VerifyPocket( Proc, dDiam, dDepth, dMaxTotLen, sMchFindMaster)
|
||||
local function VerifyPocket( Proc, dDiam, dDepth, dMaxTotLen, sMchFindMaster, bPocketDown)
|
||||
-- tipo di svuotatura
|
||||
local sMchFind = EgtIf( sMchFindMaster and #sMchFindMaster > 0, sMchFindMaster, 'Pocket')
|
||||
-- ricerca della svuotatura
|
||||
local sPocketing
|
||||
if dDepth then
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam, dDepth, dMaxTotLen) or
|
||||
ML.FindPocketing( sMchFind, dDiam, 0.8 * dDepth, dMaxTotLen) or
|
||||
ML.FindPocketing( sMchFind, dDiam, 0.6 * dDepth, dMaxTotLen) or
|
||||
ML.FindPocketing( sMchFind, dDiam, 0.4 * dDepth, dMaxTotLen) or
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam, dDepth, dMaxTotLen, not bPocketDown, bPocketDown) or
|
||||
ML.FindPocketing( sMchFind, dDiam, 0.8 * dDepth, dMaxTotLen, not bPocketDown, bPocketDown) or
|
||||
ML.FindPocketing( sMchFind, dDiam, 0.6 * dDepth, dMaxTotLen, not bPocketDown, bPocketDown) or
|
||||
ML.FindPocketing( sMchFind, dDiam, 0.4 * dDepth, dMaxTotLen, not bPocketDown, bPocketDown) or
|
||||
ML.FindPocketing( sMchFind, dDiam, 0, dMaxTotLen)
|
||||
else
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam, 0, dMaxTotLen)
|
||||
@@ -857,7 +857,7 @@ local function MakeOneFaceByMill( Proc, nPhase, nRawId, nPartId)
|
||||
-- dichiaro non si generano sfridi per VMill
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, 'VMRS=0;')
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
@@ -894,9 +894,9 @@ local function MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHead)
|
||||
-- recupero la lavorazione
|
||||
local sMilling
|
||||
if nUseRM and nUseRM == 1 then
|
||||
sMilling = ML.FindMilling( 'LongSmallCut' .. EgtIf( bDownHead, '_H2', ''))
|
||||
sMilling = ML.FindMilling( 'LongSmallCut', nil, nil, nil, nil, not bDownHead, bDownHead)
|
||||
else
|
||||
sMilling = ML.FindMilling( 'BirdsMouth' .. EgtIf( bDownHead, '_H2', ''))
|
||||
sMilling = ML.FindMilling( 'BirdsMouth', nil, nil, nil, nil, not bDownHead, bDownHead)
|
||||
end
|
||||
if not sMilling then
|
||||
local sErr = 'Error : LongSmallCut & BirdsMouth not found in library'
|
||||
@@ -1001,7 +1001,7 @@ local function MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHead)
|
||||
-- dichiaro non si generano sfridi per VMill
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, 'VMRS=0;')
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
@@ -1034,7 +1034,7 @@ local function MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHead)
|
||||
-- dichiaro non si generano sfridi per VMill
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, 'VMRS=0;')
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
@@ -1216,7 +1216,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, EgtIf( bOpenStart, 0, - dTDiam / 2))
|
||||
end
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
_, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
@@ -1487,7 +1487,7 @@ local function MakeRoundCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw,
|
||||
nFacInd, nAddGrpId, dDiam, bMillDown, bDoubleSide)
|
||||
|
||||
-- recupero la lavorazione senza considerare l'elevazione
|
||||
local sMilling = ML.FindMilling( 'SmallToolContour' .. EgtIf( bMillDown and not bDoubleSide, '_H2', ''))
|
||||
local sMilling = ML.FindMilling( 'SmallToolContour', nil, nil, nil, nil, not ( bMillDown and not bDoubleSide), bMillDown and not bDoubleSide)
|
||||
if not sMilling then
|
||||
local sMyWarn = 'Warning : SmallToolContour not found in library'
|
||||
EgtOutLog( sMyWarn)
|
||||
@@ -1641,7 +1641,7 @@ local function MakeRoundCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw,
|
||||
sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( ( tFacAdj[i][3] + dDepth), 1) .. ';'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
-- eseguo
|
||||
if EgtApplyMachining( true, false) then
|
||||
if ML.ApplyMachining( true, false) then
|
||||
_, sMyWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
@@ -1667,7 +1667,7 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
||||
dDepth, bOneShot)
|
||||
|
||||
-- recupero la lavorazione senza considerare l'elevazione perché viene calcolata l'elevazione utile
|
||||
local sMilling = ML.FindMilling( 'SmallToolContour' .. EgtIf( bMillDown and not bDoubleSide, '_H2', ''))
|
||||
local sMilling = ML.FindMilling( 'SmallToolContour', nil, nil, nil, nil, not( bMillDown and not bDoubleSide), bMillDown and not bDoubleSide)
|
||||
if not sMilling then
|
||||
local sMyWarn = 'Warning : SmallToolContour not found in library'
|
||||
EgtOutLog( sMyWarn)
|
||||
@@ -1683,7 +1683,7 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
||||
dTMaxDepth = EgtTdbGetCurrToolMaxDepth() or dTMaxDepth
|
||||
end
|
||||
|
||||
local sMillingDn = ML.FindMilling( 'SmallToolContour' .. EgtIf( bMillDown and bDoubleSide, '_H2', ''))
|
||||
local sMillingDn = ML.FindMilling( 'SmallToolContour', nil, nil, nil, nil, not( bMillDown and bDoubleSide), bMillDown and bDoubleSide)
|
||||
if not sMillingDn then
|
||||
local sMyWarn = 'Warning : Opposite SmallToolContour not found in library'
|
||||
EgtOutLog( sMyWarn)
|
||||
@@ -1880,7 +1880,7 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
||||
sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( ( dMaxElev + dMachDepth), 1) .. ';'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
-- eseguo
|
||||
if EgtApplyMachining( true, false) then
|
||||
if ML.ApplyMachining( true, false) then
|
||||
_, sMyWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
@@ -1943,7 +1943,7 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw,
|
||||
sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( ( dMaxElev + dMachDepth), 1) .. ';'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
-- eseguo
|
||||
if EgtApplyMachining( true, false) then
|
||||
if ML.ApplyMachining( true, false) then
|
||||
_, sMyWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
@@ -2154,7 +2154,7 @@ local function MakeSharpCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw, nFacI
|
||||
local sUserNotes = 'VMRS=0;MaxElev=' .. EgtNumToString( dMaxDepth, 1) .. ';'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
@@ -2303,7 +2303,7 @@ local function MakeDrillOnCorner( Proc, nPhase, nRawId, nPartId, b3Raw, nFacInd,
|
||||
-- aggiungo alle note massima elevazione (coincide con affondamento)
|
||||
sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( dDepth, 1) .. ';'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
@@ -2622,7 +2622,7 @@ local function MakeChamfer( Proc, bIs3Faces, nAddGrpId, vtOrtho, b3Solid, nSurfI
|
||||
-- EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||
-- end
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return -1, sErr
|
||||
@@ -2774,7 +2774,7 @@ local function MakeByMillAsSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
|
||||
-- tolgo eventuale step
|
||||
EgtSetMachiningParam( MCH_MP.STEP, 0)
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
@@ -2902,7 +2902,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
local bCutDown = ( BD.DOWN_HEAD and rfFac:getVersZ():getZ() < - 0.5)
|
||||
-- Recupero il massimo affondamento possibile con la lama
|
||||
local dSawMaxDepth = 0
|
||||
local sCutting = ML.FindCutting( 'HeadSide'..EgtIf( bCutDown, '_H2', ''))
|
||||
local sCutting = ML.FindCutting( 'HeadSide', not bCutDown, bCutDown)
|
||||
if sCutting then
|
||||
if EgtMdbSetCurrMachining( sCutting) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
@@ -3052,7 +3052,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 2) .. ';'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
if EgtGetOutstrokeInfo() then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
@@ -3061,7 +3061,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
-- impostazione alternativa angolo 3° asse rot
|
||||
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, GetChainSawBlockedAxis( 2))
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, GetChainSawInitAngs( vtN, rfFac:getVersZ(), 2))
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
@@ -3126,7 +3126,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
|
||||
end
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
if EgtGetOutstrokeInfo() then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
@@ -3135,7 +3135,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
-- impostazione alternativa angolo 3° asse rot
|
||||
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, GetChainSawBlockedAxis( 2))
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, GetChainSawInitAngs( vtN, vtOrtho, 2))
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
@@ -3156,7 +3156,7 @@ end
|
||||
---------------------------------------------------------------------
|
||||
local function MakeAntiSplintBySaw( Proc, nFacet, vtN, b3Raw, nFacInd, bReduceDepth, bMillDown)
|
||||
-- Recupero la lavorazione di lama
|
||||
local sCutting = ML.FindCutting( 'HeadSide' .. EgtIf( bMillDown, '_H2', ''))
|
||||
local sCutting = ML.FindCutting( 'HeadSide', not bMillDown, bMillDown)
|
||||
if not sCutting then
|
||||
local sErr = 'Error : HeadSide (cutting) not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -3319,10 +3319,10 @@ local function MakePocket( Proc, nPartId, ptPs, tvtN, nFaceRef, sMchFind, nUseRo
|
||||
local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 1) .. ';'
|
||||
sNotes = sNotes .. 'VMRS=0;'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
|
||||
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
|
||||
@@ -3393,7 +3393,7 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
||||
local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 1) .. ';'
|
||||
sNotes = sNotes .. 'VMRS=0;'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
@@ -3493,7 +3493,7 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
||||
end
|
||||
end
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
@@ -3577,7 +3577,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
local bMakePocket, sPocketing, dMaxDepth, dDiamTool = VerifyPocket( Proc, dDimMin, dDepth / 2, nil, sMchFind)
|
||||
local bMakePocketDn, sPocketingDn, dMaxDepthDn, dDiamToolDn
|
||||
if bMillDown then
|
||||
bMakePocketDn, sPocketingDn, dMaxDepthDn, dDiamToolDn = VerifyPocket( Proc, dDimMin, dDepth / 2, nil, sMchFind..'_H2')
|
||||
bMakePocketDn, sPocketingDn, dMaxDepthDn, dDiamToolDn = VerifyPocket( Proc, dDimMin, dDepth / 2, nil, sMchFind, true)
|
||||
-- se è negativo inverto il versore e la faccia
|
||||
if vtOrtho:getZ() < 0 then
|
||||
vtOrtho = -vtOrtho
|
||||
@@ -3696,10 +3696,10 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
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 -1, sErr
|
||||
@@ -3778,10 +3778,10 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
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 -1, sErr
|
||||
@@ -3848,10 +3848,10 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
local 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 -1, sErr
|
||||
@@ -3955,7 +3955,7 @@ local function ManageAntiSplintBySaw( Proc, b3Raw, bIsU, vtN, nFacInd, sWarn, bM
|
||||
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
|
||||
@@ -4112,7 +4112,7 @@ local function MakeAntiSplintByMill( Proc, nPartId, pPaths, nPathInt, vtN1,
|
||||
sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( ( dMaxElev + dMachDepth), 1) .. ';'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
-- eseguo
|
||||
if EgtApplyMachining( true, false) then
|
||||
if ML.ApplyMachining( true, false) then
|
||||
_, sMyWarn2 = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
@@ -4162,9 +4162,9 @@ local function ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw,
|
||||
dCheckDepth = dDepth
|
||||
end
|
||||
end
|
||||
sMilling = ML.FindMilling( 'AntiSplintMillCut' .. EgtIf( bMillDown and not bDoubleSide, '_H2', ''), dCheckDepth) or
|
||||
ML.FindMilling( 'AntiSplintMillCut' .. EgtIf( bMillDown and not bDoubleSide , '_H2', ''), 2/3 * dCheckDepth) or
|
||||
ML.FindMilling( 'AntiSplintMillCut' .. EgtIf( bMillDown and not bDoubleSide , '_H2', ''))
|
||||
sMilling = ML.FindMilling( 'AntiSplintMillCut', dCheckDepth, nil, nil, nil, not( bMillDown and not bDoubleSide), bMillDown and not bDoubleSide) or
|
||||
ML.FindMilling( 'AntiSplintMillCut', 2/3 * dCheckDepth, nil, nil, nil, not( bMillDown and not bDoubleSide), bMillDown and not bDoubleSide) or
|
||||
ML.FindMilling( 'AntiSplintMillCut', nil, nil, nil, nil, not( bMillDown and not bDoubleSide), bMillDown and not bDoubleSide)
|
||||
|
||||
if sMilling then
|
||||
|
||||
@@ -4471,7 +4471,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
EgtOutLog( sWarn)
|
||||
end
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
if EgtGetOutstrokeInfo() then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
@@ -4479,7 +4479,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, GetChainSawBlockedAxis( 2))
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, GetChainSawInitAngs( vtN, vtOrtho, 2))
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
@@ -4586,7 +4586,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
local nSCC = EgtIf( ( vtN:getY() > 0.5 or ( bHeadDir and vtN:getZ() > 0.5 ) or ( not bHeadDir and vtN:getZ() < -0.5)), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||
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
|
||||
@@ -4606,7 +4606,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( nWorkSide == MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT))
|
||||
EgtSetMachiningParam( MCH_MP.SCC, EgtIf( nSCC == MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP))
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFNId, false)
|
||||
return false, sErr
|
||||
@@ -4716,10 +4716,10 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
local sNotes = 'MaxElev=' .. EgtNumToString( dFacElev2, 1) .. ';'
|
||||
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
|
||||
@@ -4852,7 +4852,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
end
|
||||
-- ricerca lavorazione
|
||||
local sPocketing
|
||||
local _, sMyPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind .. EgtIf( bMillDown, '_H2', ''))
|
||||
local _, sMyPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind, bMillDown)
|
||||
if not sMyPocketing and bMillUp then
|
||||
_, sMyPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind)
|
||||
bMillDown = false
|
||||
@@ -4925,11 +4925,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
( Proc.TotBox and Proc.TotBox:getDimX() > BD.MIN_LEN_LAMELLO) or
|
||||
( not Proc.TotBox and Proc.Box:getDimX() > BD.MIN_LEN_LAMELLO)) then
|
||||
-- recupero la lavorazione
|
||||
if BD.DOWN_HEAD and vtN:getZ() < BD.NZ_MINA then
|
||||
sMillingOnSide = ML.FindMilling( 'SideMillAsBlade_H2')
|
||||
else
|
||||
sMillingOnSide = ML.FindMilling( 'SideMillAsBlade')
|
||||
end
|
||||
local bDownHead = BD.DOWN_HEAD and vtN:getZ() < BD.NZ_MINA
|
||||
sMillingOnSide = ML.FindMilling( 'SideMillAsBlade_H2', nil, nil, nil, nil, not bDownHead, bDownHead)
|
||||
|
||||
if sMillingOnSide then
|
||||
-- recupero i dati dell'utensile
|
||||
@@ -5018,7 +5015,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
if not sMchFind then
|
||||
sMchFind = sMchFindBackUp
|
||||
end
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam)
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam, nil, nil, not bMillDown, bMillDown)
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : '..sMchFind..' not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -5028,7 +5025,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
return false, sErr
|
||||
elseif nOk == 0 then
|
||||
if sStat == 'MNF' then
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam)
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam, nil, nil, not bMillDown, bMillDown)
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : '..sMchFind..' not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -5042,7 +5039,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
return bOk, sErr
|
||||
end
|
||||
else
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam)
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam, nil, nil, not bMillDown, bMillDown)
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : '..sMchFind..' not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -5093,7 +5090,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
if not sMchFind then
|
||||
sMchFind = sMchFindBackUp
|
||||
end
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam)
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam, nil, nil, not bMillDown, bMillDown)
|
||||
if not sPocketing then
|
||||
local sErr2 = 'Error : '..sMchFind..' not found in library'
|
||||
EgtOutLog( sErr2)
|
||||
|
||||
Reference in New Issue
Block a user