Extrema Performance

Hi everybody,

I have a number of points points[10000] around a surface surface1.
For each point, I want to compute the shortest destines to the surface.
Currently, I am using GeomAPI_ProjectPointOnSurf but the performance is not efficient enough.
I brows the Extrema but the docs does not help so I brows the inc directory and I found many classes like Extrema_ExtPS, Extrema_POnSurf and many more.

My question is that what is the most efficient way to do this operation (using which OCC class).

My current code:

gp_Pnt points[10000]
Handle(Geom_BSplineSurface) Surface1
GeomAPI_ProjectPointOnSurf PPS
…………………..
…. Load Data …..
…………………..

for (int i=1; i {
PPS.Init(points[i],Surface1);
nearest_point[I] = PPS.NearestPoint();
}

thanks

Abraham4D's picture

Do you think if I would write my own code to compute that is it going to optimize this operation more better?