1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0027581: Logical error in Bnd_Box(2d)::SquareExtent() method.

Code in method SquareExtent has been corrected.
This commit is contained in:
nbv 2016-06-08 17:42:18 +03:00 committed by mkv
parent 473cddc1d9
commit 77a6c8313f
2 changed files with 7 additions and 7 deletions

View File

@ -21,8 +21,8 @@
inline Standard_Real Bnd_Box::SquareExtent() const
{
if ( IsVoid() ) return 0.;
Standard_Real dx = Xmax-Xmin+Gap;
Standard_Real dy = Ymax-Ymin+Gap;
Standard_Real dz = Zmax-Zmin+Gap;
return dx*dx + dy*dy + dz*dz;
const Standard_Real aDx = Xmax - Xmin + Gap + Gap;
const Standard_Real aDy = Ymax - Ymin + Gap + Gap;
const Standard_Real aDz = Zmax - Zmin + Gap + Gap;
return aDx*aDx + aDy*aDy + aDz*aDz;
}

View File

@ -238,8 +238,8 @@ inline Standard_Boolean Bnd_Box2d::IsOut (const gp_Trsf2d& T1,
inline Standard_Real Bnd_Box2d::SquareExtent() const
{
if ( IsVoid() ) return 0.;
Standard_Real dx = Xmax-Xmin+Gap;
Standard_Real dy = Ymax-Ymin+Gap;
return dx*dx + dy*dy;
const Standard_Real aDx = Xmax - Xmin + Gap + Gap;
const Standard_Real aDy = Ymax - Ymin + Gap + Gap;
return aDx*aDx + aDy*aDy;
}