Distance

my problem is as follows A given curve y =f(x) and a point p(x,y) i need to find out the shortest distance between the given point and the curve !

please help me out.

Vedanth

Francois Lauzon's picture

Hi Vedanth,
One way to do it would be to describe your curve as a Geom_Curve (you have to define a bunch of pure virtual functions, mainly to compute derivatives of your curve), then you could build a TopoDS_Edge and
use the BRepExtrema_ExtPC algoritm to compute your solution.

Good Luck.
Francois.