From f7ff7a68aba5493deb18ecbd183f41d0206d5c4b Mon Sep 17 00:00:00 2001 From: DarioS Date: Mon, 14 Feb 2022 17:57:23 +0100 Subject: [PATCH] DataBeam : - in DtTenon aggiunto nuovo step di altezza trave per consentire lavorazione con faccia diretta verso il basso - in LapJoint introdotto uso svuotature ZigZag ottimizzate. --- LuaLibs/ProcessDtTenon.lua | 11 ++++++++++- LuaLibs/ProcessLapJoint.lua | 18 ++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/LuaLibs/ProcessDtTenon.lua b/LuaLibs/ProcessDtTenon.lua index d7da2c0..052fe30 100644 --- a/LuaLibs/ProcessDtTenon.lua +++ b/LuaLibs/ProcessDtTenon.lua @@ -1,4 +1,4 @@ --- ProcessTenon.lua by Egaltech s.r.l. 2021/12/22 +-- ProcessTenon.lua by Egaltech s.r.l. 2022/02/10 -- Gestione calcolo tenone a coda di rondine per Travi -- 2021/04/08 Aggiunto controllo massimo materiale lavorabile dalla fresa. @@ -41,6 +41,15 @@ local function VerifyOrientation( Proc, vtN, b3Raw) else return ( vtN:getZ() >= -0.343) end + -- se trave medio-bassa + elseif b3Raw:getDimZ() <= 280 then + -- se tenone praticamente in asse, accetto fino a -25 deg + if abs( vtN:getY()) < 0.04 then + return ( vtN:getZ() >= -0.422) + -- altrimenti, accetto fino a -15 deg + else + return ( vtN:getZ() >= -0.259) + end -- se trave media elseif b3Raw:getDimZ() <= 350 then -- se tenone praticamente in asse, accetto fino a -22 deg diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 9b9f757..78d3833 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -1,4 +1,4 @@ --- ProcessLapJoint.lua by Egaltech s.r.l. 2022/02/07 +-- ProcessLapJoint.lua by Egaltech s.r.l. 2022/02/14 -- Gestione calcolo mezzo-legno per Travi -- 2019/10/08 Agg. gestione OpenPocket. -- 2021/01/24 Con sega a catena ora sempre impostato asse A. @@ -35,6 +35,7 @@ -- 2022/01/19 Cambiata % lunghezza pezzo per spezzatura. Tolta correzione spessore fresa a disco con superficie da lavorare verso Z-. -- 2022/01/26 Migliorato controllo uso testa da sotto nel caso due facce con lama. -- 2022/02/07 Corretto caso con due facce che non รจ un LongDoubleCut ma che veniva identificato come tale. +-- 2022/02/14 Introdotto uso svuotature ZigZag ottimizzate. -- Tabella per definizione modulo local ProcessLapJoint = {} @@ -1849,11 +1850,11 @@ local function MakeRoundCleanContour( Proc, nPhase, nRawId, nPartId, b3Raw, EgtSetMachiningParam( MCH_MP.STARTADDLEN, 0) EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0) else - -- nessun attacco e uscita, allungo inizio e fine di 3/4 del diametro utensile + -- nessun attacco e uscita, allungo inizio e fine di raggio utensile + 5mm (per evitare controllo collisioni) EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.NONE) EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.AS_LI) - EgtSetMachiningParam( MCH_MP.STARTADDLEN, 0.75 * dTDiam) - EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0.75 * dTDiam) + EgtSetMachiningParam( MCH_MP.STARTADDLEN, dTDiam / 2 + 5) + EgtSetMachiningParam( MCH_MP.ENDADDLEN, dTDiam / 2 + 5) end -- setto massimo affondamento possibile local dMachDepth = 0 @@ -3314,6 +3315,15 @@ local function MakePocket( Proc, nPartId, ptPs, tvtN, nFaceRef, sMchFind, nUseRo if sMchFind == 'OpenPocket' and nUseRoughTool == 0 then EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALIN) end + if sMchFind == 'OpenPocket' and dDiamTool < 90 then + local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFaceRef, GDB_ID.ROOT) + if min( dH, dV) < 1.5 * dDiamTool then + EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.ZIGZAG) + EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_POCK_LI.HELIX) + EgtSetMachiningParam( MCH_MP.LITANG, dDiamTool) + EgtSetMachiningParam( MCH_MP.LIELEV, 2) + end + end -- se elevazione superiore a massimo affondamento della fresa, riduco opportunamente local sWarn if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then