in SawPlusChain modifiche per contemplare lavorazioni con lama dei lati aperti

This commit is contained in:
luca.mazzoleni
2024-05-10 16:04:19 +02:00
parent 6c62ec1fe4
commit ce68e29112
+27 -6
View File
@@ -775,6 +775,10 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
return false
end
end
-- se forzata lavorazione con lama e feature aperta sulla coda potrei lavorare anche dalla coda
if Proc.AffectedFaces.Left and ( EgtGetInfo( Proc.Id, Q_SAW_PLUS_CHAIN, 'i') or 0) > 0 then
return true
end
-- deve avere la normale principale diretta verso la coda (oppure tunnel)
Topology.Classify( Proc, b3Raw)
local nFacInd, dElev, nFacInd2, dElev2 = BL.GetFaceWithMostAdj( Proc, nPartId)
@@ -4866,8 +4870,13 @@ function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine)
LeadOut.Type = MCH_MILL_LI.LINEAR
LeadIn.TangentDistance = 0
LeadOut.TangentDistance = 0
LeadIn.PerpDistance = EdgeToMachine.Elevation + BD.CUT_SIC
LeadOut.PerpDistance = EdgeToMachine.Elevation + BD.CUT_SIC
if EdgeToMachine.Elevation > -10 * GEO.EPS_SMALL then
LeadIn.PerpDistance = EdgeToMachine.Elevation + BD.CUT_SIC
LeadOut.PerpDistance = EdgeToMachine.Elevation + BD.CUT_SIC
else
LeadIn.PerpDistance = BD.CUT_SIC
LeadOut.PerpDistance = BD.CUT_SIC
end
LeadIn.Elevation = 0
LeadOut.Elevation = 0
LeadIn.CompLength = 0
@@ -5057,6 +5066,9 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg
Cutting.Workside = MCH_MILL_WS.LEFT
Cutting.Invert = false
end
if EdgeToMachine.Elevation < -10 * GEO.EPS_SMALL then
Cutting.Invert = not Cutting.Invert
end
-- TODO gestire lama da sotto e lama downUp
if FaceToMachine.VtN:getZ() < - 10 * GEO.EPS_SMALL then
Cutting.ToolInvert = true
@@ -5065,14 +5077,22 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg
Cutting.ToolInvert = false
end
-- profondità e offset radiale
-- TODO gestire elevazione negativa (determina come devo lavorare)
if Cutting.Tool.MaxDepth > abs( EdgeToMachine.Elevation) - 10 * GEO.EPS_SMALL then
-- TODO la depth dovrebbe essere quella del machining
Cutting.Depth = abs( EdgeToMachine.Elevation)
Cutting.RadialOffset = 0
if EdgeToMachine.Elevation > -10 * GEO.EPS_SMALL then
Cutting.RadialOffset = 0
else
Cutting.RadialOffset = EdgeToMachine.Elevation
end
else
Cutting.Depth = Cutting.Tool.MaxDepth
Cutting.RadialOffset = abs( EdgeToMachine.Elevation) - Cutting.Depth
if SawPlusChain.ApplyOnlySawblade then
if EdgeToMachine.Elevation > -10 * GEO.EPS_SMALL then
Cutting.RadialOffset = EdgeToMachine.Elevation - Cutting.Depth
else
Cutting.RadialOffset = -Cutting.Depth
end
if EdgeToMachine.Elevation > -10 * GEO.EPS_SMALL and SawPlusChain.ApplyOnlySawblade then
Cutting.Message = 'Feature '.. Proc.FeatureId .. ' : sawblade elevation (' .. EgtNumToString( EdgeToMachine.Elevation, 1) .. ') bigger than max tool depth (' .. EgtNumToString( Cutting.Depth, 1) .. ')'
EgtOutLog( Cutting.Message)
end
@@ -5264,6 +5284,7 @@ end
function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
SawPlusChain.ApplyOnlySawblade = bOnlySaw
local b3Raw = EgtGetRawPartBBox( nRawId)
-- TODO per implementare la strategia con lapjoint lunghe bisogna prima riconoscere le topologie che arrivano