mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
0027581: Logical error in Bnd_Box(2d)::SquareExtent() method.
Code in method SquareExtent has been corrected.
This commit is contained in:
parent
473cddc1d9
commit
77a6c8313f
@ -21,8 +21,8 @@
|
|||||||
inline Standard_Real Bnd_Box::SquareExtent() const
|
inline Standard_Real Bnd_Box::SquareExtent() const
|
||||||
{
|
{
|
||||||
if ( IsVoid() ) return 0.;
|
if ( IsVoid() ) return 0.;
|
||||||
Standard_Real dx = Xmax-Xmin+Gap;
|
const Standard_Real aDx = Xmax - Xmin + Gap + Gap;
|
||||||
Standard_Real dy = Ymax-Ymin+Gap;
|
const Standard_Real aDy = Ymax - Ymin + Gap + Gap;
|
||||||
Standard_Real dz = Zmax-Zmin+Gap;
|
const Standard_Real aDz = Zmax - Zmin + Gap + Gap;
|
||||||
return dx*dx + dy*dy + dz*dz;
|
return aDx*aDx + aDy*aDy + aDz*aDz;
|
||||||
}
|
}
|
||||||
|
@ -238,8 +238,8 @@ inline Standard_Boolean Bnd_Box2d::IsOut (const gp_Trsf2d& T1,
|
|||||||
inline Standard_Real Bnd_Box2d::SquareExtent() const
|
inline Standard_Real Bnd_Box2d::SquareExtent() const
|
||||||
{
|
{
|
||||||
if ( IsVoid() ) return 0.;
|
if ( IsVoid() ) return 0.;
|
||||||
Standard_Real dx = Xmax-Xmin+Gap;
|
const Standard_Real aDx = Xmax - Xmin + Gap + Gap;
|
||||||
Standard_Real dy = Ymax-Ymin+Gap;
|
const Standard_Real aDy = Ymax - Ymin + Gap + Gap;
|
||||||
return dx*dx + dy*dy;
|
return aDx*aDx + aDy*aDy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user