-------------------------------------------------------------------------------
In this case the algorithm find 3 solutions :

Point 1 : IsMin=true; point=(1000.0,1000.0,0.0); param=0.0; distance=501.99
Point 2 : IsMin=false; point=(1986.98,1170.38,0.0); param=1.79; distance=1041.0
Point 3 : IsMin=false; point=(1000.0,1500.0,0.0); param=4.0; distance=1.99

The point 3 is the correct point and i expect this point to answer true to the IsMin method.
But it is not the case.
Moreover thanks to the distance it is easy to view that there is a problem.

Thanks to say if you can reproduce this case. Moreover if someone can explain me what represent the tolerance parameter. With the default constructor value 1E-10 in this case found only one solution (point 2 !!)

Thanks you.

You have to be logged in to download the attached file

Steph

2012/12/19 20:05

Sorry i forgot to put the point : const gp_Pnt point(999.99,1501.99,0.0);

So i expect to get as nearest point the (1000.0,1500.0,0) point.

Hennig

2012/12/19 20:26

hey steph,

i cant tell you something about the parameter, but this would interest me too... somebody an idear?

what i can tell you is that the function IsMin do not answer true, when your distance is the minimum... it answers True when your Extremafunction is a Minimum and not a Maximum. And of course there can be only one absolute minimum but more than one local minimum between your point and the curve. Thats why i check all distances to get the absolute minimum.

greetings paul

Steph

2012/12/21 15:17

Thanks Paul for the answer. I understand better.
However if i have found a better way to compute the projection. In my case i'm not interested in getting all the extrema but only the projection to the nearest point over a wire.
So i use ShapeAnalysis_Curve::Project.

I've encountered some strange case of bad computing but increasing brutally the precision value (last parameter of the project method) it works in all the cases. So it work but i don't understand the precision parameter.