mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0028243: Bad result of the canonical recognition
LProp/LProp_CLProps.gxx - minor modification to avoid floating overflow because of multiplication of large values
This commit is contained in:
parent
dee5eb82b5
commit
e1f7382910
@ -232,14 +232,15 @@ Standard_Real LProp_CLProps::Curvature ()
|
|||||||
{
|
{
|
||||||
Standard_Real N = myDerivArr[0].CrossSquareMagnitude(myDerivArr[1]);
|
Standard_Real N = myDerivArr[0].CrossSquareMagnitude(myDerivArr[1]);
|
||||||
// if d[0] and d[1] are colinear the curvature is null.
|
// if d[0] and d[1] are colinear the curvature is null.
|
||||||
Standard_Real t = N/(DD1*DD2);
|
//Standard_Real t = N/(DD1*DD2);
|
||||||
|
Standard_Real t = N / DD1 / DD2;
|
||||||
if (t<=Tol)
|
if (t<=Tol)
|
||||||
{
|
{
|
||||||
myCurvature = 0.0;
|
myCurvature = 0.0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
myCurvature = sqrt(N) / (DD1*sqrt(DD1));
|
myCurvature = sqrt(N) / DD1 / sqrt(DD1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user