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
+12 -3
View File
@@ -1,4 +1,4 @@
-- ProcessDtMortise.lua by Egaltech s.r.l. 2020/04/20
-- ProcessDtMortise.lua by Egaltech s.r.l. 2020/04/27
-- Gestione calcolo mortase a coda di rondice per Travi
-- Tabella per definizione modulo
@@ -119,6 +119,7 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId)
local dToolDiam = 100
local dMaxMat = 30
local dSideAng = 0
local bCW = true
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
@@ -126,6 +127,8 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId)
dToolDiam = max( dToolDiam, 10)
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG) or dSideAng
local dSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) or 0
bCW = ( dSpeed >= 0)
end
end
-- verifico se raggio troppo piccolo per l'utensile
@@ -213,6 +216,9 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId)
EgtSetMachiningParam( MCH_MP.DEPTH, dAltMort)
-- setto offset radiale con aggiunto un ulteriore allargamento di 1mm
EgtSetMachiningParam( MCH_MP.OFFSR, dToolRadDelta - 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, false, true))
-- dichiaro non si generano sfridi per VMill
local sUserNotes = 'MaxElev='.. EgtNumToString( dAltMort, 1) .. '; VMRS=0;'
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
@@ -255,11 +261,14 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId)
EgtOutLog( sErr)
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- imposto offset
local dOffs = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -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, false, true))
-- dichiaro non si generano sfridi per VMill
local sUserNotes = 'MaxElev='.. EgtNumToString( dMaxMat - 0.1, 1) .. '; VMRS=0;'
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
+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
+9 -4
View File
@@ -1,4 +1,4 @@
-- ProcessMortise.lua by Egaltech s.r.l. 2020/03/04
-- ProcessMortise.lua by Egaltech s.r.l. 2020/04/27
-- Gestione calcolo mortase per Travi
-- Tabella per definizione modulo
@@ -170,11 +170,14 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId)
-- recupero i dati dell'utensile
local dMillDiam = 20
local dMaxDepth = 0
local bCW = true
if EgtMdbSetCurrMachining( sPocketing) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
dMaxDepth = ( EgtTdbGetCurrToolMaxDepth() or dMaxDepth)
local dSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) or 0
bCW = ( dSpeed >= 0)
end
end
-- inserisco la lavorazione di svuotatura
@@ -191,6 +194,8 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- sistemo la direzione di lavoro
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, true, false))
-- imposto posizione braccio porta testa
if vtN:getY() < GEO.EPS_SMALL then
if bRevertSide then
@@ -237,8 +242,7 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId)
EgtSetOperationMode( nMchFId, false)
return false, sErr
end
-- ESPERIMENTO:
-- se non c'è il fondo e la lavorazione non ha lavorato tutta la superficie per limite altezza utensile
-- Se non c'è il fondo e la lavorazione non ha lavorato tutta la superficie per limite altezza utensile
-- inserisco una ulteriore lavorazione contraria
if bOpenBtm and not bForceOneSide and nDepthMin and abs(nDepthMin) > 0 then
-- inserisco la lavorazione di svuotatura opposta
@@ -255,6 +259,8 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId)
EgtModifyCurveExtrusion( AuxId_oppo, - vtExtr, GDB_ID.ROOT)
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId_oppo, -1}})
-- sistemo la direzione di lavoro
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, true, false))
-- imposto posizione braccio porta testa
if vtN:getY() < GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
@@ -267,7 +273,6 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId)
else -- se sono uguali setto
nDepthMin = -( dMorH - BD.CUT_EXTRA)
end
-- setto profondità
EgtSetMachiningParam( MCH_MP.DEPTH, -nDepthMin+BD.CUT_EXTRA)
-- imposto elevazione
+7 -1
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 per Travi
-- Tabella per definizione modulo
@@ -178,11 +178,14 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- recupero i dati dell'utensile
local dMillDiam = 20
local dMaxDepth = 0
local bCW = true
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)
local dSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) or 0
bCW = ( dSpeed >= 0)
end
end
-- se elevazione superiore a massimo affondamento della fresa, riduco opportunamente
@@ -214,6 +217,9 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
local dOffset = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffset)
-- 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))
-- se contorno aperto, cambio parametri di attacco/uscita
if not bClosed then
EgtSetMachiningParam( MCH_MP.LITANG, 0.7 * dMillDiam)