DataBeam :

- in LapJoint estesa gestione angoli asse virtuale per sega a catena (la macchina può fornire la funzione BD.GetChainSawBlockedAxis di calcolo)
- in LapJoint modificata gestione U e L senza facce di terminazione per frese grandi che non lavorano di testa.
This commit is contained in:
DarioS
2021-05-10 15:15:45 +02:00
parent 16411c52a7
commit 580a7cbc17
+35 -36
View File
@@ -204,6 +204,19 @@ local function TestElleShape4( Proc)
end
end
---------------------------------------------------------------------
local function GetChainSawBlockedAxis( nInd)
if BD.GetChainSawBlockedAxis then
return BD.GetChainSawBlockedAxis( nInd)
else
if nInd == 1 then
return EgtIf( BD.C_SIMM, 'A=90', 'A=0')
else
return EgtIf( BD.C_SIMM, 'A=0', 'A=90')
end
end
end
---------------------------------------------------------------------
local function VerifyChainSaw( Proc, dMinDim, dMaxDim, vtOrtho)
local bUseChainSaw = false
@@ -2174,7 +2187,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
EgtSetMachiningParam( MCH_MP.ENDADDLEN, EgtIf( bOpenEnd, 0, - dSawWidth / 2))
end
-- imposto angolo 3° asse rot
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, EgtIf( BD.C_SIMM, 'A=90', 'A=0'))
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, GetChainSawBlockedAxis( 1))
-- imposto offset radiale
local dOffs = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
@@ -2195,7 +2208,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
EgtSetOperationMode( nMchFId, false)
return false, sErr
end
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, EgtIf( BD.C_SIMM, 'A=0', 'A=90'))
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, GetChainSawBlockedAxis( 2))
if BD.C_SIMM then
if vtN:getY() > 0 then
EgtSetMachiningParam( MCH_MP.INITANGS, 'C=180')
@@ -2253,7 +2266,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
--else
-- EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_RIGHT)
end
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, EgtIf( BD.C_SIMM, 'A=90', 'A=0'))
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, GetChainSawBlockedAxis( 1))
-- imposto offset radiale
local dOffs = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
@@ -2276,7 +2289,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
EgtSetOperationMode( nMchFId, false)
return false, sErr
end
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, EgtIf( BD.C_SIMM, 'A=0', 'A=90'))
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, GetChainSawBlockedAxis( 2))
if BD.C_SIMM then
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nLundIdFace, GDB_ID.ROOT)
if vtN:getY() > 0 then
@@ -3139,7 +3152,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_BACK)
end
-- imposto angolo 3° asse rot
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, EgtIf( BD.C_SIMM, 'A=90', 'A=0'))
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, GetChainSawBlockedAxis( 1))
-- imposto offset radiale
local dOffs = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
@@ -3159,7 +3172,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
EgtSetOperationMode( nMchFId, false)
return false, sErr
end
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, EgtIf( BD.C_SIMM, 'A=0', 'A=90'))
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, GetChainSawBlockedAxis( 2))
if BD.C_SIMM then
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nLundIdFace, GDB_ID.ROOT)
if vtN:getY() > 0 then
@@ -3469,25 +3482,16 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
-- abilitazione lavorazione da sotto
local bMillUp = ( BD.DOWN_HEAD and vtN:getZ() > -0.259)
local bMillDown = ( BD.DOWN_HEAD and vtN:getZ() < 0.342)
-- settaggio voluto da Alessandro
local sMchFind = EgtIf( bSinglePart, 'Pocket', 'OpenPocket')
-- settaggio voluto da Alessandro/Fabio (per fare angoli con fresa piccola)
sMchFind = 'Pocket'
if ( Proc.Fct == 1) or ( Proc.Fct == 2 and bIsL) or ( Proc.Fct == 3 and bIsU) then sMchFind = 'OpenPocket' end
sMchFindBackUp = sMchFind
local nUseRoughTool = EgtIf( bSinglePart, 0, 1)
-- fino a che nelle svuotature non si può decidere il punto di inizio faccio delle valutazioni
-- se ho passi multipli controllo il numero delle facce
if not bSinglePart then
-- se ho 3 o più facce allora re-imposto il tipo di svuotatura
if ( Proc.Fct == 3 and bIsU) or Proc.Fct > 3 then
sMchFind = 'Pocket'
end
end
local dDiam = min( dH, dV)
local dDiamMax
local nUseRT
-- 04/08/2020 su richiesta di Fabio Squaratti, se settato parametro uso truciolatore (parametro Q), non si devono prendere altre frese,
-- piuttosto si da errore con il truciolatore.
-- Sicuramente questa opzione si scontra facilmente con altre interpretazioni dello stasso parametro Q
-- per tornare comportamento precedente settare bNewCheck = false
-- 04/08/2020 Se settato parametro uso truciolatore (parametro Q), non si devono prendere altre frese, si da errore (Fabio)
-- Questa opzione si scontra facilmente con altre interpretazioni dello stasso parametro Q (per tornare indietro bNewCheck = false)
local bNewCheck = true
-- se processo 20 e non sto usando il truciolatore
if bNewCheck and Proc.Prc == 20 and nUseRoughTool == 0 then
@@ -3498,8 +3502,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
nUseRoughTool = 1
end
end
-- 03/12/2020 aggiunto controllo su feature 30
-- se processo 30 e non sto usando il truciolatore
-- 03/12/2020 aggiunto controllo su feature 30 senza uso truciolatore
if bNewCheck and Proc.Prc == 30 and nUseRoughTool == 0 then
-- verifico se forzato uso truciolatore
nUseRT = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i')
@@ -3508,19 +3511,16 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
nUseRoughTool = 1
end
end
-- verifico dalla forma se non posso prendere utensile grande
if ( Proc.Fct == 3 and bIsU and bSinglePart) or ( Proc.Fct == 2 and bIsL) or Proc.Fct == 1 then
sMchFindBackUp = sMchFind
--ottengo un diametro utensile opportuno
dDiam, sMchFind, nUseRoughTool, dDiamMax = CheckToolDiamByFaces( Proc, nFacInd, bMillDown, dH, dV, bIsU, bIsL, ( dFacElev + dCollSic), nUseRoughTool)
if not dDiam then
sMchFind = sMchFindBackUp
--if nUseRoughTool == 0 then
-- sMchFind = 'OpenPocket'
--end
dDiam = min( dH, dV)
end
end
-- verifico dalla forma se posso prendere utensile grande
--if ( Proc.Fct == 3 and bIsU and bSinglePart) or ( Proc.Fct == 2 and bIsL) or Proc.Fct == 1 then
-- sMchFindBackUp = sMchFind
-- --ottengo un diametro utensile opportuno
-- dDiam, sMchFind, nUseRoughTool, dDiamMax = CheckToolDiamByFaces( Proc, nFacInd, bMillDown, dH, dV, bIsU, bIsL, ( dFacElev + dCollSic), nUseRoughTool)
-- if not dDiam then
-- sMchFind = sMchFindBackUp
-- dDiam = min( dH, dV)
-- end
--end
-- se processo 20 e non sto usando il truciolatore
if Proc.Prc == 20 and nUseRoughTool == 0 then
if nUseRT and nUseRT ~= 0 then
@@ -3531,7 +3531,6 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
end
end
end
--EgtOutLog( 'Mortise Find Diam =' .. EgtNumToString( dDiam))
-- se da sotto, imposto massima lunghezza secondo la direzione
local dMaxTotLen
if bMillDown and BD.GetBottomToolMaxTotLen then