From 0b4a9277581b646b413722dd2b5e5f22561bd773 Mon Sep 17 00:00:00 2001 From: mzernova Date: Wed, 3 Aug 2022 18:42:03 +0300 Subject: [PATCH] #remarks --- src/Select3D/Select3D_SensitiveCylinder.cxx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) 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; } //================================================== -- 2.39.5