Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec1de52
)
prevent SIGFPE in SetParametersByMesh() when there are no edges in submesh
author
eap
<eap@opencascade.com>
Thu, 13 Apr 2006 09:58:01 +0000
(09:58 +0000)
committer
eap
<eap@opencascade.com>
Thu, 13 Apr 2006 09:58:01 +0000
(09:58 +0000)
src/StdMeshers/StdMeshers_AutomaticLength.cxx
patch
|
blob
|
history
diff --git
a/src/StdMeshers/StdMeshers_AutomaticLength.cxx
b/src/StdMeshers/StdMeshers_AutomaticLength.cxx
index fa74a7dc5d5a86ac3544761e0b76af666b2a14fc..551843523cdba6fb3ac68d91585e321b5be56b7c 100644
(file)
--- a/
src/StdMeshers/StdMeshers_AutomaticLength.cxx
+++ b/
src/StdMeshers/StdMeshers_AutomaticLength.cxx
@@
-300,7
+300,10
@@
bool StdMeshers_AutomaticLength::SetParametersByMesh(const SMESH_Mesh* theMesh
SMESHDS_SubMesh * eSubMesh = aMeshDS->MeshElements( edge );
if ( !eSubMesh )
return false;
- double segLen = L / eSubMesh->NbElements();
+ int nbSeg = eSubMesh->NbElements();
+ if ( nbSeg < 1 )
+ continue;
+ double segLen = L / nbSeg;
// get segment length from _TShapeToLength
map<const TopoDS_TShape*, double>::iterator tshape_length =