1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024134: Wrong result of projection point on the face

Changed Bnd_SphereUBTreeSelector for the Extrema_ExtAlgo_Tree projection algorithm properly work
Test case for issue CR24134
This commit is contained in:
azv
2013-09-27 10:32:19 +04:00
committed by bugmaster
parent 42ff8f5bd3
commit aeaf53d5ed
2 changed files with 38 additions and 2 deletions

View File

@@ -114,7 +114,8 @@ Standard_Boolean Bnd_SphereUBTreeSelectorMin::Accept(const Standard_Integer& the
const Bnd_Sphere& aSph = mySphereArray->Value(theInd);
Standard_Real aCurDist;
if ( (aCurDist = aSph.SquareDistance(myXYZ.XYZ())) < mySol.SquareDistance(myXYZ.XYZ()) )
// if ( (aCurDist = aSph.SquareDistance(myXYZ.XYZ())) < mySol.SquareDistance(myXYZ.XYZ()) )
if ( (aCurDist = aSph.Distance(myXYZ.XYZ())) < mySol.Distance(myXYZ.XYZ()) )
{
mySol = aSph;
if ( aCurDist < myMinDist )
@@ -160,7 +161,8 @@ Standard_Boolean Bnd_SphereUBTreeSelectorMax::Accept(const Standard_Integer& the
const Bnd_Sphere& aSph = mySphereArray->Value(theInd);
Standard_Real aCurDist;
if ( (aCurDist = aSph.SquareDistance(myXYZ.XYZ())) > mySol.SquareDistance(myXYZ.XYZ()) )
// if ( (aCurDist = aSph.SquareDistance(myXYZ.XYZ())) > mySol.SquareDistance(myXYZ.XYZ()) )
if ( (aCurDist = aSph.Distance(myXYZ.XYZ())) > mySol.Distance(myXYZ.XYZ()) )
{
mySol = aSph;
if ( aCurDist > myMaxDist )