mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0022907: The function 'distmini' produces wrong result.
This commit is contained in:
parent
85b70a3baa
commit
408ecc39f3
@ -1,5 +1,5 @@
|
||||
#include <Standard_TypeMismatch.hxx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
#define delta 1.e-9
|
||||
#define Tol 1.e-20
|
||||
|
||||
@ -80,9 +80,16 @@ Standard_Boolean Extrema_FuncExtPC::Value (const Standard_Real U, Standard_Real&
|
||||
D1c = V;
|
||||
Ndu = D1c.Magnitude();
|
||||
if (Ndu <= Tol) {
|
||||
Vec aD2;
|
||||
Tool::D2(*((Curve*)myC),myU,myPc,D1c,aD2);
|
||||
Ndu = aD2.Magnitude();
|
||||
|
||||
if(Ndu <= Tol)
|
||||
return Standard_False;
|
||||
D1c = aD2;
|
||||
}
|
||||
}
|
||||
|
||||
Vec PPc (myP,myPc);
|
||||
F = PPc.Dot(D1c)/Ndu;
|
||||
return Standard_True;
|
||||
|
Loading…
x
Reference in New Issue
Block a user