mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023404: Create SquareConfusion function in Precision package for speed and convenience
SquareConfusion function was created in FoundationClasses module -> TKMath toolkit -> Precision package. The function returns square of Precision::Confusion(). SquareConfusion function was corrected in FoundationClasses module -> TKMath toolkit -> Precision package. Squares of Precision::Confusion() were replaced by Precision::SquareConfusion().
This commit is contained in:
@@ -698,7 +698,7 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma
|
||||
C2->D1(first2,P,Vec2);
|
||||
if ( edge1.Orientation() == TopAbs_REVERSED ) Vec1.Reverse();
|
||||
if ( edge2.Orientation() == TopAbs_REVERSED ) Vec2.Reverse();
|
||||
Standard_Real tol2 = Precision::Confusion() * Precision::Confusion();
|
||||
Standard_Real tol2 = Precision::SquareConfusion();
|
||||
if ( Vec1.SquareMagnitude() < tol2 ||
|
||||
Vec2.SquareMagnitude() < tol2 ) Ang1 = M_PI/2.;
|
||||
else Ang1 = Abs(Vec1.Angle(Vec2));
|
||||
@@ -1138,7 +1138,7 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma
|
||||
C2->D1(first2,P,Vec2);
|
||||
if ( edge1.Orientation() == TopAbs_REVERSED ) Vec1.Reverse();
|
||||
if ( edge2.Orientation() == TopAbs_REVERSED ) Vec2.Reverse();
|
||||
Standard_Real tol2 = Precision::Confusion() * Precision::Confusion();
|
||||
Standard_Real tol2 = Precision::SquareConfusion();
|
||||
if ( Vec1.SquareMagnitude() < tol2 ||
|
||||
Vec2.SquareMagnitude() < tol2 ) Ang1 = M_PI/2.;
|
||||
else Ang1 = Abs(Vec1.Angle(Vec2));
|
||||
|
Reference in New Issue
Block a user