0019941: EDF 766 SMESH : Max length hypothesis

protect GetShapeDiagonalSize() from null shape
This commit is contained in:
eap 2009-01-23 14:07:15 +00:00
parent 01f0a295e0
commit 9d4a479350

View File

@ -214,9 +214,12 @@ const TopoDS_Solid& SMESH_Mesh::PseudoShape()
double SMESH_Mesh::GetShapeDiagonalSize(const TopoDS_Shape & aShape) double SMESH_Mesh::GetShapeDiagonalSize(const TopoDS_Shape & aShape)
{ {
Bnd_Box Box; if ( !aShape.IsNull() ) {
BRepBndLib::Add(aShape, Box); Bnd_Box Box;
return sqrt( Box.SquareExtent() ); BRepBndLib::Add(aShape, Box);
return sqrt( Box.SquareExtent() );
}
return 0;
} }
//======================================================================= //=======================================================================