- in ProcessDrilling correzioni e migliorie alla lavorazione ultimo step di fori svuotati in doppio
This commit is contained in:
+19
-12
@@ -638,7 +638,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
local dLastStepDepth
|
||||
if Proc.Double and Proc.Double > 0 then
|
||||
if ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then
|
||||
local dReduceDepth = MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 10
|
||||
local dReduceDepth = MIRROR_POCKETS_MIN_DISTANCE / 2 + 10
|
||||
dLastStepDepth = dDepth + dReduceDepth
|
||||
dDepth = dDepth - dReduceDepth
|
||||
end
|
||||
@@ -658,8 +658,16 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
||||
-- aggiungo alle note massima elevazione (coincide con affondamento)
|
||||
if dMaxElev then
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 1))
|
||||
local dCustomMaxElev
|
||||
if Proc.dCustomMaxElev and type( Proc.dCustomMaxElev) == "number" and Proc.dCustomMaxElev > 10 * GEO.EPS_SMALL then
|
||||
dCustomMaxElev = Proc.dCustomMaxElev
|
||||
end
|
||||
if dMaxElev or dCustomMaxElev then
|
||||
if dCustomMaxElev then
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dCustomMaxElev, 1))
|
||||
else
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 1))
|
||||
end
|
||||
end
|
||||
-- se foro passante, aggiungo questa qualifica alle note
|
||||
if ( sType == 'Drill' or sType == 'Drill_H2' or sType == 'AngleDrill') and bOpen then
|
||||
@@ -685,7 +693,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
end
|
||||
if not bOk then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
@@ -703,16 +711,15 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
ProcLastStep.Id = idProcLastStep
|
||||
ProcLastStep.Flg = 1
|
||||
ProcLastStep.Double = 0
|
||||
Proc.dCustomMaxElev = MIRROR_DRILLINGS_MIN_DISTANCE
|
||||
ProcLastStep.dCustomMaxElev = dDepth
|
||||
local bOkLastStep, sWarnLastStep = ProcessDrill.Make( ProcLastStep, nPhase, nRawId, nPartId)
|
||||
if not bOkLastStep then
|
||||
if sWarn2 then
|
||||
if not sWarn then sWarn = '' end
|
||||
sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2)
|
||||
end
|
||||
sMyWarn = 'Drillpocket double : last step missing;\n' .. ( sMyWarn or sWarn or '')
|
||||
else
|
||||
sMyWarn = sWarnLastStep .. '\n' .. ( sMyWarn or sWarn or '')
|
||||
sWarnLastStep = 'Drillpocket double : incomplete, last step missing'
|
||||
end
|
||||
local sPreviousWarn = sMyWarn or sWarn
|
||||
if sWarnLastStep then
|
||||
if not sPreviousWarn then sPreviousWarn = '' end
|
||||
sMyWarn = EgtIf( #sPreviousWarn > 0, sPreviousWarn .. '\n' .. sWarnLastStep, sWarnLastStep)
|
||||
end
|
||||
end
|
||||
return true, ( sMyWarn or sWarn)
|
||||
|
||||
Reference in New Issue
Block a user