Salome HOME
Documentation for HOMARD adaptation
authorjfa <jfa@opencascade.com>
Tue, 21 Dec 2021 16:05:38 +0000 (19:05 +0300)
committerjfa <jfa@opencascade.com>
Tue, 21 Dec 2021 16:05:38 +0000 (19:05 +0300)
26 files changed:
doc/salome/gui/SMESH/images/adaptation_with_homard_advanced.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/adaptation_with_homard_arguments.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/adaptation_with_homard_boundary_analytical.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/adaptation_with_homard_boundary_cao.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/adaptation_with_homard_boundary_discrete.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_1.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_an_1.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_an_2.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_an_3.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_an_4.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_an_co_1.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_an_co_2.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_an_cy.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_an_sp.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_an_to.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_cao_1.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_cao_2.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_di_1.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_di_2.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/create_boundary_di_3.png [new file with mode: 0644]
doc/salome/gui/SMESH/input/adaptation.rst
doc/salome/gui/SMESH/input/homard_create_boundary.rst [new file with mode: 0644]
doc/salome/gui/SMESH/input/tui_adaptation.rst
src/SMESHGUI/SMESHGUI_HomardAdaptDlg.cxx
src/SMESHGUI/SMESHGUI_HomardAdaptDlg.h
src/SMESHGUI/SMESHGUI_HomardBoundaryDlg.cxx

diff --git a/doc/salome/gui/SMESH/images/adaptation_with_homard_advanced.png b/doc/salome/gui/SMESH/images/adaptation_with_homard_advanced.png
new file mode 100644 (file)
index 0000000..dc05826
Binary files /dev/null and b/doc/salome/gui/SMESH/images/adaptation_with_homard_advanced.png differ
diff --git a/doc/salome/gui/SMESH/images/adaptation_with_homard_arguments.png b/doc/salome/gui/SMESH/images/adaptation_with_homard_arguments.png
new file mode 100644 (file)
index 0000000..2bdd411
Binary files /dev/null and b/doc/salome/gui/SMESH/images/adaptation_with_homard_arguments.png differ
diff --git a/doc/salome/gui/SMESH/images/adaptation_with_homard_boundary_analytical.png b/doc/salome/gui/SMESH/images/adaptation_with_homard_boundary_analytical.png
new file mode 100644 (file)
index 0000000..2beb58d
Binary files /dev/null and b/doc/salome/gui/SMESH/images/adaptation_with_homard_boundary_analytical.png differ
diff --git a/doc/salome/gui/SMESH/images/adaptation_with_homard_boundary_cao.png b/doc/salome/gui/SMESH/images/adaptation_with_homard_boundary_cao.png
new file mode 100644 (file)
index 0000000..8d823b9
Binary files /dev/null and b/doc/salome/gui/SMESH/images/adaptation_with_homard_boundary_cao.png differ
diff --git a/doc/salome/gui/SMESH/images/adaptation_with_homard_boundary_discrete.png b/doc/salome/gui/SMESH/images/adaptation_with_homard_boundary_discrete.png
new file mode 100644 (file)
index 0000000..31d2cdf
Binary files /dev/null and b/doc/salome/gui/SMESH/images/adaptation_with_homard_boundary_discrete.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_1.png b/doc/salome/gui/SMESH/images/create_boundary_1.png
new file mode 100644 (file)
index 0000000..f6e34b6
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_1.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_an_1.png b/doc/salome/gui/SMESH/images/create_boundary_an_1.png
new file mode 100644 (file)
index 0000000..2e634da
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_an_1.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_an_2.png b/doc/salome/gui/SMESH/images/create_boundary_an_2.png
new file mode 100644 (file)
index 0000000..25c6e9b
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_an_2.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_an_3.png b/doc/salome/gui/SMESH/images/create_boundary_an_3.png
new file mode 100644 (file)
index 0000000..6f38d9f
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_an_3.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_an_4.png b/doc/salome/gui/SMESH/images/create_boundary_an_4.png
new file mode 100644 (file)
index 0000000..abf1042
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_an_4.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_an_co_1.png b/doc/salome/gui/SMESH/images/create_boundary_an_co_1.png
new file mode 100644 (file)
index 0000000..7212cba
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_an_co_1.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_an_co_2.png b/doc/salome/gui/SMESH/images/create_boundary_an_co_2.png
new file mode 100644 (file)
index 0000000..017b56d
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_an_co_2.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_an_cy.png b/doc/salome/gui/SMESH/images/create_boundary_an_cy.png
new file mode 100644 (file)
index 0000000..2efc3fd
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_an_cy.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_an_sp.png b/doc/salome/gui/SMESH/images/create_boundary_an_sp.png
new file mode 100644 (file)
index 0000000..be7b28b
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_an_sp.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_an_to.png b/doc/salome/gui/SMESH/images/create_boundary_an_to.png
new file mode 100644 (file)
index 0000000..38e3940
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_an_to.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_cao_1.png b/doc/salome/gui/SMESH/images/create_boundary_cao_1.png
new file mode 100644 (file)
index 0000000..96c2382
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_cao_1.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_cao_2.png b/doc/salome/gui/SMESH/images/create_boundary_cao_2.png
new file mode 100644 (file)
index 0000000..94da749
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_cao_2.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_di_1.png b/doc/salome/gui/SMESH/images/create_boundary_di_1.png
new file mode 100644 (file)
index 0000000..8f5770b
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_di_1.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_di_2.png b/doc/salome/gui/SMESH/images/create_boundary_di_2.png
new file mode 100644 (file)
index 0000000..33ed85f
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_di_2.png differ
diff --git a/doc/salome/gui/SMESH/images/create_boundary_di_3.png b/doc/salome/gui/SMESH/images/create_boundary_di_3.png
new file mode 100644 (file)
index 0000000..e682a39
Binary files /dev/null and b/doc/salome/gui/SMESH/images/create_boundary_di_3.png differ
index 624851d7542cb3a7e4853bfbb28fae10953dd958..ceac1c9986f63074285800305cd3150a6b6e4938 100644 (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
diff --git a/doc/salome/gui/SMESH/input/homard_create_boundary.rst b/doc/salome/gui/SMESH/input/homard_create_boundary.rst
new file mode 100644 (file)
index 0000000..5053f64
--- /dev/null
@@ -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
index e0bf7d0da2168795bbaa6daa3a3f827947a30ff6..b478d99116aa1711c4ceffdd6e5b478d9a038679 100644 (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
index e1507e9dbe1536f27afd5e4c56158c7061fb1598..fb74f255383ff2f89fd4168ed777d12c4bb73417 100644 (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"));
-  PBBoundaryDiEdit->setAutoDefault(false);
+  PBBoundaryDiNew  = new QPushButton(tr("New"), GBBoundaryD);
+  PBBoundaryDiEdit = new QPushButton(tr("Edit"), GBBoundaryD);
+  PBBoundaryDiHelp = new QPushButton(tr("Help"), GBBoundaryD);
 
-  gridLayout->addWidget(PBBoundaryDiEdit, 0, 3, 1, 1);
-
-  PBBoundaryDiHelp = new QPushButton(GBBoundaryD);
-  PBBoundaryDiHelp->setObjectName(QString::fromUtf8("PBBoundaryDiHelp"));
+  PBBoundaryDiNew->setAutoDefault(false);
+  PBBoundaryDiEdit->setAutoDefault(false);
   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"));
-
-  gridLayout->addWidget(verboseLevelLabel, 1, 0, 1, 1);
-
   verboseLevelSpin = new QSpinBox(logGroupBox);
-  verboseLevelSpin->setObjectName(QString("verboseLevelSpin"));
 
-  gridLayout->addWidget(verboseLevelSpin, 1, 1, 1, 1);
+  gridLayout->addWidget(verboseLevelLabel, 1, 0, 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()
index ebc5327b7564bd8dad4dd022ca9ab1a8705dd531..7c07fce4b12ab2655dd8f5750b1ae4d08dcb7fa7 100644 (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();
index 7d51a886af358ff06e1b6da179f722489afb45e4..f6899c28dcfe0ca63504ff42b321ce12981ef236 100644 (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()