How to get parameter for a point on the curve

Dear Friends.

Geom2d_Curve class has method Value computing the point of parameter U:

gp_Pnt2d Geom2d_Curve::Value ( const Standard_Real  U ) const


I would like to do the opposite operation: having the point on the curve and I would like to get the value of the parameter. 

How to do that?

Thanks in advance.



Gianluca Antoniacci's picture

Hello Janusz,

normally this goal is achieved by projecting the point onto the curve and taking the projection parameter onto the curve. Have a look at the class GeomAPI_ProjectPointOnCurve.

With particular curves, sometimes, you can use the method ElCLib::Parameter() to get the parameter associated to the given point.

Best regards.