From: mzernova Date: Wed, 3 Aug 2022 15:42:03 +0000 (+0300) Subject: #remarks X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FCR33084;p=occt.git #remarks --- diff --git a/src/Select3D/Select3D_SensitiveCylinder.cxx b/src/Select3D/Select3D_SensitiveCylinder.cxx index 392c6cae36..6c2ebf181e 100644 --- a/src/Select3D/Select3D_SensitiveCylinder.cxx +++ b/src/Select3D/Select3D_SensitiveCylinder.cxx @@ -81,17 +81,14 @@ Handle(Select3D_SensitiveEntity) Select3D_SensitiveCylinder::GetConnected() Select3D_BndBox3d Select3D_SensitiveCylinder::BoundingBox() { Standard_Real aMaxRad = Max (myBottomRadius, myTopRadius); - gp_Pnt aCenterBottom (-aMaxRad, -aMaxRad, 0); - gp_Pnt aCenterTop (aMaxRad, aMaxRad, myHeight); - aCenterBottom.Transform (myTrsf); - aCenterTop.Transform (myTrsf); - const SelectMgr_Vec3 aMinPnt (Min (aCenterBottom.X(), aCenterTop.X()), - Min (aCenterBottom.Y(), aCenterTop.Y()), - Min (aCenterBottom.Z(), aCenterTop.Z())); - const SelectMgr_Vec3 aMaxPnt (Max (aCenterBottom.X(), aCenterTop.X()), - Max (aCenterBottom.Y(), aCenterTop.Y()), - Max (aCenterBottom.Z(), aCenterTop.Z())); - return Select3D_BndBox3d (aMinPnt, aMaxPnt); + Graphic3d_Mat4d aTrsf; + myTrsf.GetMat4 (aTrsf); + + Select3D_BndBox3d aBox (SelectMgr_Vec3 (-aMaxRad, -aMaxRad, 0), + SelectMgr_Vec3 (aMaxRad, aMaxRad, myHeight)); + aBox.Transform (aTrsf); + + return aBox; } //==================================================