From bda71f4197e589fab8b784abb636a993ff6aa808 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 13 Feb 2020 13:37:31 +0300 Subject: [PATCH] Prevent crash at too small comment ratio of geometric progression hypothesis --- src/StdMeshers/StdMeshers_Regular_1D.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/StdMeshers/StdMeshers_Regular_1D.cxx b/src/StdMeshers/StdMeshers_Regular_1D.cxx index 12619c94f..45e1c25b6 100644 --- a/src/StdMeshers/StdMeshers_Regular_1D.cxx +++ b/src/StdMeshers/StdMeshers_Regular_1D.cxx @@ -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 ) { -- 2.30.2