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 12619c9..45e1c25 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 )
     {