mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-01 19:15:38 +05:00
0019941: EDF 766 SMESH : Max length hypothesis
protect GetShapeDiagonalSize() from null shape
This commit is contained in:
parent
01f0a295e0
commit
9d4a479350
@ -214,9 +214,12 @@ const TopoDS_Solid& SMESH_Mesh::PseudoShape()
|
||||
|
||||
double SMESH_Mesh::GetShapeDiagonalSize(const TopoDS_Shape & aShape)
|
||||
{
|
||||
Bnd_Box Box;
|
||||
BRepBndLib::Add(aShape, Box);
|
||||
return sqrt( Box.SquareExtent() );
|
||||
if ( !aShape.IsNull() ) {
|
||||
Bnd_Box Box;
|
||||
BRepBndLib::Add(aShape, Box);
|
||||
return sqrt( Box.SquareExtent() );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user