]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Prevent crash at too small comment ratio of geometric progression hypothesis
authoreap <eap@opencascade.com>
Thu, 13 Feb 2020 10:37:31 +0000 (13:37 +0300)
committereap <eap@opencascade.com>
Thu, 13 Feb 2020 10:37:31 +0000 (13:37 +0300)
src/StdMeshers/StdMeshers_Regular_1D.cxx

index 12619c94fdbbc634de629eb3af705f42bab8e7f3..45e1c25b62b66b5ef6291b2e8a6b681c87c1defd 100644 (file)
@@ -974,6 +974,8 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh &     theMesh,
       an = eltSize;
       eltSize *= q;
       ++nbParams;
+      if ( q < 1. && eltSize < 1e-100 )
+        return error("Too small common ratio causes too many segments");
     }
     if ( nbParams > 1 )
     {