when I have a vector in space (gp_Vec) and I want to project it onto a Geom_Surface/TopoDS_Face at a certain position, I have always done it like that:
- I have projected the position onto the surface with ShapeAnalysis_Surface::ValueOfUV.
- Then I have computed the vectors u and v spanning the tangent plane at this position with Geom_Surface::D1.
- At last I have computed the coordinates x and y such that x * u + y * v is the space vector projected onto the tangent plane at my position.
The according gp_Vec2d is then the vector with the two coordinates x and y.
I wonder whether it is necessary to do these computations on my own. Are there some OCC functions that do that? Perhaps optimized ones?
Thank you for your answers,