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