Archived issue #0026436
wrong answer happened in math_FunctionSetRoot and math_NewtonFunctionSetRoot
Description
when I used math_FunctionSetRoot and math_NewtonFunctionSetRoot with a starting point and search a nearest point in surface ,I got a wrong answer.
Steps to reproduce
1. read Attachment 1 (IGES) which is attached in attachment( Unit is INCH)
2. get the TopoDS_Face (only one)
3. use this code:
gp_Pnt RPnt(0.76939999999999997,0.43602000000000002,0.096347500000000003);
Extrema_FuncExtPS myF;
myF.Initialize(mySurf);
myF.SetPoint(RPnt);
math_Vector Tol(1,2);
Tol(1) = 1.0e-7;
Tol(2) = 1.0e-7;
use this UV as starting point:
myU=0.93874102160579254 myV=0.10000000000000001
4. use math_FunctionSetRoot and get the result:
result is :
coord = {x=0.76940000134300002 y=0.43333300000000002 z=0.094666646950000002 }
display in view you will see the tolorence is very large
because the RPnt is on surface , so the right answer is the same point as PRnt
when I use math_NewtonFunctionSetRoot, I can not get the answer because it is
divergent
2. get the TopoDS_Face (only one)
3. use this code:
gp_Pnt RPnt(0.76939999999999997,0.43602000000000002,0.096347500000000003);
Extrema_FuncExtPS myF;
myF.Initialize(mySurf);
myF.SetPoint(RPnt);
math_Vector Tol(1,2);
Tol(1) = 1.0e-7;
Tol(2) = 1.0e-7;
use this UV as starting point:
myU=0.93874102160579254 myV=0.10000000000000001
4. use math_FunctionSetRoot and get the result:
result is :
coord = {x=0.76940000134300002 y=0.43333300000000002 z=0.094666646950000002 }
display in view you will see the tolorence is very large
because the RPnt is on surface , so the right answer is the same point as PRnt
when I use math_NewtonFunctionSetRoot, I can not get the answer because it is
divergent
Additional information
I do think the high version of OCC does not make any change in this two function compared with OCC 6.7.1
Public activity
No public notes
Participants are labeled by their role within this record.