DataWall :
- varie modifiche per cliente belga.
This commit is contained in:
@@ -1423,6 +1423,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
local bInvertMach
|
||||
local nModifyLeadInOut = 0
|
||||
local nFace2ndFace
|
||||
local dMaxDistToOut = 1800 -- dMillDiamTh/2
|
||||
-- se orientato lungo la Y
|
||||
if abs( vtN:getX()) > 0.9 then
|
||||
dExtraLongExtPlus = abs( Proc.Box:getMax():getY() - b3Raw:getMax():getY())
|
||||
@@ -1430,12 +1431,13 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
if dLongGorge + dMillDiamTh < b3Raw:getDimY() then
|
||||
nModifyLeadInOut = 1
|
||||
-- se non può sbordare da nessuna parte do errore
|
||||
if dExtraLongExtPlus > dMillDiamTh/2 and dExtraLongExtNeg > dMillDiamTh/2 and dElev > ( 0.5 * dMillDiam) then
|
||||
if dExtraLongExtPlus > dMaxDistToOut and dExtraLongExtNeg > dMaxDistToOut and dElev > dMaxDistToOut then
|
||||
local sErr = 'Error : Not possible insert SideMill groove machining'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- se non sborda solo dai lati
|
||||
elseif dExtraLongExtPlus > dMillDiamTh/2 and dExtraLongExtNeg > dMillDiamTh/2 then
|
||||
if dElev < dExtraLongExtPlus and dElev < dExtraLongExtNeg then
|
||||
nModifyLeadInOut = 2
|
||||
end
|
||||
end
|
||||
@@ -1485,12 +1487,13 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
if dLongGorge + dMillDiamTh < b3Raw:getDimX() then
|
||||
nModifyLeadInOut = 1
|
||||
-- se non può sbordare da nessuna parte do errore
|
||||
if dExtraLongExtPlus > dMillDiamTh/2 and dExtraLongExtNeg > dMillDiamTh/2 and dElev > ( 0.5 * dMillDiam) then
|
||||
if dExtraLongExtPlus > dMaxDistToOut and dExtraLongExtNeg > dMaxDistToOut and dElev > dMaxDistToOut then
|
||||
local sErr = 'Error : Not possible insert SideMill groove machining'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- se non sborda solo dai lati
|
||||
elseif dExtraLongExtPlus > dMillDiamTh/2 and dExtraLongExtNeg > dMillDiamTh/2 then
|
||||
if dElev < dExtraLongExtPlus and dElev < dExtraLongExtNeg then
|
||||
nModifyLeadInOut = 2
|
||||
end
|
||||
end
|
||||
@@ -1547,7 +1550,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
-- calcolo extra allungamenti
|
||||
local dExtraLongGorge = ( dMillDiamTh + 5) /2
|
||||
-- recupero la lavorazione
|
||||
local sMillingGorge = WM.FindMilling( 'FreeContour', nil, nil, nil, 30)
|
||||
local sMillingGorge = WM.FindMilling( 'Gorge', nil, nil, nil, 80)
|
||||
if not sMillingGorge then
|
||||
local sErr = 'Error : FirstMill not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -1610,8 +1613,8 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
-- aggiungo l'offset laterale
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, ( dElevToPiece + (dC * (i-1)) + 1))
|
||||
-- aggiungo allungamenti iniziali e finali
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dExtraLongGorge)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dExtraLongGorge)
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dExtraLongIni + dExtraLongGorge)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dExtraLongEnd + dExtraLongGorge)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
@@ -1696,8 +1699,10 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, 0)
|
||||
end
|
||||
end
|
||||
-- setto la nota per spostare la lavorazione alla fine
|
||||
EgtSetInfo( nMchFId, 'MOVE_AFTER', 1)
|
||||
-- se richiesto, setto la nota per spostare la lavorazione alla fine
|
||||
if not WD.SIDEMILL_BEFORE then
|
||||
EgtSetInfo( nMchFId, 'MOVE_AFTER', 1)
|
||||
end
|
||||
else
|
||||
if nModifyLeadInOut > 0 then
|
||||
-- Invece del numero di passi in sgrossatura confronto il raggio fresa con l'elevazione dalla normale
|
||||
@@ -1716,8 +1721,10 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
-- setto allungamenti iniziali e finali
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dExtraLongIni)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dExtraLongEnd)
|
||||
-- setto la nota per spostare la lavorazione alla fine
|
||||
EgtSetInfo( nMchFId, 'MOVE_AFTER', 1)
|
||||
-- se richiesto, setto la nota per spostare la lavorazione alla fine
|
||||
if not WD.SIDEMILL_BEFORE then
|
||||
EgtSetInfo( nMchFId, 'MOVE_AFTER', 1)
|
||||
end
|
||||
end
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
@@ -1799,8 +1806,10 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, 0)
|
||||
end
|
||||
end
|
||||
-- setto la nota per spostare la lavorazione alla fine
|
||||
EgtSetInfo( nMchFId, 'MOVE_AFTER', 1)
|
||||
-- se richiesto, setto la nota per spostare la lavorazione alla fine
|
||||
if not WD.SIDEMILL_BEFORE then
|
||||
EgtSetInfo( nMchFId, 'MOVE_AFTER', 1)
|
||||
end
|
||||
else
|
||||
if nModifyLeadInOut > 0 then
|
||||
-- Invece del numero di passi in sgrossatura confronto il raggio fresa con l'elevazione dalla normale
|
||||
@@ -1823,8 +1832,10 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
-- setto allungamenti iniziali e finali
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dExtraLongIni)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dExtraLongEnd)
|
||||
-- setto la nota per spostare la lavorazione alla fine
|
||||
EgtSetInfo( nMchFId, 'MOVE_AFTER', 1)
|
||||
-- se richiesto, setto la nota per spostare la lavorazione alla fine
|
||||
if not WD.SIDEMILL_BEFORE then
|
||||
EgtSetInfo( nMchFId, 'MOVE_AFTER', 1)
|
||||
end
|
||||
end
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
@@ -2026,7 +2037,13 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
|
||||
-- recupero la lavorazione di taglio con lama e i suoi parametri
|
||||
local sCutting, dSawDiam, dSawThick, dSawMaxDepth = WM.FindCutting( 'Standard')
|
||||
-- se abilitata lavorazione ribasso con fresa di fianco e parametro Q03 abilitato
|
||||
local sMillOnSide, dTMaxDepth, dMaxMat, dDiam = WM.FindMilling( 'SideMill')
|
||||
local dMaxThick
|
||||
if vtN[1]:getZ() < -0.5 then
|
||||
dMaxThick = dDimY[2]
|
||||
elseif vtN[2]:getZ() < -0.5 then
|
||||
dMaxThick = dDimY[1]
|
||||
end
|
||||
local sMillOnSide, dTMaxDepth, dMaxMat, dDiam = WM.FindMilling( 'SideMill', nil, nil, nil, nil, dMaxThick)
|
||||
local _, nUseMillOnSide = EvaluateQParam( Proc)
|
||||
local dMaxZVers, dMinZVers, bEnableMillOnSide
|
||||
if sMillOnSide and nUseMillOnSide >= 1 then
|
||||
@@ -2056,6 +2073,7 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
|
||||
if bEnableMillOnSide and dMaxDepthOnSide > 0 then
|
||||
dMaxDist = dMaxDepthOnSide
|
||||
end
|
||||
dMaxDist = 1000
|
||||
-- se vicino al bordo del grezzo e non troppo larga, provo con fresatura di fianco
|
||||
local ptMid = ( ptP1 + ptP2) / 2
|
||||
local bMakeFirstGroove
|
||||
@@ -2239,7 +2257,7 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
|
||||
-- se di fianco
|
||||
if not bPckt and Proc.Fct >= 3 and vtN:getZ() < WD.NZ_MINA then
|
||||
-- se abilitata lavorazione ribasso con fresa di fianco e parametro Q03 abilitato
|
||||
local sMillOnSide, dTMaxDepth, dMaxMat, dDiam = WM.FindMilling( 'SideMill')
|
||||
local sMillOnSide, dTMaxDepth, dMaxMat, dDiam = WM.FindMilling( 'SideMill', nil, nil, nil, nil, min( dH, dV))
|
||||
local _, nUseMillOnSide = EvaluateQParam( Proc)
|
||||
-- se ho abilitata lavorazione di fresa di fianco
|
||||
if Proc.Fct == 3 and sMillOnSide and nUseMillOnSide >= 1 then
|
||||
@@ -2294,8 +2312,15 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
|
||||
end
|
||||
end
|
||||
local nFacet = EgtIf( bPckt or vtN:getZ() >= WD.NZ_MINA, nFacInd, nFacInd2)
|
||||
-- eseguo la svuotatura
|
||||
return MakeByPocketing( Proc, nFacet, nRawId, b3Raw, true)
|
||||
if nFacet then
|
||||
-- eseguo la svuotatura
|
||||
return MakeByPocketing( Proc, nFacet, nRawId, b3Raw, true)
|
||||
else
|
||||
local sErr = 'Side milling not possible'
|
||||
EgtOutLog( sErr)
|
||||
return true, sErr
|
||||
|
||||
end
|
||||
-- fessura verticale
|
||||
elseif Proc.Stype == 3 then
|
||||
-- riordino le facce come contorno libero da lavorare a destra (sono una U)
|
||||
|
||||
Reference in New Issue
Block a user