|
|
|
@@ -2015,6 +2015,10 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
|
|
|
|
local nStep = ceil( ( dThick - dMaxMat) / dStep)
|
|
|
|
|
dStep = max( ( dThick - dMaxMat) / max( nStep, 1), 0)
|
|
|
|
|
local dMaxElev = max( ( nStep + 1) * dStep - GEO.EPS_SMALL, 0)
|
|
|
|
|
-- tasca aperta sopra non necessita di MaxElev
|
|
|
|
|
if Proc.Fct == 2 and Proc.AffectedFaces.Top then
|
|
|
|
|
dMaxElev = nil
|
|
|
|
|
end
|
|
|
|
|
if nSinglePass and nSinglePass > 0 then
|
|
|
|
|
dStep = 0
|
|
|
|
|
if nSinglePass == 1 then
|
|
|
|
@@ -2028,7 +2032,9 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
|
|
|
|
-- leggo eventuali note esistenti della lavorazione
|
|
|
|
|
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
|
|
|
|
|
-- aggiungo alle note massima elevazione
|
|
|
|
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 3))
|
|
|
|
|
if dMaxElev then
|
|
|
|
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 3))
|
|
|
|
|
end
|
|
|
|
|
-- se lavorazione in doppio aggiungo le rispettive note
|
|
|
|
|
if Proc.Double and Proc.Double == 2 then
|
|
|
|
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
|
|
|
|
@@ -2102,15 +2108,9 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
|
|
|
|
-- setto allungamenti iniziali e finali
|
|
|
|
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dExtraLongIni)
|
|
|
|
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dExtraLongEnd)
|
|
|
|
|
-- se ho passate orizzontali riduco l'eventuale allungamento settato dall'utente
|
|
|
|
|
local dLiPerp = EgtGetMachiningParam( MCH_MP.LIPERP)
|
|
|
|
|
local dLoPerp = EgtGetMachiningParam( MCH_MP.LOPERP)
|
|
|
|
|
if dLiPerp > 0 then
|
|
|
|
|
dLiPerp = dLiPerp - dRadialOffset
|
|
|
|
|
end
|
|
|
|
|
if dLoPerp > 0 then
|
|
|
|
|
dLoPerp = dLoPerp - dRadialOffset
|
|
|
|
|
end
|
|
|
|
|
-- tutte le passate partono dalla stessa distanza
|
|
|
|
|
local dLiPerp = dElev + WD.CUT_SIC - dRadialOffset
|
|
|
|
|
local dLoPerp = dElev + WD.CUT_SIC - dRadialOffset
|
|
|
|
|
EgtSetMachiningParam( MCH_MP.LIPERP, dLiPerp)
|
|
|
|
|
EgtSetMachiningParam( MCH_MP.LOPERP, dLoPerp)
|
|
|
|
|
-- se richiesto, setto la nota per spostare la lavorazione alla fine
|
|
|
|
@@ -2886,13 +2886,15 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
|
|
|
|
|
-- se ho abilitata lavorazione di fresa di fianco
|
|
|
|
|
if Proc.Fct >= 3 and sMillOnSide and nUseMillOnSide >= 1 and not bIsSmallSlot then
|
|
|
|
|
-- cerco nei parametri utensili la nota di affondamento di fianco SIDEDEPTH
|
|
|
|
|
local dMaxDepthOnSide = 0
|
|
|
|
|
local dMaxDepthOnSide = 999
|
|
|
|
|
local dMillDiam = 0
|
|
|
|
|
local dMillDiamTh = EgtTdbGetCurrToolThDiam() or 60
|
|
|
|
|
if EgtMdbSetCurrMachining( sMillOnSide) then
|
|
|
|
|
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
|
|
|
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
|
|
|
|
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
|
|
|
|
dMaxDepthOnSide = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or dMaxDepthOnSide
|
|
|
|
|
dMillDiamTh = EgtTdbGetCurrToolThDiam() or dMillDiamTh
|
|
|
|
|
dMaxDepthOnSide = min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or dMaxDepthOnSide, 0.5 * ( dMillDiam - dMillDiamTh))
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
local bMakeFirstGroove
|
|
|
|
@@ -2981,7 +2983,7 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
|
|
|
|
|
else
|
|
|
|
|
local sErr = 'Side milling not possible'
|
|
|
|
|
EgtOutLog( sErr)
|
|
|
|
|
return true, sErr
|
|
|
|
|
return false, sErr
|
|
|
|
|
end
|
|
|
|
|
-- fessura verticale
|
|
|
|
|
elseif Proc.Stype == 3 then
|
|
|
|
|