DataBeam :
- correzioni e migliorie.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- ProcessTenon.lua by Egaltech s.r.l. 2019/07/01
|
||||
-- ProcessTenon.lua by Egaltech s.r.l. 2019/07/08
|
||||
-- Gestione calcolo tenone per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -114,12 +114,23 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
end
|
||||
-- recupero i dati dell'utensile
|
||||
local dMillDiam = 20
|
||||
local dMaxDepth = 0
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMaxDepth = ( EgtTdbGetCurrToolMaxDepth() or dMaxDepth) - BD.COLL_SIC
|
||||
end
|
||||
end
|
||||
-- se elevazione superiore a massimo affondamento della fresa, riduco opportunamente
|
||||
local sWarn
|
||||
local dDepth = 0
|
||||
if dTenH > dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
sWarn = 'Warning in tenon : elevation (' .. EgtNumToString( dTenH, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
|
||||
dDepth = dMaxDepth - dTenH
|
||||
dTenH = dMaxDepth
|
||||
EgtOutLog( sWarn .. ' (process ' .. tostring( Proc.Id) .. ')')
|
||||
end
|
||||
-- determino il numero di passate concentriche (max 4)
|
||||
local MAX_PASS = 4
|
||||
local nPass = min( ceil( dPockL / ( 0.7 * dMillDiam)), MAX_PASS)
|
||||
@@ -137,6 +148,7 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
EgtSetMachiningGeometry( {{ AuxId, -1}})
|
||||
-- sistemo i parametri
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dTenH, 1) .. ';')
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||
local dOffset = ( i - 1) * dStep
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dOffset)
|
||||
-- se contorno aperto, cambio parametri di attacco/uscita
|
||||
@@ -169,7 +181,7 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
BL.UpdateTCING( nRawId, dOffs)
|
||||
end
|
||||
end
|
||||
return true
|
||||
return true, sWarn
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user