From 5d5732e1426bef8054a0b76313fbfbfde39bbdbe Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 25 May 2020 13:43:35 +0000 Subject: [PATCH] =?UTF-8?q?DataBeam=20:=20-=20aggiunta=20gestione=20sfrido?= =?UTF-8?q?=20di=20testa=20e=20coda=20da=20parametri=20utente=20TS3=20-=20?= =?UTF-8?q?aggiunta=20gestione=20lavorazione=20tipo=20Mortise=20per=20mort?= =?UTF-8?q?asature=20-=20tolto=20controllo=20non=20pi=C3=B9=20utile=20da?= =?UTF-8?q?=20DtMortise.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/BeamExec.lua | 2 +- LuaLibs/ProcessDtMortise.lua | 8 ++------ LuaLibs/ProcessHeadCut.lua | 2 +- LuaLibs/ProcessMortise.lua | 7 +++++-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index 925976d..7311158 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -871,7 +871,7 @@ end ------------------------------------------------------------------------------------------------------------- local function MoveDrillsOnTenon( vProc) -- se non richiesto spostamento fori su tenone, esco - if abs( BD.OFFSET_DRILL_TENON) < 0.1 then return end + if not BD.OFFSET_DRILL_TENON or abs( BD.OFFSET_DRILL_TENON) < 0.1 then return end -- ciclo sulle feature for i = 1, #vProc do if Tenon.Identify( vProc[i]) then diff --git a/LuaLibs/ProcessDtMortise.lua b/LuaLibs/ProcessDtMortise.lua index 276c57e..f8a2c6b 100644 --- a/LuaLibs/ProcessDtMortise.lua +++ b/LuaLibs/ProcessDtMortise.lua @@ -1,4 +1,4 @@ --- ProcessDtMortise.lua by Egaltech s.r.l. 2020/04/27 +-- ProcessDtMortise.lua by Egaltech s.r.l. 2020/05/25 -- Gestione calcolo mortase a coda di rondice per Travi -- Tabella per definizione modulo @@ -245,11 +245,7 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId) vtAx:normalize() local vtOrtDiff = vtDiff - vtDiff * vtAx * vtAx local dDist = vtOrtDiff:len() - if dDist < dToolDiam + 0.5 then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' Dt mortise too narrow' - EgtOutLog( sErr) - return false, sErr - end + -- calcolo le passate local nPass = ceil( dDist / ( 1.9 * dToolDiam)) local dStep = ( dDist - 0.95 * dToolDiam) / ( 2 * nPass) for i = nPass, 1, -1 do diff --git a/LuaLibs/ProcessHeadCut.lua b/LuaLibs/ProcessHeadCut.lua index 7d002e3..d27a5d4 100644 --- a/LuaLibs/ProcessHeadCut.lua +++ b/LuaLibs/ProcessHeadCut.lua @@ -55,7 +55,7 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut -- flag di lavorazione faccia local nOrthoOpposite = EgtIf( bHorizCut, MCH_MILL_FU.ORTHO_DOWN, MCH_MILL_FU.ORTHO_FRONT) -- determino se più tagli con offset - local nCuts = max( ceil( dOvmHead / BD.MAX_LEN_SCRAP), 1) + local nCuts = max( ceil( dOvmHead / ( BD.MAX_LEN_SCRAP_START or BD.MAX_LEN_SCRAP)), 1) local dOffsL = dOvmHead / nCuts -- calcolo extra taglio ed accorciamento local dCutExtra = 0 diff --git a/LuaLibs/ProcessMortise.lua b/LuaLibs/ProcessMortise.lua index 1cba98b..88a6848 100644 --- a/LuaLibs/ProcessMortise.lua +++ b/LuaLibs/ProcessMortise.lua @@ -1,4 +1,4 @@ --- ProcessMortise.lua by Egaltech s.r.l. 2020/04/27 +-- ProcessMortise.lua by Egaltech s.r.l. 2020/05/25 -- Gestione calcolo mortase per Travi -- Tabella per definizione modulo @@ -160,7 +160,10 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId) -- determino larghezza della mortasa if dL < dW then dL, dW = dW, dL end -- recupero la lavorazione - local sPocketing = ML.FindPocketing( 'Pocket', dW) + local sPocketing = ML.FindPocketing( 'Mortise', dW) + if not sPocketing then + sPocketing = ML.FindPocketing( 'Pocket', dW) + end if not sPocketing then local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' pocketing not found in library' EgtOutLog( sErr)