mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 18:20:34 +05:00
prevent SIGFPE with "Scale distribution" and "nb segments = 1"
This commit is contained in:
parent
99f6e04253
commit
4f9f3d8c77
@ -368,11 +368,14 @@ bool StdMeshers_Regular_1D::computeInternalParameters(const TopoDS_Edge& theEdge
|
||||
else
|
||||
{
|
||||
// Number Of Segments hypothesis
|
||||
int NbSegm = _ivalue[ NB_SEGMENTS_IND ];
|
||||
if ( NbSegm < 1 ) return false;
|
||||
if ( NbSegm == 1 ) return true;
|
||||
|
||||
switch (_ivalue[ DISTR_TYPE_IND ])
|
||||
{
|
||||
case StdMeshers_NumberOfSegments::DT_Scale:
|
||||
{
|
||||
int NbSegm = _ivalue[ NB_SEGMENTS_IND ];
|
||||
double scale = _value[ SCALE_FACTOR_IND ];
|
||||
|
||||
if (fabs(scale - 1.0) < Precision::Confusion()) {
|
||||
|
Loading…
Reference in New Issue
Block a user