From: ifv Date: Tue, 5 Jul 2022 14:30:35 +0000 (+0300) Subject: 0028243: Bad result of the canonical recognition X-Git-Tag: V7_7_0_beta~54 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=e1f7382910e308e08ec9a72998a987f492492b8b;p=occt.git 0028243: Bad result of the canonical recognition LProp/LProp_CLProps.gxx - minor modification to avoid floating overflow because of multiplication of large values --- diff --git a/src/LProp/LProp_CLProps.gxx b/src/LProp/LProp_CLProps.gxx index 8afa74d53c..499bab6cda 100644 --- a/src/LProp/LProp_CLProps.gxx +++ b/src/LProp/LProp_CLProps.gxx @@ -232,14 +232,15 @@ Standard_Real LProp_CLProps::Curvature () { Standard_Real N = myDerivArr[0].CrossSquareMagnitude(myDerivArr[1]); // 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) { myCurvature = 0.0; } else { - myCurvature = sqrt(N) / (DD1*sqrt(DD1)); + myCurvature = sqrt(N) / DD1 / sqrt(DD1); } }