DataBeam :

- gestione su tenoni e mortase (normali e DT) di lato e direzione di lavoro secondo il senso di rotazione.
This commit is contained in:
Dario Sassi
2020-04-27 11:26:09 +00:00
parent 6ee9f28cab
commit c1b62e6f28
4 changed files with 36 additions and 10 deletions
+8 -2
View File
@@ -1,4 +1,4 @@
-- ProcessTenon.lua by Egaltech s.r.l. 2020/04/20
-- ProcessTenon.lua by Egaltech s.r.l. 2020/04/27
-- Gestione calcolo tenone a coda di rondine per Travi
-- Tabella per definizione modulo
@@ -170,10 +170,13 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- recupero i dati dell'utensile
local dTDiam = 50
local bCW = true
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiam
local dSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) or 0
bCW = ( dSpeed >= 0)
end
end
-- calcolo distanza massima della curva dal punto più lontano della base tenone Dt (facet 0)
@@ -202,7 +205,7 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local nStep = min( ceil( dMaxDist / ( 0.7 * dTDiam)), MAX_PASS)
local dStep = min( dMaxDist, 0.7 * dTDiam * MAX_PASS) / nStep
for i = nStep, 1, -1 do
-- inserisco la passata di sgrossatura della lavorazione
-- inserisco la passata di lavorazione
local sNameR = 'DtTn_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( i)
local nMchRId = EgtAddMachining( sNameR, sMilling)
if not nMchRId then
@@ -216,6 +219,9 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local dOffs = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dDtTenH, 1) .. ';')
-- sistemo il lato e la direzione di lavoro
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bCW, MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT))
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, true, false))
-- imposto posizione braccio porta testa
local nSCC = MCH_SCC.ADIR_YM
if abs( vtExtr:getY()) > 0.088 then