Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge V5_1_4
[modules/smesh.git]
/
src
/
StdMeshersGUI
/
StdMeshersGUI_DistrPreview.cxx
diff --git
a/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx
b/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx
index e26ffd7e18bbd40e2c5e753c0a0e47734e69bf88..fb493741754333b6b4b9ecb9d0daa7a51014236f 100644
(file)
--- a/
src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx
+++ b/
src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
08
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
10
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-19,6
+19,7
@@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_DistrPreview.cxx
// Author : Open CASCADE S.A.S.
// SMESH includes
// File : StdMeshersGUI_DistrPreview.cxx
// Author : Open CASCADE S.A.S.
// SMESH includes
@@
-49,6
+50,8
@@
#ifdef WIN32
# include <algorithm>
#endif
#ifdef WIN32
# include <algorithm>
#endif
+#include <math.h>
+#include <limits>
#include <Basics_Utils.hxx>
#include <Basics_Utils.hxx>
@@
-222,13
+225,13
@@
void StdMeshersGUI_DistrPreview::update()
{
SMESH::double_array* arr = 0;
if( isTableFunc() )
{
SMESH::double_array* arr = 0;
if( isTableFunc() )
- arr = h->BuildDistributionTab( myTableFunc, myNbSeg, ( int )myConv );
+
arr = h->BuildDistributionTab( myTableFunc, myNbSeg, ( int )myConv );
else
else
- arr = h->BuildDistributionExpr( myFunction.toLatin1().data(), myNbSeg, ( int )myConv );
+
arr = h->BuildDistributionExpr( myFunction.toLatin1().data(), myNbSeg, ( int )myConv );
if( arr )
{
if( arr )
{
- distr = *arr;
- delete arr;
+
distr = *arr;
+
delete arr;
}
}
}
}
}
}
@@
-261,6
+264,15
@@
void StdMeshersGUI_DistrPreview::update()
showError();
return;
}
showError();
return;
}
+#ifdef WIN32
+ if ( std::fabs(y[i]) >= HUGE_VAL)
+ y[i] = HUGE_VAL/100.;
+#else
+ if ( isinf(y[i]))
+ y[i] = std::numeric_limits<double>::max()/100.;
+#endif
+// if ( y[i] > 1e3 )
+// y[i] = 1e3;
if( i==0 || y[i]<min_y )
min_y = y[i];
if( i==0 || y[i]>max_y )
if( i==0 || y[i]<min_y )
min_y = y[i];
if( i==0 || y[i]>max_y )
@@
-337,7
+349,7
@@
bool isCorrectArg( const Handle( Expr_GeneralExpression )& expr )
if( !name.IsNull() )
{
if( name->GetName()!="t" )
if( !name.IsNull() )
{
if( name->GetName()!="t" )
- res = false;
+
res = false;
}
else
res = isCorrectArg( sub );
}
else
res = isCorrectArg( sub );
@@
-421,15
+433,15
@@
bool StdMeshersGUI_DistrPreview::convert( double& v ) const
#ifdef NO_CAS_CATCH
OCC_CATCH_SIGNALS;
#endif
#ifdef NO_CAS_CATCH
OCC_CATCH_SIGNALS;
#endif
- // in StdMeshers_NumberOfSegments.cc
- // const double PRECISION = 1e-7;
- //
- if(v < -7) v = -7.0;
- v = pow( 10.0, v );
+
// in StdMeshers_NumberOfSegments.cc
+
// const double PRECISION = 1e-7;
+
//
+
if(v < -7) v = -7.0;
+
v = pow( 10.0, v );
} catch(Standard_Failure) {
} catch(Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- v = 0.0;
- ok = false;
+
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+
v = 0.0;
+
ok = false;
}
}
break;
}
}
break;