Documentation for HOMARD adaptation

This commit is contained in:
jfa 2021-12-21 19:05:38 +03:00
parent 010b8a9efd
commit 24b5a59e1b
26 changed files with 283 additions and 117 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -5,9 +5,58 @@ Adaptation
**********
Mesh module provides the possibility to perform different adaptations of a mesh.
To refine the mesh means to cut out elements indicated according to indications provided by the user.
.. _homard_adapt_anchor:
HOMARD
######
HOMARD can treat meshes into 2 or 3 dimensions and comprising the following elements:
- mesh-points
- segments
- triangles
- quadrangles
- tetrahedra
- hexahedra
- prisms
These elements can be present simultaneously. For example, HOMARD will be able to adapt a comprising mesh of the triangles and the quadrangles.
To start operation, select **Remesh with HOMARD** item in **Adaptation** menu.
.. image:: ../images/adaptation_with_homard_arguments.png
:align: center
* **Mesh In** is the initial mesh to remesh.
* **Mesh Out** is the resulting mesh after remeshing. By default, the name of the initial mesh is kept and the file name is based on the name of the initial mesh.
* **Conformity type** is a choice between **Conformal** and **Non conformal**.
* **Boundary type** is a choice between **No boundary**, **CAO** and **Non CAO**.
- If the choice is **CAO**, a XAO file is required for each CAO boundary creation.
.. image:: ../images/adaptation_with_homard_boundary_cao.png
:align: center
**See more** at :ref:`homard_create_boundary_CAO`.
- If the choice is **Non CAO**, some discrete and/or analytical boundaries can be created.
.. image:: ../images/adaptation_with_homard_boundary_discrete.png
:align: center
**See more** at :ref:`homard_create_boundary_Di`.
.. image:: ../images/adaptation_with_homard_boundary_analytical.png
:align: center
**See more** at :ref:`homard_create_boundary_An`.
.. note::
A mesh adaptation based on splitting is available by the HOMARD module.
The exhaustive description of HOMARD can be read into its documentation. It can be reached by the general help button.
**See Also** a sample TUI Script of adaptation with :ref:`tui_homard_adapt`.
.. _mg_adapt_anchor:
@ -16,7 +65,7 @@ MG_Adapt
For meshes made of triangles and/or tetrahedra, remeshing operations are available with the MG-Adapt plugin. The remeshing is based on wanted mesh sizes defined over the mesh or as a constant. The boundaries are dedeuced from the initial mesh.
To start **Remeshing** operation, select **MG Adapt** tab in **Adaptation** dialog.
To start **Remeshing** operation, select **Remesh with MG_Adapt** item in **Adaptation** menu.
.. image:: ../images/adaptation_01.png
:align: center

View File

@ -0,0 +1,160 @@
.. _homard_create_boundary:
The boundary
############
.. index:: single: boundary
.. index:: single: frontière
.. index:: single: CAO
The object boundary contains all the geometrical definitions allowing to describe a curved boundary to be followed.
There are two modes of description of a boundary:
- CAO: the boundary comes from the geometry of the domain
- Non CAO: if the CAO is not available, the boundary can be approximated by its descriptions:
* Discrete: to describe the set of 1D curves that defines the boundary
* Analytics: to describe every surface that defines the boundary
This choice is:
.. image:: ../images/create_boundary_1.png
:align: center
.. _homard_create_boundary_CAO:
CAO boundary
************
The follow-up of a CAO boundary will be made by selecting a boundary chosen in the list of the existing CAO boundaries.
In the starting up, the list is empty. It is necessary to create a first CAO boundary by activation of the button "*New*":
.. image:: ../images/create_boundary_cao_1.png
:align: center
The window invites in the choice of a file that contains the CAO with XAO format. This CAO is the one that is the basis for the initial mesh. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary, whatever its type.
.. image:: ../images/create_boundary_cao_2.png
:align: center
.. note::
The coherence between this CAO and the initial mesh is not checked.
.. _homard_create_boundary_Di:
Discrete boundary
*****************
The follow-up of a discrete boundary will be made by selecting a boundary chosen in the list of the existing discrete boundaries.
In the starting up, the list is empty. It is necessary to create a first discrete boundary by activation of the button "*New*":
.. image:: ../images/create_boundary_di_1.png
:align: center
The window invites in the choice of a file of mesh. This mesh is the one of all the lines constituting the boundary. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary, whatever its type.
.. image:: ../images/create_boundary_di_2.png
:align: center
.. note::
The file has to contain only a single mesh.
If discrete boundaries were already defined for another case, we can select one of them. We can also create a new discrete boundary by activation of the button "*New*", as explained previously.
.. image:: ../images/create_boundary_di_3.png
:align: center
.. _homard_create_boundary_An:
Analytical boundary
*******************
In the starting up, SALOME shows a table with one only one column. This column contains the list of all the groups of the initial mesh defining the case.
.. image:: ../images/create_boundary_an_1.png
:align: center
It is necessary to create a first analytical boundary by activation of the button "*New*". We shall have the choice between cylinder, sphere, cone or torus. When the boundary will be validated, its name will appear in header of the second column.
.. image:: ../images/create_boundary_an_2.png
:align: center
It is now necessary to establish the link enter the mesh defining the case and this boundary described analytically. It is made by checking the groups of the faces which have to be on the boundary.
.. image:: ../images/create_boundary_an_3.png
:align: center
This operation is repeated as often as we wish to place faces of meshs on a curved surface:
.. image:: ../images/create_boundary_an_4.png
:align: center
.. note::
A group can be checked very well never: it means that the elements which it defines belong to none of the described boundaries.
A group can be checked only once. Indeed, surface elements cannot belong to more than one surface.
Several groups can be checked for the same boundary. It occurs if the initial mesh of the zone was subdivided into several groups: all the surface elements belong to this surface but were distributed in several groups.
Conversely, a boundary can be very well retained by no group. It occurs if it was defined for a previous case and if it is groundless for the case in the course of definition.
There are four types of analytical boundary:
- Cylindre
- Sphere
- Cone, described by an axis and an angle or by two radius
- Torus
.. note::
The numerical values proposed by default take into account the geometry of the mesh.
Cylindre
========
.. index:: single: cylindre
The cylinder is defined by a point of the axis, its axis and its radius. The axis is defined by a vector. The standard of this vector is not inevitably equal to 1; also, its orientation has no importance. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary, whatever its type.
.. image:: ../images/create_boundary_an_cy.png
:align: center
Sphere
======
.. index:: single: sphere
The sphere is defined by its center and its radius. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary, whatever its type.
.. image:: ../images/create_boundary_an_sp.png
:align: center
Cone
====
.. index:: single: cone
A cone is defined by two different manners: the center, the axis and the angle of opening in degree or by two points centered on the axis and the associated radius. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary, whatever its type.
Creation by an origin, an axis and an angle of opening:
.. image:: ../images/create_boundary_an_co_1.png
:align: center
Creation by two points centered on the axis and the associated radius:
.. image:: ../images/create_boundary_an_co_2.png
:align: center
.. index:: single: object browser
Torus
=====
.. index:: single: torus
The torus is defined by its centre, its axis, the revolution radius and the primary radius. The axis is defined by a vector. The standard of this vector is not inevitably equal to 1; also, its orientation has no importance. A name of boundary is automatically proposed: Boun_1, Boun_2, etc. This name can be modified. It must not already have been used for another boundary, whatever its type.
.. image:: ../images/create_boundary_an_to.png
:align: center

View File

@ -4,6 +4,16 @@
Adaptation
**********
.. _tui_homard_adapt:
HOMARD
======
.. literalinclude:: ../../../examples/test_homard_adapt.py
:language: python
:download:`Download this script <../../../examples/test_homard_adapt.py>`
.. _tui_mg_adapt:
MG_Adapt

View File

@ -88,10 +88,9 @@ SMESHGUI_HomardAdaptDlg::SMESHGUI_HomardAdaptDlg(SMESHHOMARD::HOMARD_Gen_ptr myH
myAdvOpt = new SMESHGUI_HomardAdaptAdvanced(myTabWidget);
myTabWidget->addTab( myArgs, tr( "Args" ) );
//myTabWidget->addTab( myAdvOpt, tr( "ADVOP" ) );
myTabWidget->addTab( myAdvOpt, tr( "LOG_GROUP_TITLE" ) );
myTabWidget->addTab( myAdvOpt, tr( "ADVOP" ) );
//myAdvOpt->logGroupBox ->setTitle(tr( "LOG_GROUP_TITLE" ));
myAdvOpt->logGroupBox ->setTitle(tr( "LOG_GROUP_TITLE" ));
myAdvOpt->workingDirectoryLabel ->setText (tr( "WORKING_DIR" ));
myAdvOpt->workingDirectoryPushButton->setText (tr( "SELECT_DIR" ));
myAdvOpt->verboseLevelLabel ->setText (tr( "VERBOSE_LEVEL" ));
@ -99,8 +98,8 @@ SMESHGUI_HomardAdaptDlg::SMESHGUI_HomardAdaptDlg(SMESHHOMARD::HOMARD_Gen_ptr myH
myAdvOpt->removeLogOnSuccessCheck ->setText (tr( "REMOVE_LOG_ON_SUCCESS" ));
myAdvOpt->keepWorkingFilesCheck ->setText (tr( "KEEP_WORKING_FILES" ));
myAdvOpt->logInFileCheck->setChecked(true);
myAdvOpt->removeLogOnSuccessCheck->setChecked(false);
//myAdvOpt->logInFileCheck->setChecked(true);
//myAdvOpt->removeLogOnSuccessCheck->setChecked(false);
// Working directory
QString aWorkingDir = QDir::tempPath();
@ -156,7 +155,8 @@ SMESHGUI_HomardAdaptDlg::SMESHGUI_HomardAdaptDlg(SMESHHOMARD::HOMARD_Gen_ptr myH
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(this->sizePolicy().hasHeightForWidth());
setSizePolicy(sizePolicy);
setMinimumSize(QSize(600, 320));
//setMinimumSize(QSize(600, 320));
setMinimumSize(QSize(500, 320));
setSizeIncrement(QSize(1, 1));
setBaseSize(QSize(600, 600));
setAutoFillBackground(true);
@ -227,7 +227,7 @@ void SMESHGUI_HomardAdaptDlg::InitBoundarys()
// Pour les frontieres analytiques : la colonne des groupes
SMESHHOMARD::ListGroupType_var _listeGroupesCas = myCase->GetGroups();
QTableWidgetItem *__colItem = new QTableWidgetItem();
__colItem->setText(QApplication::translate("CreateCase", "", 0));
__colItem->setText(tr(""));
myArgs->TWBoundary->setHorizontalHeaderItem(0, __colItem);
for ( int i = 0; i < (int)_listeGroupesCas->length(); i++ ) {
myArgs->TWBoundary->insertRow(i);
@ -493,7 +493,6 @@ bool SMESHGUI_HomardAdaptDlg::PushOnApply()
myArgs->myInMedFileRadio->setEnabled(true);
myArgs->myInBrowserRadio->setEnabled(true);
myArgs->mySelectInMedFileLineEdit->setReadOnly(false);
//myArgs->mySelectInMedFileButton->hide();
myArgs->mySelectInMedFileButton->setEnabled(true);
myArgs->myInBrowserObject->setReadOnly(false);
myAdvOpt->workingDirectoryLineEdit->setReadOnly(false);
@ -514,7 +513,6 @@ void SMESHGUI_HomardAdaptDlg::PushOnOK()
void SMESHGUI_HomardAdaptDlg::PushOnHelp()
{
//SMESH::ShowHelpFile(QString("gui_create_case.html"));
SMESH::ShowHelpFile("adaptation.html#_homard_adapt_anchor");
}
@ -678,7 +676,7 @@ void SMESHGUI_HomardAdaptDlg::PushBoundaryCAOEdit()
// ------------------------------------------------------------------------
void SMESHGUI_HomardAdaptDlg::PushBoundaryCAOHelp()
{
SMESH::ShowHelpFile(QString("gui_create_boundary.html"));
SMESH::ShowHelpFile(QString("homard_create_boundary.html#cao-boundary"));
}
// ------------------------------------------------------------------------
@ -734,9 +732,7 @@ void SMESHGUI_HomardAdaptDlg::PushBoundaryDiEdit()
// ------------------------------------------------------------------------
void SMESHGUI_HomardAdaptDlg::PushBoundaryDiHelp()
{
SMESH::ShowHelpFile(QString("gui_create_boundary.html"));
//std::string LanguageShort = myHomardGen->GetLanguageShort();
//HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("frontiere-discrete"), QString(LanguageShort.c_str()));
SMESH::ShowHelpFile(QString("homard_create_boundary.html#discrete-boundary"));
}
// ------------------------------------------------------------------------
@ -774,7 +770,7 @@ void SMESHGUI_HomardAdaptDlg::AddBoundaryAn(QString newBoundary)
nbcol += 1 ;
myArgs->TWBoundary->setColumnCount ( nbcol ) ;
QTableWidgetItem *__colItem = new QTableWidgetItem();
__colItem->setText(QApplication::translate("CreateCase", newBoundary.toStdString().c_str(), 0));
__colItem->setText(tr(newBoundary.toStdString().c_str()));
myArgs->TWBoundary->setHorizontalHeaderItem(nbcol-1, __colItem);
/* TWBoundary->horizontalHeaderItem(nbcol-1)->setFlags( Qt::ItemIsSelectable|Qt::ItemIsEnabled );*/
// Chaque case est a cocher
@ -821,9 +817,7 @@ void SMESHGUI_HomardAdaptDlg::PushBoundaryAnEdit()
void SMESHGUI_HomardAdaptDlg::PushBoundaryAnHelp()
// ------------------------------------------------------------------------
{
SMESH::ShowHelpFile(QString("gui_create_boundary.html"));
//std::string LanguageShort = myHomardGen->GetLanguageShort();
//HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("frontiere-analytique"), QString(LanguageShort.c_str()));
SMESH::ShowHelpFile(QString("homard_create_boundary.html#analytical-boundary"));
}
//=================================================================================
@ -833,14 +827,14 @@ void SMESHGUI_HomardAdaptDlg::PushBoundaryAnHelp()
SMESHGUI_HomardAdaptArguments::SMESHGUI_HomardAdaptArguments(QWidget* parent)
: QWidget(parent)
{
setupUi(this);
setupUi();
}
SMESHGUI_HomardAdaptArguments::~SMESHGUI_HomardAdaptArguments()
{
}
void SMESHGUI_HomardAdaptArguments::setupUi(QWidget *CreateCase)
void SMESHGUI_HomardAdaptArguments::setupUi()
{
// Mesh in
QGroupBox* aMeshIn = new QGroupBox( tr( "MeshIn" ), this );
@ -887,7 +881,7 @@ void SMESHGUI_HomardAdaptArguments::setupUi(QWidget *CreateCase)
meshOut->addWidget( myOutPublishChk, 2, 0,1,1 );
// Conformity type
QGroupBox *GBTypeConf = new QGroupBox(tr("Conformity type"), CreateCase);
QGroupBox *GBTypeConf = new QGroupBox(tr("Conformity type"), this);
RBConforme = new QRadioButton(tr("Conformal"), GBTypeConf);
RBNonConforme = new QRadioButton(tr("Non conformal"), GBTypeConf);
RBConforme->setChecked(true);
@ -899,7 +893,7 @@ void SMESHGUI_HomardAdaptArguments::setupUi(QWidget *CreateCase)
hboxLayout2->addWidget(RBNonConforme);
// Boundary type
GBTypeBoun = new QGroupBox(tr("Boundary type"), CreateCase);
GBTypeBoun = new QGroupBox(tr("Boundary type"), this);
RBBoundaryNo = new QRadioButton(tr("No boundary"), GBTypeBoun);
RBBoundaryCAO = new QRadioButton(tr("CAO"), GBTypeBoun);
@ -917,9 +911,9 @@ void SMESHGUI_HomardAdaptArguments::setupUi(QWidget *CreateCase)
CBBoundaryCAO = new QComboBox(GBBoundaryC);
CBBoundaryCAO->setSizeAdjustPolicy(QComboBox::AdjustToContents);
PBBoundaryCAONew = new QPushButton(tr("CAO_NEW_BTN"), GBBoundaryC);
PBBoundaryCAOEdit = new QPushButton(tr("CAO_EDIT_BTN"), GBBoundaryC);
PBBoundaryCAOHelp = new QPushButton(tr("CAO_HELP_BTN"), GBBoundaryC);
PBBoundaryCAONew = new QPushButton(tr("New"), GBBoundaryC);
PBBoundaryCAOEdit = new QPushButton(tr("Edit"), GBBoundaryC);
PBBoundaryCAOHelp = new QPushButton(tr("Help"), GBBoundaryC);
PBBoundaryCAONew->setAutoDefault(false);
PBBoundaryCAOEdit->setAutoDefault(false);
@ -937,8 +931,8 @@ void SMESHGUI_HomardAdaptArguments::setupUi(QWidget *CreateCase)
// Non CAO (discrete / analytical)
GBBoundaryN = new QGroupBox(GBTypeBoun);
CBBoundaryD = new QCheckBox(tr("BOUNDARY_DISCRETE"), GBBoundaryN);
CBBoundaryA = new QCheckBox(tr("BOUNDARY_ANALYTICAL"), GBBoundaryN);
CBBoundaryD = new QCheckBox(tr("Discrete boundary"), GBBoundaryN);
CBBoundaryA = new QCheckBox(tr("Analytical boundary"), GBBoundaryN);
//hboxLayout3 = new QHBoxLayout(GBBoundaryN);
//hboxLayout3->setSpacing(6);
@ -953,9 +947,7 @@ void SMESHGUI_HomardAdaptArguments::setupUi(QWidget *CreateCase)
gridLayout = new QGridLayout(GBBoundaryD);
gridLayout->setSpacing(6);
gridLayout->setContentsMargins(9, 9, 9, 9);
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
CBBoundaryDi = new QComboBox(GBBoundaryD);
CBBoundaryDi->setObjectName(QString::fromUtf8("CBBoundaryDi"));
CBBoundaryDi->setSizeAdjustPolicy(QComboBox::AdjustToContents);
gridLayout->addWidget(CBBoundaryDi, 0, 0, 1, 1);
@ -963,34 +955,27 @@ void SMESHGUI_HomardAdaptArguments::setupUi(QWidget *CreateCase)
QSpacerItem* spacerItem5 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum);
gridLayout->addItem(spacerItem5, 0, 1, 1, 1);
PBBoundaryDiEdit = new QPushButton(GBBoundaryD);
PBBoundaryDiEdit->setObjectName(QString::fromUtf8("PBBoundaryDiEdit"));
PBBoundaryDiNew = new QPushButton(tr("New"), GBBoundaryD);
PBBoundaryDiEdit = new QPushButton(tr("Edit"), GBBoundaryD);
PBBoundaryDiHelp = new QPushButton(tr("Help"), GBBoundaryD);
PBBoundaryDiNew->setAutoDefault(false);
PBBoundaryDiEdit->setAutoDefault(false);
gridLayout->addWidget(PBBoundaryDiEdit, 0, 3, 1, 1);
PBBoundaryDiHelp = new QPushButton(GBBoundaryD);
PBBoundaryDiHelp->setObjectName(QString::fromUtf8("PBBoundaryDiHelp"));
PBBoundaryDiHelp->setAutoDefault(false);
gridLayout->addWidget(PBBoundaryDiNew, 0, 2, 1, 1);
gridLayout->addWidget(PBBoundaryDiEdit, 0, 3, 1, 1);
gridLayout->addWidget(PBBoundaryDiHelp, 0, 4, 1, 1);
PBBoundaryDiNew = new QPushButton(GBBoundaryD);
PBBoundaryDiNew->setAutoDefault(false);
gridLayout->addWidget(PBBoundaryDiNew, 0, 2, 1, 1);
// analytical
GBBoundaryA = new QGroupBox(tr("Analytical boundary"), GBBoundaryN);
GBBoundaryA->setMinimumSize(QSize(548, 200));
formLayout = new QFormLayout(GBBoundaryA);
formLayout->setObjectName(QString::fromUtf8("formLayout"));
TWBoundary = new QTableWidget(GBBoundaryA);
if (TWBoundary->columnCount() < 1)
TWBoundary->setColumnCount(1);
QTableWidgetItem *__qtablewidgetitem = new QTableWidgetItem();
TWBoundary->setHorizontalHeaderItem(0, __qtablewidgetitem);
TWBoundary->setObjectName(QString::fromUtf8("TWBoundary"));
TWBoundary->setEditTriggers(QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked);
TWBoundary->setShowGrid(true);
TWBoundary->setRowCount(0);
@ -1001,23 +986,17 @@ void SMESHGUI_HomardAdaptArguments::setupUi(QWidget *CreateCase)
gridLayout1 = new QGridLayout();
gridLayout1->setSpacing(6);
gridLayout1->setContentsMargins(0, 0, 0, 0);
gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
PBBoundaryAnEdit = new QPushButton(GBBoundaryA);
PBBoundaryAnEdit->setObjectName(QString::fromUtf8("PBBoundaryAnEdit"));
PBBoundaryAnEdit->setAutoDefault(false);
gridLayout1->addWidget(PBBoundaryAnEdit, 1, 0, 1, 1);
PBBoundaryAnNew = new QPushButton(tr("New"), GBBoundaryA);
PBBoundaryAnEdit = new QPushButton(tr("Edit"), GBBoundaryA);
PBBoundaryAnHelp = new QPushButton(tr("Help"), GBBoundaryA);
PBBoundaryAnNew = new QPushButton(GBBoundaryA);
PBBoundaryAnNew->setObjectName(QString::fromUtf8("PBBoundaryAnNew"));
PBBoundaryAnNew->setAutoDefault(false);
gridLayout1->addWidget(PBBoundaryAnNew, 0, 0, 1, 1);
PBBoundaryAnHelp = new QPushButton(GBBoundaryA);
PBBoundaryAnHelp->setObjectName(QString::fromUtf8("PBBoundaryAnHelp"));
PBBoundaryAnEdit->setAutoDefault(false);
PBBoundaryAnHelp->setAutoDefault(false);
gridLayout1->addWidget(PBBoundaryAnNew, 0, 0, 1, 1);
gridLayout1->addWidget(PBBoundaryAnEdit, 1, 0, 1, 1);
gridLayout1->addWidget(PBBoundaryAnHelp, 2, 0, 1, 1);
formLayout->setLayout(0, QFormLayout::FieldRole, gridLayout1);
@ -1040,7 +1019,7 @@ void SMESHGUI_HomardAdaptArguments::setupUi(QWidget *CreateCase)
aBoundTypeLayout->addWidget(GBBoundaryN, 2, 0, 1, 3);
// Arguments layout
QGridLayout *argumentsLayout = new QGridLayout(CreateCase);
QGridLayout *argumentsLayout = new QGridLayout(this);
argumentsLayout->addWidget(aMeshIn, 0, 0, 1, 3);
argumentsLayout->addWidget(aMeshOut, 1, 0, 1, 3);
argumentsLayout->addWidget(GBTypeConf, 2, 0, 1, 3);
@ -1048,20 +1027,8 @@ void SMESHGUI_HomardAdaptArguments::setupUi(QWidget *CreateCase)
argumentsLayout->setColumnStretch( 1, 5 );
argumentsLayout->setRowStretch( 4, 5 );
//mySelectInMedFileButton->setText(QString());
CBBoundaryD->setText(QApplication::translate("CreateCase", "Discrete boundary", nullptr));
CBBoundaryA->setText(QApplication::translate("CreateCase", "Analytical boundary", nullptr));
PBBoundaryCAOEdit->setText(QApplication::translate("CreateCase", "Edit", nullptr));
PBBoundaryCAOHelp->setText(QApplication::translate("CreateCase", "Help", nullptr));
PBBoundaryCAONew->setText(QApplication::translate("CreateCase", "New", nullptr));
PBBoundaryDiEdit->setText(QApplication::translate("CreateCase", "Edit", nullptr));
PBBoundaryDiHelp->setText(QApplication::translate("CreateCase", "Help", nullptr));
PBBoundaryDiNew->setText(QApplication::translate("CreateCase", "New", nullptr));
QTableWidgetItem *___qtablewidgetitem = TWBoundary->horizontalHeaderItem(0);
___qtablewidgetitem->setText(QApplication::translate("CreateCase", "a_virer", nullptr));
PBBoundaryAnEdit->setText(QApplication::translate("CreateCase", "Edit", nullptr));
PBBoundaryAnNew->setText(QApplication::translate("CreateCase", "New", nullptr));
PBBoundaryAnHelp->setText(QApplication::translate("CreateCase", "Help", nullptr));
___qtablewidgetitem->setText(tr("a_virer"));
// Initial state
myInMedFileRadio->setChecked( true );
@ -1074,11 +1041,10 @@ void SMESHGUI_HomardAdaptArguments::setupUi(QWidget *CreateCase)
CBBoundaryDi->setCurrentIndex(-1);
// Connections
QMetaObject::connectSlotsByName(CreateCase);
connect(myInMeshGroup, SIGNAL(buttonClicked(int)), this, SLOT(modeInChanged(int)));
connect(myOutMedFileChk, SIGNAL(stateChanged(int)), this, SLOT(onOutMedFileChk(int)));
connect(myOutPublishChk, SIGNAL(stateChanged(int)), this, SLOT(onOutPublishChk(int)));
connect(mySelectOutMedFileButton, SIGNAL(pressed()), this, SLOT(onSelectOutMedFileButton()));
connect(mySelectOutMedFileButton, SIGNAL(pressed()), this, SLOT(onSelectOutMedFileButton()));
emit updateSelection();
}
@ -1150,11 +1116,12 @@ void SMESHGUI_HomardAdaptArguments::onOutPublishChk(int state)
// SMESHGUI_HomardAdaptAdvanced
//////////////////////////////////////////
SMESHGUI_HomardAdaptAdvanced::SMESHGUI_HomardAdaptAdvanced( QWidget* parent, Qt::WindowFlags f )
: QWidget( parent, f )
SMESHGUI_HomardAdaptAdvanced::SMESHGUI_HomardAdaptAdvanced(QWidget* parent)
: QWidget(parent)
{
setupWidget();
connect(workingDirectoryPushButton, SIGNAL(pressed()), this, SLOT(onWorkingDirectoryPushButton()));
connect(workingDirectoryPushButton, SIGNAL(pressed()),
this, SLOT(onWorkingDirectoryPushButton()));
}
SMESHGUI_HomardAdaptAdvanced::~SMESHGUI_HomardAdaptAdvanced()
@ -1163,77 +1130,63 @@ SMESHGUI_HomardAdaptAdvanced::~SMESHGUI_HomardAdaptAdvanced()
void SMESHGUI_HomardAdaptAdvanced::setupWidget()
{
if (this->objectName().isEmpty())
this->setObjectName(QString(tr("MG-ADAPT-ADV")));
this->resize(337, 369);
//this->resize(337, 369);
// Logs and debug
logGroupBox = new QGroupBox(this);
logGroupBox->setObjectName(QString("logGroupBox"));
QGridLayout* logGroupBoxLayout = new QGridLayout(this);
logGroupBoxLayout->setMargin( 9 );
logGroupBoxLayout->setSpacing( 6 );
logGroupBoxLayout->addWidget(logGroupBox, 0, 0, 1, 1);
QGridLayout* logsLayout = new QGridLayout(logGroupBox);
logsLayout->setObjectName(QString("logsLayout"));
logsLayout->setMargin( 9 );
logsLayout->setSpacing( 6 );
// Working directory + Verbose level layout
QGridLayout* gridLayout = new QGridLayout();
gridLayout->setObjectName(QString("gridLayout"));
// Working directory
workingDirectoryLabel = new QLabel(logGroupBox);
workingDirectoryLabel->setObjectName(QString("workingDirectoryLabel"));
gridLayout->addWidget(workingDirectoryLabel, 0, 0, 1, 1);
workingDirectoryLineEdit = new QLineEdit(logGroupBox);
workingDirectoryLineEdit->setObjectName(QString("workingDirectoryLineEdit"));
gridLayout->addWidget(workingDirectoryLineEdit, 0, 1, 1, 1);
workingDirectoryPushButton = new QPushButton(logGroupBox);
workingDirectoryPushButton->setObjectName(QString("workingDirectoryPushButton"));
gridLayout->addWidget(workingDirectoryLabel, 0, 0, 1, 1);
gridLayout->addWidget(workingDirectoryLineEdit, 0, 1, 1, 1);
gridLayout->addWidget(workingDirectoryPushButton, 0, 2, 1, 1);
// Verbose level
verboseLevelLabel = new QLabel(logGroupBox);
verboseLevelLabel->setObjectName(QString("verboseLevelLabel"));
verboseLevelSpin = new QSpinBox(logGroupBox);
gridLayout->addWidget(verboseLevelLabel, 1, 0, 1, 1);
verboseLevelSpin = new QSpinBox(logGroupBox);
verboseLevelSpin->setObjectName(QString("verboseLevelSpin"));
gridLayout->addWidget(verboseLevelSpin, 1, 1, 1, 1);
gridLayout->addWidget(verboseLevelSpin, 1, 1, 1, 1);
logsLayout->addLayout(gridLayout, 0, 0, 1, 1);
// logInFileCheck + removeLogOnSuccessCheck
QHBoxLayout* horizontalLayout = new QHBoxLayout();
horizontalLayout->setObjectName(QString("horizontalLayout"));
// Log In File Check
logInFileCheck = new QCheckBox(logGroupBox);
logInFileCheck->setObjectName(QString("logInFileCheck"));
logInFileCheck->setChecked(true);
horizontalLayout->addWidget(logInFileCheck);
// Remove Log On Success Check
removeLogOnSuccessCheck = new QCheckBox(logGroupBox);
removeLogOnSuccessCheck->setObjectName(QString("removeLogOnSuccessCheck"));
logInFileCheck->setChecked(true);
removeLogOnSuccessCheck->setChecked(true);
horizontalLayout->addWidget(logInFileCheck);
horizontalLayout->addWidget(removeLogOnSuccessCheck);
logsLayout->addLayout(horizontalLayout, 1, 0, 1, 1);
// Keep Working Files Check
keepWorkingFilesCheck = new QCheckBox(logGroupBox);
keepWorkingFilesCheck->setObjectName(QString("keepWorkingFilesCheck"));
keepWorkingFilesCheck->setAutoExclusive(false);
keepWorkingFilesCheck->setChecked(false);
logsLayout->addWidget(keepWorkingFilesCheck, 2, 0, 1, 1);
//logsLayout->setColumnStretch( 1, 5 );
//logsLayout->setRowStretch( 3, 5 );
}
void SMESHGUI_HomardAdaptAdvanced::onWorkingDirectoryPushButton()

View File

@ -133,7 +133,7 @@ public:
SMESHGUI_HomardAdaptArguments (QWidget* parent);
~SMESHGUI_HomardAdaptArguments();
void setupUi(QWidget *CreateCase);
void setupUi();
public:
// Mesh In
@ -209,7 +209,7 @@ class SMESHGUI_HomardAdaptAdvanced : public QWidget
Q_OBJECT
public:
SMESHGUI_HomardAdaptAdvanced(QWidget* = 0, Qt::WindowFlags = 0);
SMESHGUI_HomardAdaptAdvanced(QWidget* = 0);
~SMESHGUI_HomardAdaptAdvanced();
void setupWidget();

View File

@ -509,9 +509,7 @@ void SMESH_CreateBoundaryAn::PushOnOK()
void SMESH_CreateBoundaryAn::PushOnHelp()
// ------------------------------------------------------------------------
{
SMESH::ShowHelpFile(QString("gui_create_boundary.html"));
//std::string LanguageShort = myHomardGen->GetLanguageShort();
//HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("un-cylindre"), QString(LanguageShort.c_str()));
SMESH::ShowHelpFile(QString("homard_create_boundary.html#analytical-boundary"));
}
// -----------------------------------
@ -903,9 +901,7 @@ void SMESH_CreateBoundaryCAO::PushOnOK()
void SMESH_CreateBoundaryCAO::PushOnHelp()
// ------------------------------------------------------------------------
{
SMESH::ShowHelpFile(QString("gui_create_boundary.html"));
//std::string LanguageShort = myHomardGen->GetLanguageShort();
//HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("CAO"), QString(LanguageShort.c_str()));
SMESH::ShowHelpFile(QString("homard_create_boundary.html#cao-boundary"));
}
// ------------------------------------------------------------------------
void SMESH_CreateBoundaryCAO::AssocieLesGroupes()
@ -1077,9 +1073,7 @@ void SMESH_CreateBoundaryDi::PushOnOK()
void SMESH_CreateBoundaryDi::PushOnHelp()
// ------------------------------------------------------------------------
{
SMESH::ShowHelpFile(QString("gui_create_boundary.html"));
//std::string LanguageShort = myHomardGen->GetLanguageShort();
//HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("frontiere-discrete"), QString(LanguageShort.c_str()));
SMESH::ShowHelpFile(QString("homard_create_boundary.html#discrete-boundary"));
}
// ------------------------------------------------------------------------
void SMESH_CreateBoundaryDi::AssocieLesGroupes()