]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
22622: [CEA 1191] No default value for gradation in Salome code
authoreap <eap@opencascade.com>
Wed, 2 Jul 2014 10:37:52 +0000 (14:37 +0400)
committereap <eap@opencascade.com>
Wed, 2 Jul 2014 10:37:52 +0000 (14:37 +0400)
   Not to use gradation if quad-dominant mesh enabled (limitation of V1.2)

src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx
src/GUI/BLSURFPluginGUI_HypothesisCreator.h

index a2c44e77019f201dfb9368f5812a31a7d603e522..cc97f343a6afac36cd2e54c7e3d144f743e54ab3 100644 (file)
@@ -1095,7 +1095,8 @@ void BLSURFPlugin_BLSURF::SetParameters(
      // - if maxsize is not explicitly specified, we pass default value computed automatically, in this case "relative" flag is ignored
      set_param(css, "max_size", _maxSizeRel ? to_string_rel(_maxSize).c_str() : to_string(_maxSize).c_str());
    }
-  
+   if ( _quadAllowed )
+     useGradation = false; // limitation of V1.2
   if ( useGradation )
      set_param(css, "gradation",                         to_string(_gradation).c_str());
    set_param(css, "element_generation",                _quadAllowed ? "quad_dominant" : "triangle");
index 886b17408f1021b9143532267dbf17708038df9a..6798a807d1f3831afe14da689e92b3aa74fbfbae 100644 (file)
@@ -1119,6 +1119,7 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame()
   connect( myAdvWidget->addBtn->menu(), SIGNAL( aboutToShow() ),         this, SLOT( onAddOption() ) );
   connect( myAdvWidget->addBtn->menu(), SIGNAL( triggered( QAction* ) ), this, SLOT( onOptionChosenInPopup( QAction* ) ) );
   connect( myAdvWidget->rmBtn,          SIGNAL( clicked()),              this, SLOT( onDeleteOption() ) );
+  connect( myStdWidget->myAllowQuadrangles, SIGNAL( stateChanged( int )),this, SLOT( onStateChange() ));
 
   // Size Maps
   connect( addMapButton,        SIGNAL( clicked()),                    this,         SLOT( onAddMap() ) );
@@ -1177,6 +1178,11 @@ This method stop the selection of the widgets StdMeshersGUI_ObjectReferenceParam
 //   }
 // }
 
+void BLSURFPluginGUI_HypothesisCreator::onStateChange()
+{
+  myStdWidget->myGradation->setEnabled( !myStdWidget->myAllowQuadrangles->isChecked() );
+}
+
 /** 
  * This method resets the content of the X, Y, Z widgets;
 **/
@@ -1967,6 +1973,7 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const
   // update widgets
   that->myStdWidget->onPhysicalMeshChanged();
   that->myStdWidget->onGeometricMeshChanged();
+  that->onStateChange();
 }
 
 /** BLSURFPluginGUI_HypothesisCreator::storeParams()
index 788a4e3be8e3ce8c7690f6918f20b30fca948e7a..db44322d28c3b6b8ad79dd81a40e6db54548b104 100644 (file)
@@ -191,6 +191,7 @@ protected:
   virtual QString     type() const;
 
 protected slots:
+  void                onStateChange();
   // Advanced tab
   void                onAddOption();
   void                onDeleteOption();