I want to show the clicked point as a point projected on the plane XOY.
I have used Stephane's ConvertClickToPoint to get the clicked point and now I'm doing this:
gp_Pnt CXXXView::ProjectPointToXY(gp_Pnt clickedPoint, Handle_V3d_View aView)
gp_Pln PlaneOfTheProj (gp_Ax3(gp::XOY()));
//Convert to a surface
TopoDS_Face face = BRepBuilderAPI_MakeFace(PlaneOfTheProj);
const GeomAdaptor_Surface& geomAdapSurf = surface.Surface();
const Handle(Geom_Surface)& geomSurf = geomAdapSurf.Surface();
//Projects the point
gp_Pnt ResultPoint = prj.Point(index);
It almost work, it does the projection on XY but not on the clicked point but on a near point.
Any idea on what could happen?
Thank you very much.