I am working on a script in C++ to project some points on a BrepFace. Right now, I am using the GetClosestPoint method of the ON_BrepFace class. However, this method is giving me wrong points on the surface (compared to the result obtained using the command Project directly on Rhino which is correct). Do you know why this difference could occur and how to overcome this problem?
The standalone openNURBS toolkit does not have the ability to project points onto surface, as this is a curve-surface intersection operation and the standalone toolkit does not include intersection calculations.
That said, if you writing a plug-in using the Rhino C/C++ SDK, then you can project points on to surfaces or Breps using RhinoProjectPointsToBreps. See rhinoSdkUtilities.h for details.