How can I get Tangential direction Vector in Python
<p>I can get some info from a Arc.</p>

<ul>
<li>FirstPoint ã [x,y,z]</li>
<li>LastPoint  ã [x,y,z]</li>
<li>Center ãã   [x,y,z]</li>
<li>Axis   ãã ã [x,y,z] # Perpendicular to the plane</li>
</ul>

<p>How can I get the FirstPoint&amp;LastPoint's tangential direction Vector ?</p>

<p>I want to get a intersection Point from two direction vector.</p>

<p>PS: Work in FreeCAD.</p>

<p>Thanks for any reply</p>

<p>best regards,
Eason</p>

<p>We'll need a lot more information to give a good answer, but here is a first attempt, with questions after.</p>

<p>One way to approximate a tangent vector is with a secant vector: If your curve is given parametrically as a function of t and you want the tangent at t_0, then choose some small number e; evaluate the function at t_0 + e and at t_0 - e; then subtract the two results to get the secant vector. It will be a good approximation to the tangent vector if your curve isn't too curvy in that interval around t.</p>

<p>Now for the questions. How is your question related to Python, and where does FreeCAD come in? You have constructed the curve in FreeCAD, and you want to compute tangents in Python? Can you say anything about the curve, like whether it's a cubic spline curve, whether it curves in only one direction, what you mean by "center" and "axis"? (An arbitrary curve with tangent vectors isn't necessarily a cubic spline, might curve in very complicated ways, and doesn't have any notion of a center or axis.)</p>

python math direction freecad