From 1f730989b3fdc4ad72f94919507b4867e77ec5bd Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 9 Feb 2024 10:05:38 +0100 Subject: [PATCH] - Ora i rabbet lungo X che guardano in basso sono sempre fatti con fresatura di lato per evitare di ruotare. --- LuaLibs/BeamLib.lua | 2 +- LuaLibs/ProcessLapJoint.lua | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index 6133984..f65dc8d 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -860,7 +860,7 @@ function BeamLib.GetBlockedAxis( sMachining, sBlockedAxis, b3Raw, vtTool, vtOut) end -- se presente funzione specifica nella macchina, la richiamo if BD.GetBlockedAxis then - return BD.GetBlockedAxis( sHead, nToolType, sBlockedAxis, b3Raw, vtTool, vtOut) + return BD.GetBlockedAxis( sHead, nToolType, sBlockedAxis, b3Raw, vtTool, vtOut) or '' -- sezione mantenuta per retrocompatibilità con GetChainSawBlockedAxis elseif nToolType == MCH_TY.MORTISE_STD then local nInd = EgtIf( sBlockedAxis == 'parallel', 0, 1) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index d453998..a2c708f 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -91,6 +91,7 @@ -- 2024/01/22 Implementata gestione seghe a catena multiple. -- 2024/01/31 In tagli con sega a catena ora si considera l'ingombro della testa per il calcolo della massima profondità. -- Aggiunta funzione GetToolEntryAngle per determinare l'angolo di ingresso dell'utensile nella faccia. +-- 2024/02/08 Ora i rabbet lungo X che guardano in basso sono sempre fatti con fresatura di lato per evitare di ruotare. -- Tabella per definizione modulo local ProcessLapJoint = {} @@ -758,8 +759,9 @@ function ProcessLapJoint.Classify( Proc, b3Raw) local bDown = ( vtN[1]:getZ() < BD.NZ_MINB and vtN[2]:getZ() < BD.NZ_MINB) or ( vtN[1]:getZ() < BD.NZ_MINA and vtN[2]:getZ() < 0.5 and ( vtN[2]:getZ() < -0.1 or not bSmall)) or ( vtN[2]:getZ() < BD.NZ_MINA and vtN[1]:getZ() < 0.5 and ( vtN[1]:getZ() < -0.1 or not bSmall)) - -- se forzata la lavorazione con fresa di lato da parametro Q03=2/3 non devo ruotare - local bForceSideMill = ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'd') == 2 or EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'd') == 3) + -- se forzata la lavorazione con fresa di lato da parametro Q03=2/3 non devo ruotare; se rabbet lungo X che guarda in giù sempre fresatura di lato e quindi non ruoto + local bIsRabbetAlongXTowardsBottom = ( Proc.TopologyLongName == 'Rabbet-Through-RightAngles-Parallel-2' and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and Proc.AffectedFaces.Bottom and Proc.AffectedFaces.Left and Proc.AffectedFaces.Right) + local bForceSideMill = ( bIsRabbetAlongXTowardsBottom or ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'd') == 2 or EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'd') == 3)) bDown = ( bDown and not BD.DOWN_HEAD and not BD.TURN and not bForceSideMill) return true, bDown -- se più di 2 facce @@ -4705,8 +4707,9 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local bIsU = ( Proc.Fct == 3 and not TestElleShape3( Proc)) -- verifico se due facce o L con una o due facce di terminazione local bIsL = ( Proc.Fct == 2 or TestElleShape3( Proc) or TestElleShape4( Proc) == 2) - -- se parametro Q03=2 forzo la fresatura di lato; con Q03=3 forzo solo se la faccia di lavoro non è rivolta verso l'alto +/-10° - local bForceSideMill = ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 2 or ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 3 and vtN:getZ() < 0.985)) and ( Proc.Fct == 4 or Proc.Fct == 3 or Proc.Fct == 2) + -- se parametro Q03=2 forzo la fresatura di lato; con Q03=3 forzo solo se la faccia di lavoro non è rivolta verso l'alto +/-10°; se rabbet lungo X che guarda in giù sempre fresatura di lato + local bIsRabbetAlongXTowardsBottom = ( Proc.TopologyLongName == 'Rabbet-Through-RightAngles-Parallel-2' and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and Proc.AffectedFaces.Bottom and Proc.AffectedFaces.Left and Proc.AffectedFaces.Right) + local bForceSideMill = bIsRabbetAlongXTowardsBottom or ( ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 2 or ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 3 and vtN:getZ() < 0.985)) and ( Proc.Fct == 4 or Proc.Fct == 3 or Proc.Fct == 2)) -- se fattibile con fresa BH di fianco e spessore utensile inferiore alla larghezza faccia local bMakeBySideMill, bHead, bHeadDir, sMilling, dMaxMat, dToolDiam = VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill) if bPrevBhSideMill == nil then