- in MachiningLib.TestEngagement, PreSimulationLib e LeadInOutLib predisposte funzioni per calcolo extracorsa

This commit is contained in:
luca.mazzoleni
2025-12-18 17:32:50 +01:00
parent 6d1cae6ff3
commit c3a82a0804
3 changed files with 97 additions and 24 deletions
+9
View File
@@ -155,6 +155,10 @@ function LeadInOutLib.CalculateLeadInOut( sLeadInOutType, Parameters)
LeadOut.dPerpDistance = dLeadOutLength * vtLeadInOuttLoc:getY()
LeadOut.dTangentDistance = dLeadOutLength * vtLeadInOuttLoc:getX()
-- punti dell'attacco
LeadIn.ptPoint = Point3d( ptStartAtDepth + vtLeadInOut * dLeadInLength)
LeadOut.ptPoint = Point3d( ptEndAtDepth + vtLeadInOut * dLeadOutLength)
elseif sLeadInOutType == 'Tangent' then
-- calcolo distanza per uscire dal box con questa lama nella direzione tangenziale
@@ -166,8 +170,13 @@ function LeadInOutLib.CalculateLeadInOut( sLeadInOutType, Parameters)
LeadIn.dTangentDistance = dLeadInLength
LeadOut.dPerpDistance = 0
LeadOut.dTangentDistance = dLeadOutLength
-- punti dell'attacco
LeadIn.ptPoint = Point3d( ptStartAtDepth) ; LeadIn.ptPoint = ptStartAtDepth - Edge.vtEdge * dLeadInLength
LeadOut.ptPoint = Point3d( ptEndAtDepth) ; LeadOut.ptPoint = ptEndAtDepth + Edge.vtEdge * dLeadOutLength
end
-- lunghezza totale attacco
LeadIn.dTotalLength = sqrt( LeadIn.dPerpDistance ^ 2 + LeadIn.dTangentDistance ^ 2)
LeadOut.dTotalLength = sqrt( LeadOut.dPerpDistance ^ 2 + LeadOut.dTangentDistance ^ 2)