]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
PAL9164. set max hypo value using COORD_MAX defined in SMESHGUI_SpinBox.h
authoreap <eap@opencascade.com>
Tue, 14 Jun 2005 11:57:04 +0000 (11:57 +0000)
committereap <eap@opencascade.com>
Tue, 14 Jun 2005 11:57:04 +0000 (11:57 +0000)
src/StdMeshersGUI/StdMeshersGUI_Parameters.cxx

index 0af344fb2650d03296c254a57d7d77398d67c77b..1a7cf9378c357ad77451d164a7cdd5e587f18216 100644 (file)
 
 #include "StdMeshersGUI_Parameters.h"
 
+#include "SMESHGUI_SpinBox.h" // for the sake of COORD_MAX, COORD_MIN definition
+
 #include <qobject.h>
 
 using namespace std;
 
+#define COORD_MAX_2 (COORD_MAX*COORD_MAX)
+#define COORD_MAX_3 (COORD_MAX*COORD_MAX*COORD_MAX)
+
 //=======================================================================
 //function : HasParameters
 //purpose  : 
@@ -100,7 +105,7 @@ void StdMeshersGUI_Parameters::GetParameters (const QString&                 hyp
   {
     paramList.push_back( DOUBLE_PARAM (1.0,
                                        QObject::tr("SMESH_LOCAL_LENGTH_PARAM"),
-                                       1E-3, 999.999, 1.0, 6));
+                                       1E-3, COORD_MAX, 1.0, 6));
   }
   else if (hypType.compare("NumberOfSegments") == 0)
   {
@@ -112,37 +117,37 @@ void StdMeshersGUI_Parameters::GetParameters (const QString&                 hyp
   {
     paramList.push_back( DOUBLE_PARAM ( 1.0,
                                       QObject::tr("SMESH_START_LENGTH_PARAM"), 
-                                      1E-3, 999.999, 1, 6));
+                                      1E-3, COORD_MAX, 1, 6));
     paramList.push_back( DOUBLE_PARAM ( 10.0,
                                        QObject::tr("SMESH_END_LENGTH_PARAM"),
-                                       1E-3, 999.999, 1, 6));
+                                       1E-3, COORD_MAX, 1, 6));
   }
   else if (hypType.compare("MaxElementArea") == 0)
   {
     paramList.push_back( DOUBLE_PARAM (1.0,
                                        QObject::tr("SMESH_MAX_ELEMENT_AREA_PARAM"), 
-                                       1.E-6, 999999.999, 1.0, 6));
+                                       1.E-6, COORD_MAX_2, 1.0, 6));
   }
   else if (hypType.compare("MaxElementVolume") == 0)
   {
     paramList.push_back( DOUBLE_PARAM ( 1.0,
                                        QObject::tr("SMESH_MAX_ELEMENT_VOLUME_PARAM"), 
-                                       1.E-9, 1.E9, 1.0, 6));
+                                       1.E-9, COORD_MAX_3, 1.0, 6));
   }
   else if (hypType.compare("StartEndLength") == 0)
   {
     paramList.push_back( DOUBLE_PARAM ( 1.0,
                                       QObject::tr("SMESH_START_LENGTH_PARAM"), 
-                                      1.0E-3, 999.999, 1, 6));
+                                      1.0E-3, COORD_MAX, 1, 6));
     paramList.push_back( DOUBLE_PARAM ( 10.0,
                                        QObject::tr("SMESH_END_LENGTH_PARAM"),
-                                       1.0E-3, 999.999, 1, 6));
+                                       1.0E-3, COORD_MAX, 1, 6));
   }
   else if (hypType.compare("Deflection1D") == 0)
   {
     paramList.push_back( DOUBLE_PARAM ( 1.0,
                                        QObject::tr("SMESH_DEFLECTION1D_PARAM"), 
-                                       1.0E-3, 999.999, 1, 6));
+                                       1.0E-3, COORD_MAX, 1, 6));
   }
 }