\subsection advanced_meshing_options Advanced meshing options
-- <b>Option as text</b> - allows to input in the command line any text
-for hybrid argument from "mg-hybrid.exe help", and future advanced options...
+- A table allows to input in the command line any text
+for hybrid argument from "mg-hybrid.exe help", and future advanced options... <br>
+<b>Add option</b> - adds a line to the table where you can type an option and its value as text.
+A check box in the first column activates/deactivates the option of the current row. A deactivated option will be erased upon pressing \a Ok.
+
\ref hybrid_top "Back to top"
/*!
* To set hiden/undocumented/advanced options
*/
- void SetTextOption(in string option);
+ void SetAdvancedOption( in string optAndVals );
+ string GetAdvancedOption();
+ void SetTextOption(in string option); // obsolete
string GetTextOption();
/*!
* To define the volumic gradation
${KERNEL_SALOMELocalTrace}
${GEOM_GEOM}
${SMESH_SMESH}
- ${SMESH_GeomSelectionTools}
+ ${SMESH_PluginUtils}
${SMESH_StdMeshersGUI}
${SMESH_SMESHFiltersSelection}
${GUI_suit}
: QWidget( parent, f )
{
setupUi( this );
+ myAdvOptionsTable->layout()->setMargin( 0 );
}
HYBRIDPluginGUI_AdvWidget::~HYBRIDPluginGUI_AdvWidget()
<string>Advanced meshing options</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
- <item row="7" column="1">
- <widget class="QLineEdit" name="textOptionLineEdit"/>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="gradationLabel">
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="removeInitialCentralPointCheck">
<property name="text">
- <string>Volumic gradation</string>
+ <string>Remove initial central point</string>
</property>
</widget>
</item>
- <item row="7" column="0">
- <widget class="QLabel" name="textOptionLabel">
+ <item row="6" column="0">
+ <widget class="QLabel" name="gradationLabel">
<property name="text">
- <string>Option as text</string>
+ <string>Volumic gradation</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="SMESHGUI_SpinBox" name="gradationSpinBox"/>
</item>
- <item row="0" column="0">
- <widget class="QCheckBox" name="createNewNodesCheck">
- <property name="text">
- <string>Create new nodes</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QCheckBox" name="removeInitialCentralPointCheck">
- <property name="text">
- <string>Remove initial central point</string>
- </property>
- </widget>
- </item>
<item row="1" column="1">
<widget class="QCheckBox" name="FEMCorrectionCheck">
<property name="text">
</property>
</widget>
</item>
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="createNewNodesCheck">
+ <property name="text">
+ <string>Create new nodes</string>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="0" colspan="2">
+ <widget class="SMESH_AdvOptionsWdg" name="myAdvOptionsTable" native="true"/>
+ </item>
</layout>
</widget>
</item>
<customwidgets>
<customwidget>
<class>SMESHGUI_SpinBox</class>
- <extends>QSpinBox</extends>
- <header>SMESHGUI_SpinBox.h</header>
+ <extends>QDoubleSpinBox</extends>
+ <header location="global">SMESHGUI_SpinBox.h</header>
+ </customwidget>
+ <customwidget>
+ <class>SMESH_AdvOptionsWdg</class>
+ <extends>QWidget</extends>
+ <header location="global">SMESH_AdvOptionsWdg.h</header>
+ <container>1</container>
</customwidget>
</customwidgets>
<resources/>
myAdvWidget->FEMCorrectionCheck ->setText (tr( "FEM_CORRECTION" ));
myAdvWidget->gradationLabel ->setText (tr( "HYBRID_GRADATION" ));
myAdvWidget->gradationSpinBox->RangeStepAndValidator(1.05, 5.0, 0.05, "length_precision");
- myAdvWidget->textOptionLabel->setText(tr( "TEXT_OPTION" ));
// Enforced vertices parameters
myEnfGroup = new QWidget();
myBoundaryLayersProgressionSpin -> setValue( data.myBoundaryLayersProgression );
myMultinormalsAngleSpin -> setValue( data.myMultinormalsAngle );
- myAdvWidget->workingDirectoryLineEdit ->setText ( data.myWorkingDir );
- myAdvWidget->keepWorkingFilesCheck ->setChecked ( data.myKeepFiles );
- myAdvWidget->verboseLevelSpin ->setValue ( data.myVerboseLevel );
- myAdvWidget->createNewNodesCheck ->setChecked ( data.myToCreateNewNodes );
- myAdvWidget->removeInitialCentralPointCheck ->setChecked ( data.myRemoveInitialCentralPoint );
- myAdvWidget->boundaryRecoveryCheck ->setChecked ( data.myBoundaryRecovery );
- myAdvWidget->FEMCorrectionCheck ->setChecked ( data.myFEMCorrection );
- myAdvWidget->gradationSpinBox ->setValue ( data.myGradation );
- myAdvWidget->textOptionLineEdit ->setText ( data.myTextOption );
- myAdvWidget->logInFileCheck ->setChecked ( !data.myLogInStandardOutput );
- myAdvWidget->removeLogOnSuccessCheck ->setChecked ( data.myRemoveLogOnSuccess );
+ myAdvWidget->workingDirectoryLineEdit ->setText ( data.myWorkingDir );
+ myAdvWidget->keepWorkingFilesCheck ->setChecked( data.myKeepFiles );
+ myAdvWidget->verboseLevelSpin ->setValue ( data.myVerboseLevel );
+ myAdvWidget->createNewNodesCheck ->setChecked( data.myToCreateNewNodes );
+ myAdvWidget->removeInitialCentralPointCheck ->setChecked( data.myRemoveInitialCentralPoint );
+ myAdvWidget->boundaryRecoveryCheck ->setChecked( data.myBoundaryRecovery );
+ myAdvWidget->FEMCorrectionCheck ->setChecked( data.myFEMCorrection );
+ myAdvWidget->gradationSpinBox ->setValue ( data.myGradation );
+ myAdvWidget->myAdvOptionsTable ->SetCustomOptions( data.myTextOption );
+ myAdvWidget->logInFileCheck ->setChecked( !data.myLogInStandardOutput );
+ myAdvWidget->removeLogOnSuccessCheck ->setChecked( data.myRemoveLogOnSuccess );
TEnfVertexList::const_iterator it;
int rowCount = 0;
h_data.myBoundaryRecovery = h->GetToUseBoundaryRecoveryVersion();
h_data.myFEMCorrection = h->GetFEMCorrection();
h_data.myGradation = h->GetGradation();
- h_data.myTextOption = h->GetTextOption();
+ h_data.myTextOption = h->GetAdvancedOption();
h_data.myLogInStandardOutput = h->GetStandardOutputLog();
h_data.myRemoveLogOnSuccess = h->GetRemoveLogOnSuccess();
if ( h->GetGradation() != h_data.myGradation )
h->SetGradation ( h_data.myGradation );
if ( h->GetTextOption() != h_data.myTextOption )
- h->SetTextOption ( h_data.myTextOption.toLatin1().constData() );
+ h->SetAdvancedOption ( h_data.myTextOption.toLatin1().constData() );
if ( h->GetStandardOutputLog() != h_data.myLogInStandardOutput )
h->SetStandardOutputLog ( h_data.myLogInStandardOutput );
if ( h->GetRemoveLogOnSuccess() != h_data.myRemoveLogOnSuccess )
h_data.myBoundaryRecovery = myAdvWidget->boundaryRecoveryCheck->isChecked();
h_data.myFEMCorrection = myAdvWidget->FEMCorrectionCheck->isChecked();
h_data.myGradation = myAdvWidget->gradationSpinBox->value();
- h_data.myTextOption = myAdvWidget->textOptionLineEdit->text();
+ h_data.myTextOption = myAdvWidget->myAdvOptionsTable->GetCustomOptions();
h_data.myLogInStandardOutput = !myAdvWidget->logInFileCheck->isChecked();
h_data.myRemoveLogOnSuccess = myAdvWidget->removeLogOnSuccessCheck->isChecked();
pass
## Sets command line option as text.
+ #
+ # OBSOLETE. Use SetAdvancedOption()
# @param option command line option
def SetTextOption(self, option):
- self.Parameters().SetTextOption(option)
+ self.Parameters().SetAdvancedOption(option)
+ pass
+
+ ## Sets command line option as text.
+ # @param option command line option
+ def SetAdvancedOption(self, option):
+ self.Parameters().SetAdvancedOption(option)
pass
pass # end of HYBRID_Algorithm class
}
//=======================================================================
-//function : SetTextOption
+//function : SetAdvancedOption
//=======================================================================
-void HYBRIDPlugin_Hypothesis::SetTextOption(const std::string& option)
+void HYBRIDPlugin_Hypothesis::SetAdvancedOption(const std::string& option)
{
if ( myTextOption != option ) {
myTextOption = option;
}
//=======================================================================
-//function : GetTextOption
+//function : GetAdvancedOption
//=======================================================================
-std::string HYBRIDPlugin_Hypothesis::GetTextOption() const
+std::string HYBRIDPlugin_Hypothesis::GetAdvancedOption() const
{
return myTextOption;
}
else
load.clear(ios::badbit | load.rdstate());
- if ( !myWorkingDirectory.empty() ) {
- isOK = static_cast<bool>(load >> i);
- if (isOK)
- myKeepFiles = i;
- else
- load.clear(ios::badbit | load.rdstate());
- }
-
isOK = static_cast<bool>(load >> i);
if (isOK)
myVerboseLevel = (short) i;
/*!
* To set hiden/undocumented/advanced options
*/
- void SetTextOption(const std::string& option);
- std::string GetTextOption() const;
+ void SetAdvancedOption(const std::string& option);
+ std::string GetAdvancedOption() const;
/*!
* To define the volumic gradation
*/
void HYBRIDPlugin_Hypothesis_i::SetTextOption(const char* option)
{
ASSERT(myBaseImpl);
- this->GetImpl()->SetTextOption(option);
- SMESH::TPythonDump() << _this() << ".SetTextOption( '" << option << "' )";
+ this->GetImpl()->SetAdvancedOption(option);
+ SMESH::TPythonDump() << _this() << ".SetAdvancedOption( '" << option << "' )";
}
//=======================================================================
char* HYBRIDPlugin_Hypothesis_i::GetTextOption()
{
ASSERT(myBaseImpl);
- return CORBA::string_dup( this->GetImpl()->GetTextOption().c_str() );
+ return CORBA::string_dup( this->GetImpl()->GetAdvancedOption().c_str() );
+}
+
+//=======================================================================
+//function : SetAdvancedOption
+//=======================================================================
+void HYBRIDPlugin_Hypothesis_i::SetAdvancedOption(const char* theOptAndVals )
+{
+ if ( theOptAndVals && GetImpl()->GetAdvancedOption() != theOptAndVals )
+ {
+ GetImpl()->SetAdvancedOption( theOptAndVals );
+ SMESH::TPythonDump() << _this() << ".SetAdvancedOption( '" << theOptAndVals << "' )";
+ }
+}
+
+//=======================================================================
+//function : GetAdvancedOption
+//=======================================================================
+char* HYBRIDPlugin_Hypothesis_i::GetAdvancedOption()
+{
+ return CORBA::string_dup( GetImpl()->GetAdvancedOption().c_str() );
}
//=======================================================================
/*!
* To set hiden/undocumented/advanced options
*/
+ void SetAdvancedOption(const char* theOptAndVals );
+ char* GetAdvancedOption();
void SetTextOption(const char* option);
char* GetTextOption();
/*!