From d585a45b1843da72cbcb80c2c45322d1d61df803 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 2 Mar 2021 09:57:58 +0000 Subject: [PATCH] DataBeam : - in Tenoni DT angolo limite per testa sotto portato a +10 gradi - in LapJoint migliorato controllo diametro frese per svuotature, con testa sotto non si controlla vtNz per cambiare faccia, migliorata scelta utensile per svuotatura. --- LuaLibs/ProcessDtTenon.lua | 4 ++-- LuaLibs/ProcessLapJoint.lua | 45 ++++++++++++++++++++----------------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/LuaLibs/ProcessDtTenon.lua b/LuaLibs/ProcessDtTenon.lua index 7c0c2e7..babecbf 100644 --- a/LuaLibs/ProcessDtTenon.lua +++ b/LuaLibs/ProcessDtTenon.lua @@ -1,4 +1,4 @@ --- ProcessTenon.lua by Egaltech s.r.l. 2021/02/11 +-- ProcessTenon.lua by Egaltech s.r.l. 2021/03/01 -- Gestione calcolo tenone a coda di rondine per Travi -- Tabella per definizione modulo @@ -219,7 +219,7 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) end -- abilitazione lavorazione da sotto local bMillUp = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.259) - local bMillDown = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.1) + local bMillDown = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.174) -- recupero la lavorazione local sMillType = 'DtTenon' local sMilling = ML.FindMilling( sMillType .. EgtIf( bMillDown, '_H2', '')) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index effbdd5..b7a28d3 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -1,4 +1,4 @@ --- ProcessLapJoint.lua by Egaltech s.r.l. 2021/02/23 +-- ProcessLapJoint.lua by Egaltech s.r.l. 2021/03/01 -- Gestione calcolo mezzo-legno per Travi -- 2019/10/08 Agg. gestione OpenPocket. -- 2021/01/24 Con sega a catena ora sempre impostato asse A. @@ -2697,7 +2697,7 @@ local function CheckPocketTool( sMchFind, dDiam, dElev) end --------------------------------------------------------------------- -local function CheckDiamToolByFaces( Proc, nFacInd, dH, dV, bIsU, bIsL, dElev, nUseRoughTool) +local function CheckToolDiamByFaces( Proc, nFacInd, dH, dV, bIsU, bIsL, dElev, nUseRoughTool) local dMaxDimFace = max( dH, dV) -- verifico che diametro utensile prende con la openpocket con la massima dimensione faccia local bUseMaxTool, dMaxDiam @@ -2756,8 +2756,8 @@ local function CheckDiamToolByFaces( Proc, nFacInd, dH, dV, bIsU, bIsL, dElev, n local dLen22 = dist( tExtremPt[1][2], tExtremPt[2][2]) dLargeVal = min( dLargeVal, dLen11, dLen12, dLen21, dLen22) end - -- se forma a l e flag uso truciolatore, favorisco il suo utilizzo - if bIsL and nUseRoughTool == 1 then + -- se forma a L, raggio inferiore alla dimensione minima e flag uso truciolatore, favorisco il suo utilizzo + if bIsL and nUseRoughTool == 1 and dMaxDiam / 2 < dLargeVal then return dMaxDiam, 'OpenPocket', nUseRoughTool, dMaxDiam else -- per essere accettabile, il diametro massimo deve essere minore della larghezza della faccia @@ -3301,8 +3301,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa -- altrimenti lavorazione di svuotatura o contornatura else local bUseOtherFace - -- se orientata verso il basso, verifico l'alternativa - if vtN:getZ() < BD.NZ_MINA and nFacInd2 then + -- se orientata verso il basso e non c'รจ testa da sotto, verifico l'alternativa + if vtN:getZ() < BD.NZ_MINA and not BD.DOWN_HEAD and nFacInd2 then ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd2, GDB_ID.ROOT) nFacInd, nFacInd2 = nFacInd2, nFacInd dFacElev, dFacElev2 = dFacElev2, dFacElev @@ -3401,7 +3401,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa if ( Proc.Fct == 3 and bIsU and bSinglePart) or ( Proc.Fct == 2 and bIsL) or Proc.Fct == 1 then sMchFindBackUp = sMchFind --ottengo un diametro utensile opportuno - dDiam, sMchFind, nUseRoughTool, dDiamMax = CheckDiamToolByFaces( Proc, nFacInd, dH, dV, bIsU, bIsL, ( dFacElev + dCollSic), nUseRoughTool) + dDiam, sMchFind, nUseRoughTool, dDiamMax = CheckToolDiamByFaces( Proc, nFacInd, dH, dV, bIsU, bIsL, ( dFacElev + dCollSic), nUseRoughTool) if not dDiam then if nUseRoughTool == 0 then sMchFind = 'OpenPocket' @@ -3419,23 +3419,28 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa end end end + -- abilitazione lavorazione da sotto + local bMillUp = ( BD.DOWN_HEAD and vtN:getZ() > -0.259) + local bMillDown = ( BD.DOWN_HEAD and vtN:getZ() < 0.342) --EgtOutLog( 'Mortise Find Diam =' .. EgtNumToString( dDiam)) + -- ricerca lavorazione local sPocketing - if BD.DOWN_HEAD and sMchFind and vtN:getZ() < 0.174 then sMchFind = sMchFind .. '_H2' end - if nUseRoughTool == 1 then - sMyPocketing, dMyTDiam, dMyTMaxDepth = ML.FindPocketing( sMchFind, dDiam) - if sMyPocketing and dMyTMaxDepth > 0.8 * dFacElev + dCollSic then - sPocketing = sMyPocketing - end - else - sPocketing = ML.FindPocketing( sMchFind, dDiam, dFacElev + dCollSic) + local sMyPocketing, dMyTDiam, dMyTMaxDepth = ML.FindPocketing( sMchFind .. EgtIf( bMillDown, '_H2', ''), dDiam, dFacElev + dCollSic) + if not sMyPocketing then + sMyPocketing, dMyTDiam, dMyTMaxDepth = ML.FindPocketing( sMchFind .. EgtIf( bMillDown, '_H2', ''), dDiam) end - -- se non trovata verifico affondamento - if not sPocketing and nUseRoughTool == 0 then - local sMyPocketing, dMyTDiam, dMyTMaxDepth = ML.FindPocketing( sMchFind, dDiam) - if sMyPocketing and ( dMyTMaxDepth > 0.8 * dFacElev + dCollSic or bIsL) then - sPocketing = sMyPocketing + if not sMyPocketing and bMillUp then + sMyPocketing, dMyTDiam, dMyTMaxDepth = ML.FindPocketing( sMchFind, dDiam, dFacElev + dCollSic) + if not sMyPocketing then + sMyPocketing, dMyTDiam, dMyTMaxDepth = ML.FindPocketing( sMchFind, dDiam) end + bMillDown = false + end + if sMyPocketing and ( dMyTMaxDepth > 0.8 * dFacElev + dCollSic or ( bIsL and nUseRoughTool == 0)) then + sPocketing = sMyPocketing + end + if bMillDown then + sMchFind = sMchFind ..'_H2' end -- se feature 16 o 17 e forzata lama e forma ad U, annulla la svuotatura if ( Proc.Prc == 16 or Proc.Prc == 17) and bForceUseBlade and Proc.Fct == 3 and bIsU then