DataBeam :
- in contorni liberi gestite fresature parziali non fattibili da sotto - aggiunti antischeggia in mortase a coda di rondine - migliorie varie.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- ProcessStepJointNotch.lua by Egaltech s.r.l. 2020/03/17
|
||||
-- ProcessStepJointNotch.lua by Egaltech s.r.l. 2020/03/18
|
||||
-- Gestione calcolo tacca a gradino per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -117,7 +117,6 @@ local function MachineByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Solid,
|
||||
return bOk, sErr
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -133,6 +132,7 @@ local function MakePocket( Proc, nPartId, ptPs, vtN, nFaceRef, nDiffWidth, sMchF
|
||||
dElev = dLedOut
|
||||
end
|
||||
local dCollSic = 2 * BD.COLL_SIC
|
||||
local sTuuidMstr
|
||||
-- calcolo il diametro utensile
|
||||
local dDiamTool
|
||||
if nUseRoughTool == 1 then
|
||||
@@ -147,6 +147,13 @@ local function MakePocket( Proc, nPartId, ptPs, vtN, nFaceRef, nDiffWidth, sMchF
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- recupero il diametro dell'utensile
|
||||
if EgtMdbSetCurrMachining( sPocketing) then
|
||||
sTuuidMstr = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuidMstr) or '') then
|
||||
dDiamTool = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dDiamTool
|
||||
end
|
||||
end
|
||||
-- inserisco la lavorazione di svuotatura
|
||||
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. 'F' .. tostring( nFaceRef - 1)
|
||||
local nMchFId = EgtAddMachining( sName, sPocketing)
|
||||
@@ -165,10 +172,8 @@ local function MakePocket( Proc, nPartId, ptPs, vtN, nFaceRef, nDiffWidth, sMchF
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
|
||||
end
|
||||
-- se tasca aperta e non lavorata col truciolatore, imposto opportuno attacco
|
||||
if sMchFind == 'OpenPocket' and nUseRoughTool == 0 then
|
||||
EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALIN)
|
||||
end
|
||||
-- La tasca ha sempre almeno un lato aperto, imposto opportuno attacco
|
||||
EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALIN)
|
||||
-- imposto elevazione
|
||||
local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 1) .. ';'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
|
||||
@@ -181,24 +186,25 @@ local function MakePocket( Proc, nPartId, ptPs, vtN, nFaceRef, nDiffWidth, sMchF
|
||||
return false, sErr
|
||||
end
|
||||
end
|
||||
return true
|
||||
return true, '', sTuuidMstr
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, ptC, vtN, nBigInd, nSmaInd, ptPs, tBHx, b3Raw, nDiffWidth, nUseRoughTool, dAng)
|
||||
|
||||
local sMchFind = 'Pocket'
|
||||
-- se feature non larga come trave provo a verificare se sborda da un lato o è completamente dentro la faccia del trave
|
||||
if nDiffWidth ~= 1 then sMchFind = 'OpenPocket' end
|
||||
-- se feature non passante disabilito eventuale sgrossatore
|
||||
if nDiffWidth ~= 0 then nUseRoughTool = 0 end
|
||||
|
||||
-- se feature é larga come trave imposto openpocket
|
||||
if nDiffWidth == 0 then
|
||||
sMchFind = 'OpenPocket'
|
||||
-- altrimenti se non è passante disabilito il truciolatore
|
||||
else
|
||||
nUseRoughTool = 0
|
||||
end
|
||||
-- applico la svuotatura
|
||||
local bOk, sErr = MakePocket( Proc, nPartId, ptPs, vtN, nBigInd, nDiffWidth, sMchFind, nUseRoughTool, tBHx)
|
||||
local bOk, sErr, sTuuidMstr = MakePocket( Proc, nPartId, ptPs, vtN, nBigInd, nDiffWidth, sMchFind, nUseRoughTool, tBHx)
|
||||
if not bOk then
|
||||
return bOk, sErr
|
||||
end
|
||||
|
||||
-- se angolo tra le facce maggiore di 90, inserisco la contornatura o svuotatura del lato più corto
|
||||
if ( 180 + dAng) > 90.1 then
|
||||
-- se la normale della faccia corta si discosta dalla trave di più di 30 gradi utilizzo la svutatura altrimenti la contornatura
|
||||
@@ -234,7 +240,13 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, ptC, vtN,
|
||||
end
|
||||
end
|
||||
end
|
||||
local sMilling = ML.FindMilling( 'LongSmallCut')
|
||||
local sMilling
|
||||
if nUseRoughTool > 0 then
|
||||
sMilling = ML.FindMilling( 'Long2Cut', nil, sTuuidMstr)
|
||||
else
|
||||
sMilling = ML.FindMilling( 'LongSmallCut', nil, sTuuidMstr)
|
||||
end
|
||||
|
||||
if not sMilling then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' milling not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -262,6 +274,8 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, ptC, vtN,
|
||||
EgtSetMachiningGeometry( {{ Proc.Id, (nSmaInd-1)}})
|
||||
-- imposto uso faccia
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
|
||||
-- setto inversione del percorso
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||
-- 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))
|
||||
@@ -339,7 +353,6 @@ local function MakeTwoFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, nDiffWidth
|
||||
return bOk, sErr
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user