diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 7bb7b0b..363bf93 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -4792,11 +4792,12 @@ end function SawPlusChain.CalculateLeadInOut( Proc, Machining) + -- TODO qui saranno da implementare le funzioni di Tool Collision Avoidance (vedi wiki e FacesBysaw -> CalcLeadInOutPerpGeom) + -- si determina se l'inizio o la fine della lavorazione sono chiusi e l'eventuale riduzione da applicare local bIsStartClosed = false local bIsEndClosed = false local bIsMortising = ( Machining.Type == MCH_OY.MORTISING) - local dExtraPerpDistance = EgtMdbGetGeneralParam( MCH_GP.SAFEZ) local dAddLengthToReduce = 0 if bIsMortising then dAddLengthToReduce = Machining.Tool.Diameter / 2 @@ -4835,8 +4836,8 @@ function SawPlusChain.CalculateLeadInOut( Proc, Machining) LeadOut.Type = MCH_MILL_LI.LINEAR LeadIn.TangentDistance = 0 LeadOut.TangentDistance = 0 - LeadIn.PerpDistance = Machining.Depth + dExtraPerpDistance - Machining.RadialOffset + BD.CUT_EXTRA - LeadOut.PerpDistance = Machining.Depth + dExtraPerpDistance - Machining.RadialOffset + BD.CUT_EXTRA + LeadIn.PerpDistance = Proc.Pocket.Depth + BD.CUT_SIC + LeadOut.PerpDistance = Proc.Pocket.Depth + BD.CUT_SIC LeadIn.Elevation = 0 LeadOut.Elevation = 0 LeadIn.CompLength = 0 @@ -4846,10 +4847,15 @@ function SawPlusChain.CalculateLeadInOut( Proc, Machining) LeadOut.EndAddLength = -dAddLengthToReduce elseif bIsStartClosed then LeadIn.StartAddLength = -dAddLengthToReduce + -- eventuale correzione per accorciamento maggiore di larghezza tasca LeadOut.EndAddLength = BD.CUT_EXTRA + max( -LeadIn.StartAddLength - Proc.Pocket.Width, 0) elseif bIsEndClosed then LeadOut.EndAddLength = -dAddLengthToReduce + -- eventuale correzione per accorciamento maggiore di larghezza tasca LeadIn.StartAddLength = BD.CUT_EXTRA + max( -LeadOut.EndAddLength - Proc.Pocket.Width, 0) + else + LeadIn.StartAddLength = BD.CUT_EXTRA + LeadOut.EndAddLength = BD.CUT_EXTRA end else if bIsStartClosed then