mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-15 04:30:39 +05:00
prevent SIGFPE in SetParametersByMesh() when there are no edges in submesh
This commit is contained in:
parent
ec1de5204f
commit
e97db243cc
@ -300,7 +300,10 @@ bool StdMeshers_AutomaticLength::SetParametersByMesh(const SMESH_Mesh* theMesh
|
|||||||
SMESHDS_SubMesh * eSubMesh = aMeshDS->MeshElements( edge );
|
SMESHDS_SubMesh * eSubMesh = aMeshDS->MeshElements( edge );
|
||||||
if ( !eSubMesh )
|
if ( !eSubMesh )
|
||||||
return false;
|
return false;
|
||||||
double segLen = L / eSubMesh->NbElements();
|
int nbSeg = eSubMesh->NbElements();
|
||||||
|
if ( nbSeg < 1 )
|
||||||
|
continue;
|
||||||
|
double segLen = L / nbSeg;
|
||||||
|
|
||||||
// get segment length from _TShapeToLength
|
// get segment length from _TShapeToLength
|
||||||
map<const TopoDS_TShape*, double>::iterator tshape_length =
|
map<const TopoDS_TShape*, double>::iterator tshape_length =
|
||||||
|
Loading…
Reference in New Issue
Block a user