DataBeam :
- per macchine PF nei tagli con lama con linea di taglio orizzontale o quasi si prediligono attacchi/uscite tangenti - aggiunta gestione opzionale da configurazione macchina per angoli iniziali di lavorazione con sega a catena.
This commit is contained in:
+26
-39
@@ -247,6 +247,23 @@ local function GetChainSawBlockedAxis( nInd)
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function GetChainSawInitAngs( vtN, vtO)
|
||||
if BD.GetChainSawInitAngs then
|
||||
return BD.GetChainSawInitAngs( vtN, vtO)
|
||||
else
|
||||
if BD.C_SIMM then
|
||||
if vtN:getY() > 0 then
|
||||
return 'C=180'
|
||||
else
|
||||
return 'C=-180'
|
||||
end
|
||||
else
|
||||
return ''
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function VerifyChainSaw( Proc, dMinDim, dMaxDim, vtOrtho)
|
||||
local bUseChainSaw = false
|
||||
@@ -2995,15 +3012,9 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, EgtIf( bOpenStart, 0, - dSawWidth / 2))
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, EgtIf( bOpenEnd, 0, - dSawWidth / 2))
|
||||
end
|
||||
-- imposto angolo 3° asse rot
|
||||
-- imposto angolo 3° asse rot e eventuale angolo suggerito per inizio
|
||||
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, GetChainSawBlockedAxis( 1))
|
||||
if BD.C_SIMM then
|
||||
if vtN:getY() > 0 then
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, 'C=180')
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, 'C=-180')
|
||||
end
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, GetChainSawInitAngs( vtN, rfFac:getVersZ()))
|
||||
-- imposto offset radiale
|
||||
local dOffs = ( i - 1) * dStep
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
|
||||
@@ -3026,13 +3037,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
end
|
||||
-- impostazione alternativa angolo 3° asse rot
|
||||
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, GetChainSawBlockedAxis( 2))
|
||||
if BD.C_SIMM then
|
||||
if vtN:getY() > 0 then
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, 'C=180')
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, 'C=-180')
|
||||
end
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, GetChainSawInitAngs( vtN, rfFac:getVersZ()))
|
||||
if not EgtApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
@@ -3071,7 +3076,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
-- al momento, dato che la fessura è passante da parte a parte, gestisco solo la lavorazione
|
||||
-- dall'alto e di fronte (da dietro è disabilitata perchè ho exracorsa con la FAST).
|
||||
-- Questa feature non è applicata su facce di testa e quindi non controllo l'entrata in X
|
||||
if abs(vtOrtho:getZ()) >= 0.707 then
|
||||
if abs( vtOrtho:getZ()) >= 0.707 then
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
||||
--elseif abs(vtOrtho:getZ()) < 0.707 and abs(vtOrtho:getY()) > 0.707 then
|
||||
else
|
||||
@@ -3085,13 +3090,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
end
|
||||
-- imposto angolo 3° asse rot
|
||||
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, GetChainSawBlockedAxis( 1))
|
||||
if BD.C_SIMM then
|
||||
if vtN:getY() > 0 then
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, 'C=180')
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, 'C=-180')
|
||||
end
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, GetChainSawInitAngs( vtN, vtOrtho))
|
||||
-- imposto offset radiale
|
||||
local dOffs = ( i - 1) * dStep
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
|
||||
@@ -3116,14 +3115,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
end
|
||||
-- impostazione alternativa angolo 3° asse rot
|
||||
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
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, 'C=180')
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, 'C=-180')
|
||||
end
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, GetChainSawInitAngs( vtN, vtOrtho))
|
||||
if not EgtApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
@@ -4414,8 +4406,10 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_BACK)
|
||||
end
|
||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nLundIdFace, GDB_ID.ROOT)
|
||||
-- imposto angolo 3° asse rot
|
||||
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, GetChainSawBlockedAxis( 1))
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, GetChainSawInitAngs( vtN, vtOrtho))
|
||||
-- imposto offset radiale
|
||||
local dOffs = ( i - 1) * dStep
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
|
||||
@@ -4436,14 +4430,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
return false, sErr
|
||||
end
|
||||
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
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, 'C=180')
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, 'C=-180')
|
||||
end
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, GetChainSawInitAngs( vtN, vtOrtho))
|
||||
if not EgtApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
|
||||
Reference in New Issue
Block a user