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:
parent
473cddc1d9
commit
77a6c8313f
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user