DataBeam :

- modifiche per ottimizzazione con più teste
- modifiche per compilazione.
This commit is contained in:
DarioS
2022-05-09 20:42:45 +02:00
parent 6e0c482dab
commit b51487f5af
40 changed files with 740 additions and 464 deletions
+16 -18
View File
@@ -144,7 +144,7 @@ local function MakeSideFace( nId, nFac, nSide, sMilling, dToolDiam, nL2CSide)
EgtSetMachiningParam( MCH_MP.STARTPOS, 80)
end
-- eseguo
if not EgtApplyMachining( true, false) then
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchFId, false)
return false, sErr
@@ -155,8 +155,9 @@ end
-- Applicazione della lavorazione
local function MakeByPocketing( Proc, nPhase, nRawId, nPartId, nSide, nFacInd, dFacElev)
-- cerco la svuotatura opportuna
local sPockType = EgtIf( nSide ~=1 and BD.DOWN_HEAD, 'OpenPocket_H2', 'OpenPocket')
local sPocketing = ML.FindPocketing( sPockType, Proc.Box:getDimX())
local bDownHead = nSide ~=1 and BD.DOWN_HEAD
local sPockType = EgtIf( bDownHead, 'OpenPocket_H2', 'OpenPocket')
local sPocketing = ML.FindPocketing( sPockType, Proc.Box:getDimX(), nil, nil, not bDownHead, bDownHead)
if not sPocketing then
local sErr = 'Error : OpenPocket not found in library'
EgtOutLog( sErr)
@@ -197,10 +198,10 @@ local function MakeByPocketing( Proc, nPhase, nRawId, nPartId, nSide, nFacInd, d
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
@@ -392,7 +393,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
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 on process ' .. tostring( Proc.Id) .. ' sawing underneath not found in library'
EgtOutLog( sErr)
@@ -715,7 +716,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
-- 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
@@ -844,7 +845,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
-- determino e imposto l'utilizzo della faccia
EgtSetMachiningParam( MCH_MP.FACEUSE, vFaceUse[vOrd[j]])
-- eseguo
if not EgtApplyMachining( true, false) then
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchFId, false)
return false, sErr
@@ -868,11 +869,8 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
end
-- recupero la lavorazione
local sMilling
if nSide == -1 and BD.DOWN_HEAD then
sMilling = ML.FindMilling( 'Long2Cut_H2', dElev)
else
sMilling = ML.FindMilling( 'Long2Cut', dElev)
end
local bDownHead = ( nSide == -1 and BD.DOWN_HEAD)
sMilling = ML.FindMilling( 'Long2Cut_H2', dElev, nil, nil, nil, not bDownHead, bDownHead)
if not sMilling then
local sErr = 'Error : Long2Cut not found in library'
@@ -1097,7 +1095,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
EgtSetMachiningParam( MCH_MP.STARTPOS, 80)
end
-- eseguo
if not EgtApplyMachining( true, false) then
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchFId, false)
return false, sErr
@@ -1138,7 +1136,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
-- 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
@@ -1153,7 +1151,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
-- 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
@@ -1543,12 +1541,12 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth - dExtraElev)
end
-- eseguo
if not EgtApplyMachining( true, false) then
if not ML.ApplyMachining( true, false) then
-- se feature orientata su faccia da sotto e concave provo a cambiare l'attacco
if nSide == -1 and not bConvex then
EgtSetMachiningParam( MCH_MP.LIPERP, dLioPerp1)
EgtSetMachiningParam( MCH_MP.LOPERP, dLioPerp1)
if not EgtApplyMachining( true, false) then
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchFId, false)
return false, sErr