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:
@@ -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;
|
||||
|
@@ -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))
|
||||
|
Reference in New Issue
Block a user