X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Mesh.cxx;h=72d7ef193b7e9c3950ba27c43e99c3a6db75bfdb;hp=7692f9f0e1ff690412fddde109d55e491ada1165;hb=52d825495306f72048c8754aa5c86c6a390f8262;hpb=63a442b2c3cbc5e2155d83e86dfdb77d6961fab3 diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 7692f9f0e..72d7ef193 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -55,8 +55,10 @@ #include "DriverCGNS_Write.hxx" #endif +#include + #undef _Precision_HeaderFile -#include +//#include #include #include #include @@ -226,7 +228,7 @@ SMESH_Mesh::~SMESH_Mesh() bool SMESH_Mesh::MeshExists( int meshId ) const { - return _myDocument ? _myDocument->GetMesh( meshId ) : false; + return _myDocument ? bool( _myDocument->GetMesh( meshId )) : false; } //============================================================================= @@ -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; }