Projecting multiple points onto a surface

I've been using GeomAPI_ProjectPointOnSurf to project a set of points onto a NURB surface. I call the Init method first and then call Perform for each point. This works fine and gives me the correct results but I am wondering if there is any way to improve it's performance.

Usually, each point is close to the previous one so it would make sense to me to be able to provide the previous points U,V coordinates as a starting point for the search for the new point rather than treat each point as if it's the only one. I was wondering if there was a way of doing this.

I also noticed in the Doxygen of GeomAPI_ProjectPointOnSurf that one of the Init methods was documented as saying "Init the projection for many points on a surface <Surface>. The solutions will be computed in the domain [Umin,Usup] [Vmin,Vsup] of the surface" suggesting it was for projecting multiple points but the parameters it takes don't seem to allow this. Is this an error in the documentation?


Mauro Mariotti's picture

I saw these ones, but I never tried them:




Jason Jones's picture

Hi Mauro,

Just had a look at the class ShapeAnalysis_Surface you mentioned and it looks to be exactly what I want. It has the added benefit that it says it's optimised for points that are know to be close to the surface - which is definitely the case for me.

Many thanks for this.