1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +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:
abk
2012-10-05 13:55:16 +04:00
parent 852a895cda
commit 08cd2f6bb1
24 changed files with 45 additions and 30 deletions

View File

@@ -102,7 +102,7 @@ const Handle(TopoDS_TShape)& VrmlData_IndexedFaceSet::TShape ()
arrNodes[arrIndice[2]] - arrNodes[arrIndice[0]]
};
if ((aVec[0] ^ aVec[1]).SquareModulus() >
Precision::Confusion()*Precision::Confusion())
Precision::SquareConfusion())
++nTri;
else {
const_cast<Standard_Integer&> (arrIndice[0]) = -1;

View File

@@ -414,7 +414,7 @@ Handle_VrmlData_Geometry VrmlData_ShapeConvert::triToIndexedFaceSet
Poly_Connect PC(theTri);
// Create the Normals node (if UV- values are available)
TopLoc_Location aLoc;
const Standard_Real aConf2 = Precision::Confusion()*Precision::Confusion();
const Standard_Real aConf2 = Precision::SquareConfusion();
const Handle(Geom_Surface) aSurface = BRep_Tool::Surface (theFace, aLoc);
if (theTri->HasUVNodes() && aSurface.IsNull() == Standard_False) {
if (aSurface->IsCNu(1) && aSurface->IsCNv(1))