- in sawpluschain correzione a attacchi

This commit is contained in:
luca.mazzoleni
2024-04-04 10:14:16 +02:00
parent 5f1aaac719
commit b5094daa43
+9 -3
View File
@@ -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