Salome HOME
windows compatibility
[modules/smesh.git] / src / SMESH / SMESH_Mesh.cxx
index b0dcee9ac22247bc2be4a404f940989f404466ad..72d7ef193b7e9c3950ba27c43e99c3a6db75bfdb 100644 (file)
 #include "DriverCGNS_Write.hxx"
 #endif
 
+#include <GEOMUtils.hxx>
+
 #undef _Precision_HeaderFile
-#include <BRepBndLib.hxx>
+//#include <BRepBndLib.hxx>
 #include <BRepPrimAPI_MakeBox.hxx>
 #include <Bnd_Box.hxx>
 #include <TColStd_MapOfInteger.hxx>
@@ -327,8 +329,9 @@ double SMESH_Mesh::GetShapeDiagonalSize(const TopoDS_Shape & aShape)
 {
   if ( !aShape.IsNull() ) {
     Bnd_Box Box;
-    BRepBndLib::Add(aShape, Box);
-    return sqrt( Box.SquareExtent() );
+    GEOMUtils::PreciseBoundingBox(aShape, Box);
+    if ( !Box.IsVoid() )
+      return sqrt( Box.SquareExtent() );
   }
   return 0;
 }