mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0028076: Test bugs moddata_2 bug469 fails when FPE are enabled
The reason of FPE exception has been eliminated.
This commit is contained in:
parent
bf7b2cebbe
commit
326b3e283a
@ -57,17 +57,33 @@ static Standard_Real EvalCurv(const Standard_Real dim,
|
|||||||
mp += p*p;
|
mp += p*p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//mp *= 2.; //P(j,i) = -P(i,j);
|
|
||||||
mp = Sqrt(mp);
|
|
||||||
//
|
//
|
||||||
Standard_Real q = 0.;
|
Standard_Real q = 0.;
|
||||||
for(i = 0; i < dim; ++i)
|
for(i = 0; i < dim; ++i)
|
||||||
{
|
{
|
||||||
q += V1[i]*V1[i];
|
q += V1[i]*V1[i];
|
||||||
}
|
}
|
||||||
q = Sqrt(q);
|
|
||||||
|
if (q < 1 / Precision::Infinite())
|
||||||
|
{
|
||||||
|
// Indeed, if q is small then we can
|
||||||
|
// obtain equivocation of "0/0" type.
|
||||||
|
// In this case, local curvature can be
|
||||||
|
// not equal to 0 or Infinity.
|
||||||
|
// However, it is good solution to insert
|
||||||
|
// knot in the place with such singularity.
|
||||||
|
// Therefore, we need imitation of curvature
|
||||||
|
// jumping. Return of Precision::Infinite() is
|
||||||
|
// enough for it.
|
||||||
|
|
||||||
|
return Precision::Infinite();
|
||||||
|
}
|
||||||
|
|
||||||
|
q = Min(q, Precision::Infinite());
|
||||||
|
q *= q*q;
|
||||||
|
|
||||||
//
|
//
|
||||||
Standard_Real curv = mp / (q*q*q);
|
Standard_Real curv = Sqrt(mp / q);
|
||||||
|
|
||||||
return curv;
|
return curv;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user