how to get (u, v) from the coordinate on the surface

As we know, according to the parameter vector(u, v), it is easy to get the coordinate of point in the surface(Geom_Surface::Value()). Inversely, if we have known the coordinate(x, y, z) of point in the surface, how to get the parameter vector (u, v)? Is there any API for that? Thanks.

By the way, I want to calculate the differential geometric property, such as normal vector, curvature and so on. So I think I should get the parameter vector(u, v) firstly, and then can use GeomLProp_SLProps to calculate them.

Rob Bachrach's picture

Since there is no gaurantee to OCC that the point you supply is exactly on the surface, you actually need to project your point on the surface and find the U,V of the nearest projected point (which may be the same as your initial point). Check out:
GeomAPI_ProjectPointOnSurf and use the LowerDistanceParameters function to get your result.