From: eap Date: Wed, 2 Jul 2014 10:37:52 +0000 (+0400) Subject: 22622: [CEA 1191] No default value for gradation in Salome code X-Git-Tag: V7_5_0a1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=65c1f4de65011bc09e02263ca9f5935fb2785cd2;p=plugins%2Fblsurfplugin.git 22622: [CEA 1191] No default value for gradation in Salome code Not to use gradation if quad-dominant mesh enabled (limitation of V1.2) --- diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index a2c44e7..cc97f34 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -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"); diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index 886b174..6798a80 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -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() diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h index 788a4e3..db44322 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h @@ -191,6 +191,7 @@ protected: virtual QString type() const; protected slots: + void onStateChange(); // Advanced tab void onAddOption(); void onDeleteOption();