Wed, 02/08/2023 - 19:48
Working on FreeCAD. In the sketcher I'm making the snapping feature for hyperbolas curves.
There is an hyperbola, the user put the mouse pointer close to it (point A). So A is close to the hyperbola, but not exactly on it. I need to calculate the coordinates of the point B which is on the hyperbola. (then the point B is used to override A (mouse coordinates), such that the hyperbola is exactly under the mouse pointer).
On OCC doc I found the formula :
B = centerPoint + majorAxis * cosh(U) + minorAxis * sinh(U);
Which works as it calculate points on the hyperbola. However I can't find how to calculate U (ie the parameter). I have centerPoint, MajorAxis, MinorAxis and can access the OCC library.
Anyone knows how to find B or U?
Thanks!