Salome HOME
Gradation parameter is now allowed for Physical mesh.
authornge <nge>
Wed, 26 Aug 2009 14:52:13 +0000 (14:52 +0000)
committernge <nge>
Wed, 26 Aug 2009 14:52:13 +0000 (14:52 +0000)
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx
src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx

index ae1d60e33dd2732ffa13e8bb95b066207728afe6..92bb519a2d56bf4c1e1d73beda02197260387dcd 100644 (file)
@@ -51,7 +51,7 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis (int hypId, int studyId,
 
   // to desable writing boundaries
   //_phyMin = _phyMax = _hgeoMin = _hgeoMax = undefinedDouble();
-  
+
 
   const char* intOptionNames[] = {
     "addsurf_ivertex",
@@ -122,7 +122,7 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis (int hypId, int studyId,
     _charOptions.insert( charOptionNames[i] );
     _option2value[ charOptionNames[i++] ].clear();
   }
-  
+
   _sizeMap.clear();
 }
 
@@ -144,6 +144,7 @@ void BLSURFPlugin_Hypothesis::SetPhysicalMesh(PhysicalMesh thePhysicalMesh)
       case DefaultSize:
       default:
         _phySize = GetDefaultPhySize();
+        _gradation  = GetDefaultGradation();
         break;
       }
     NotifySubMeshesHypothesisModification();
@@ -407,9 +408,9 @@ std::ostream & BLSURFPlugin_Hypothesis::SaveTo(std::ostream & save)
        << " " << (int)_physicalMesh
        << " " << (int)_geometricMesh
        << " " << _phySize
-       << " " << _angleMeshS   
-       << " " << _gradation     
-       << " " << (int)_quadAllowed 
+       << " " << _angleMeshS
+       << " " << _gradation
+       << " " << (int)_quadAllowed
        << " " << (int)_decimesh;
   save << " " << _phyMin
        << " " << _phyMax
@@ -448,8 +449,8 @@ std::ostream & BLSURFPlugin_Hypothesis::SaveTo(std::ostream & save)
     }
     save << " " << "__ATTRACTORS_END__";
   }
-  
-  
+
+
   return save;
 }
 
@@ -513,31 +514,31 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load)
     _phyMin = val;
   else
     load.clear(std::ios::badbit | load.rdstate());
-  
+
   isOK = (load >> val);
   if (isOK)
     _phyMax = val;
   else
     load.clear(std::ios::badbit | load.rdstate());
-  
+
   isOK = (load >> val);
   if (isOK)
     _angleMeshC = val;
   else
     load.clear(std::ios::badbit | load.rdstate());
-  
+
   isOK = (load >> val);
   if (isOK)
     _hgeoMin = val;
   else
     load.clear(std::ios::badbit | load.rdstate());
-  
+
   isOK = (load >> val);
   if (isOK)
     _hgeoMax = val;
   else
     load.clear(std::ios::badbit | load.rdstate());
-  
+
   isOK = (load >> i);
   if (isOK)
     _verb = i;
index 4aafa29a48723e7adbb6109f09ff12d4e7ee6d89..4a75b4441e1f257696c9b25205d7ee7c50e5114b 100644 (file)
@@ -965,22 +965,19 @@ void BLSURFPluginGUI_HypothesisCreator::onGeometricMeshChanged() {
   bool isCustom = (myGeometricMesh->currentIndex() == UserDefined);
   myAngleMeshS->setEnabled(isCustom);
   myAngleMeshC->setEnabled(isCustom);
-  myGradation->setEnabled(isCustom);
   myGeoMax->setEnabled(isCustom);
   myGeoMin->setEnabled(isCustom);
 
   if ( ! isCustom ) {
-    double aAngleMeshS, aGradation;
+    double aAngleMeshS;
     switch( myGeometricMesh->currentIndex() ) {
       case DefaultGeom:
       default:
         aAngleMeshS = 8;
-        aGradation = 1.1;
         break;
       }
     myAngleMeshS->setValue( aAngleMeshS );
     myAngleMeshC->setValue( aAngleMeshS );
-    myGradation->setValue( aGradation );
     if ( !isDouble( myGeoMin->text(), true ))
       myGeoMin->setText("");
     if ( !isDouble( myGeoMax->text(), true ))