mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-01 22:15:37 +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)
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user