DiscussionsIssue archiveOther usage issues

Archived discussion

Distance

Other usage issuesTue, 01/01/2002 - 17:091 reply

Browse this forum
QuestionAuthor

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

Discussion

1 archived reply

Posts are displayed in their archived order.

01Commenter-1

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.
Commenter-1.