DataBeam :
- correzioni per fessure longitudinali con lamello - correzioni per StepJointNotch con testa da sotto (se presente).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- ProcessStepJointNotch.lua by Egaltech s.r.l. 2021/03/21
|
||||
-- ProcessStepJointNotch.lua by Egaltech s.r.l. 2021/09/22
|
||||
-- Gestione calcolo tacca a gradino per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -39,7 +39,6 @@ function ProcessStepJointNotch.Classify( Proc)
|
||||
-- se faccia limite la salto
|
||||
if AreSameOrOppositeVectorApprox( vtN, Y_AX()) or AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
|
||||
-- attualmente non gestita
|
||||
-- return false, false
|
||||
-- altrimenti faccia principale
|
||||
elseif vtN:getZ() < -0.1 then
|
||||
bDown = true
|
||||
@@ -53,8 +52,15 @@ local function MachineByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Solid,
|
||||
|
||||
-- delta negativo affondamento lama
|
||||
local dExtraUp = -0.3
|
||||
-- abilitazione lavorazione da sotto (testa da sotto e direzione normale sotto -30deg)
|
||||
local bTopHead = ( BD.DOWN_HEAD and vtN[nBigInd]:getZ() > -0.1)
|
||||
local bDownHead = ( BD.DOWN_HEAD and vtN[nBigInd]:getZ() < 0.1)
|
||||
-- recupero la lavorazione
|
||||
local sCutting = ML.FindCutting( 'HeadSide')
|
||||
local sCutting = ML.FindCutting( 'HeadSide' .. EgtIf( bDownHead, '_H2', ''))
|
||||
if not sCutting and bTopHead then
|
||||
sCutting = ML.FindCutting( sCutType)
|
||||
bDownHead = false
|
||||
end
|
||||
if not sCutting then
|
||||
local sErr = 'Error : cutting not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -108,13 +114,13 @@ local function MachineByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Solid,
|
||||
local bFront = ( ptC[k]:getY() < ptPs:getY())
|
||||
nOrthoOpposite = EgtIf( bFront, MCH_MILL_FU.ORTHO_BACK, MCH_MILL_FU.ORTHO_FRONT)
|
||||
else
|
||||
local bOver = true
|
||||
local bOver = ( vtN[nBigInd]:getZ() > -0.1)
|
||||
nOrthoOpposite = EgtIf( bOver, MCH_MILL_FU.ORTHO_DOWN, MCH_MILL_FU.ORTHO_TOP)
|
||||
end
|
||||
-- lavoro la faccia
|
||||
for j = 1, #vCuts[i] do
|
||||
local dLocCutExtra = EgtIf( j == #vCuts[i], dCutExtra - dExtraUp, dCutExtra)
|
||||
local bOk, sErr = BL.MakeOneFaceBySaw( vCuts[i][j], 0, sCutting, dSawDiam, nOrthoOpposite, nil, dLocCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
||||
local bOk, sErr = BL.MakeOneFaceBySaw( vCuts[i][j], 0, sCutting, dSawDiam, nOrthoOpposite, EgtIf( bDownHead, -2, nil), dLocCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
||||
if not bOk then
|
||||
return bOk, sErr
|
||||
end
|
||||
@@ -151,7 +157,15 @@ local function MakePocket( Proc, nPartId, ptPs, vtN, nFaceRef, nDiffWidth, sMchF
|
||||
-- se non uso truciolatore prendo il valore dalle dimensioni minime delle facce
|
||||
dDiamTool = min( tBHx[nFaceRef][1], tBHx[nFaceRef][2])
|
||||
end
|
||||
local sPocketing = ML.FindPocketing( sMchFind, dDiamTool, dElev + dCollSic)
|
||||
-- abilitazione lavorazione da sotto (testa da sotto e direzione normale sotto -30deg)
|
||||
local bTopHead = ( BD.DOWN_HEAD and vtN[nFaceRef]:getZ() > -0.1)
|
||||
local bDownHead = ( BD.DOWN_HEAD and vtN[nFaceRef]:getZ() < 0.1)
|
||||
-- recupero la lavorazione
|
||||
local sPocketing = ML.FindPocketing( sMchFind.. EgtIf( bDownHead, '_H2', ''), dDiamTool, dElev + dCollSic)
|
||||
if not sPocketing and bTopHead then
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiamTool, dElev + dCollSic)
|
||||
bDownHead = false
|
||||
end
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : pocketing not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -250,13 +264,16 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, ptC, vtN,
|
||||
end
|
||||
end
|
||||
end
|
||||
-- abilitazione lavorazione da sotto (testa da sotto e direzione normale sotto -30deg)
|
||||
local bTopHead = ( BD.DOWN_HEAD and vtN[nBigInd]:getZ() > -0.1)
|
||||
local bDownHead = ( BD.DOWN_HEAD and vtN[nBigInd]:getZ() < 0.1)
|
||||
-- scelta lavorazione
|
||||
local sMilling
|
||||
if nUseRoughTool > 0 then
|
||||
sMilling = ML.FindMilling( 'Long2Cut', nil, sTuuidMstr)
|
||||
else
|
||||
sMilling = ML.FindMilling( 'LongSmallCut', nil, sTuuidMstr)
|
||||
local sTypeMill = EgtIf( nUseRoughTool > 0, 'Long2Cut', 'LongSmallCut')
|
||||
sMilling = ML.FindMilling( sTypeMill .. EgtIf( bDownHead, '_H2', ''), nil, sTuuidMstr)
|
||||
if not sMilling and bTopHead then
|
||||
sMilling = ML.FindMilling( sTypeMill, nil, sTuuidMstr)
|
||||
end
|
||||
|
||||
if not sMilling then
|
||||
local sErr = 'Error : milling not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -295,6 +312,11 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, ptC, vtN,
|
||||
-- applico gli allungamenti o accorciamenti considerando che la lavorazione è invertita
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, EgtIf( bOpenStart, dTDiam / 2, - dTDiam / 2))
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, EgtIf( bOpenEnd, dTDiam / 2, - dTDiam / 2))
|
||||
-- attacchi e uscite lineari con parte tg nulla
|
||||
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.LINEAR)
|
||||
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, 20)
|
||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.AS_LI)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
|
||||
Reference in New Issue
Block a user