bos #26453 Merge branch 'jfa/uniform_refinement'

This commit is contained in:
vsr 2022-01-17 15:26:24 +03:00
commit 261931b593
64 changed files with 13644 additions and 11 deletions

View File

@ -42,7 +42,7 @@ SALOME_INSTALL_SCRIPTS("${EXAMPLES_TESTS}" ${SALOME_INSTALL_DOC}/examples/SMESH)
SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test) SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test)
INSTALL(FILES ${GOOD_TESTS} ${BAD_TESTS} ${SESSION_FREE_TESTS} DESTINATION ${TEST_INSTALL_DIRECTORY}) INSTALL(FILES ${GOOD_TESTS} ${BAD_TESTS} ${SESSION_FREE_TESTS} DESTINATION ${TEST_INSTALL_DIRECTORY})
INSTALL(FILES Mesh_tri.med DESTINATION ${TEST_INSTALL_DIRECTORY}) INSTALL(FILES Mesh_tri.med test_homard_adapt.med tutorial_4.00.med tutorial_4.xao tutorial_5.00.med tutorial_5.fr.med DESTINATION ${TEST_INSTALL_DIRECTORY})
INSTALL(FILES CTestTestfileInstall.cmake INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${TEST_INSTALL_DIRECTORY} DESTINATION ${TEST_INSTALL_DIRECTORY}

Binary file not shown.

View File

@ -0,0 +1,96 @@
#!/usr/bin/env python3
import salome
salome.salome_init_without_session()
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
import SMESHHOMARD
smesh = smeshBuilder.New()
import os, inspect, tempfile, shutil
data_dir = os.path.abspath(os.path.dirname(inspect.getfile(lambda: None)))
working_dir = tempfile.mkdtemp()
input_med = os.path.join (data_dir, "test_homard_adapt.med")
output_med_1 = os.path.join (working_dir, "test_1.00_Uniform_R_01.med")
output_med_2 = os.path.join (working_dir, "test_1.00_Uniform_R_02.med")
log_file_1 = os.path.join (working_dir, "test_1.00_Uniform_R_01.med.log")
log_file_2 = os.path.join (working_dir, "test_1.00_Uniform_R_02.med.log")
# Case 1: input: med file
# output: med file, log file, published mesh
if os.path.isfile(output_med_1):
os.remove(output_med_1)
if os.path.isfile(log_file_1):
os.remove(log_file_1)
smeshhomard = smesh.Adaptation("Uniform")
smeshhomard.CreateCase("MAILL", input_med, working_dir)
smeshhomard.SetConfType(0)
smeshhomard.SetKeepMedOUT(True)
smeshhomard.SetPublishMeshOUT(True)
smeshhomard.SetMeshNameOUT("MAILL_Uniform_R_01")
smeshhomard.SetMeshFileOUT(output_med_1)
smeshhomard.SetKeepWorkingFiles(False)
smeshhomard.SetLogInFile(True)
smeshhomard.SetLogFile(log_file_1)
smeshhomard.SetRemoveLogOnSuccess(False)
smeshhomard.SetVerboseLevel(3)
smeshhomard.Compute()
if os.path.isfile(output_med_1):
os.remove(output_med_1)
else:
print("Test Uniform refinement Case 1: Error: no output med file")
assert(False)
if os.path.isfile(log_file_1):
os.remove(log_file_1)
else:
print("Test Uniform refinement Case 1: Error: no log file")
assert(False)
# Case 2: input: mesh, boundaries
# output: published mesh
if os.path.isfile(output_med_2):
os.remove(output_med_2)
if os.path.isfile(log_file_2):
os.remove(log_file_2)
# prepare input mesh
([MAILL], status) = smesh.CreateMeshesFromMED( input_med )
#smeshhomard = smesh.Adaptation("Uniform")
Boun_1 = smeshhomard.CreateBoundaryCylinder("Boun_1", 0.5, 0.5, 0.5, 0, 0, 1, 0.25)
smeshhomard.CreateCaseOnMesh("MAILL", MAILL.GetMesh(), working_dir)
smeshhomard.SetConfType(0)
smeshhomard.AddBoundaryGroup("Boun_1", "BORD_EXT")
smeshhomard.AddBoundaryGroup("Boun_1", "MOITIE1")
smeshhomard.SetKeepMedOUT(False)
smeshhomard.SetPublishMeshOUT(True)
smeshhomard.SetMeshNameOUT("MAILL_Uniform_R_02")
smeshhomard.SetMeshFileOUT(output_med_2)
smeshhomard.SetKeepWorkingFiles(False)
smeshhomard.SetLogInFile(True)
smeshhomard.SetLogFile(log_file_2)
smeshhomard.SetRemoveLogOnSuccess(True)
smeshhomard.SetVerboseLevel(0)
smeshhomard.Compute()
if os.path.isfile(output_med_2):
print("Test Uniform refinement Case 2: Error: output med file has not been removed")
assert(False)
if os.path.isfile(log_file_2):
print("Test Uniform refinement Case 2: Error: log file has not been removed")
assert(False)
shutil.rmtree(working_dir)
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser()

View File

@ -0,0 +1,100 @@
#!/usr/bin/env python3
import salome
salome.salome_init_without_session()
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
import SMESHHOMARD
smesh = smeshBuilder.New()
import os, inspect, tempfile, shutil
data_dir = os.path.abspath(os.path.dirname(inspect.getfile(lambda: None)))
working_dir = tempfile.mkdtemp()
input_med_1 = os.path.join (data_dir, "tutorial_4.00.med")
input_xao_1 = os.path.join (data_dir, "tutorial_4.xao")
output_med_1 = os.path.join (working_dir, "tutorial_4.00_Uniform_R.med")
log_file_1 = os.path.join (working_dir, "tutorial_4.00_Uniform_R.log")
# Case 1: input: med file
# output: med file, log file, published mesh
if os.path.isfile(output_med_1):
os.remove(output_med_1)
if os.path.isfile(log_file_1):
os.remove(log_file_1)
cao_name = "CAO_PIQUAGE"
smeshhomard = smesh.Adaptation("Uniform")
smeshhomard.CreateBoundaryCAO(cao_name, input_xao_1)
smeshhomard.CreateCase("PIQUAGE", input_med_1, working_dir)
smeshhomard.AddBoundary(cao_name)
smeshhomard.SetConfType(0)
smeshhomard.SetKeepMedOUT(True)
smeshhomard.SetPublishMeshOUT(True)
smeshhomard.SetMeshNameOUT("PIQUAGE_Uniform_R_01")
smeshhomard.SetMeshFileOUT(output_med_1)
smeshhomard.SetKeepWorkingFiles(False)
smeshhomard.SetLogInFile(True)
smeshhomard.SetLogFile(log_file_1)
smeshhomard.SetRemoveLogOnSuccess(False)
smeshhomard.SetVerboseLevel(3)
smeshhomard.Compute()
if os.path.isfile(output_med_1):
os.remove(output_med_1)
else:
print("Test Uniform refinement Case 1: Error: no output med file")
assert(False)
if os.path.isfile(log_file_1):
os.remove(log_file_1)
else:
print("Test Uniform refinement Case 1: Error: no log file")
assert(False)
# Case 2: input: mesh, boundaries
# output: published mesh
input_med_2 = os.path.join (data_dir, "tutorial_5.00.med")
input_fr = os.path.join (data_dir, "tutorial_5.fr.med")
output_med_2 = os.path.join (working_dir, "tutorial_5.00_Uniform_R.med")
log_file_2 = os.path.join (working_dir, "tutorial_5.00_Uniform_R.log")
if os.path.isfile(output_med_2):
os.remove(output_med_2)
if os.path.isfile(log_file_2):
os.remove(log_file_2)
# prepare input mesh
([MAILL], status) = smesh.CreateMeshesFromMED( input_med_2 )
smeshhomard = smesh.Adaptation("Uniform")
smeshhomard.CreateBoundaryDi("Boun_5_1", "MAIL_EXT", input_fr)
smeshhomard.CreateCaseOnMesh("COEUR_2D", MAILL.GetMesh(), working_dir)
smeshhomard.AddBoundary("Boun_5_1")
smeshhomard.SetConfType(1)
smeshhomard.SetKeepMedOUT(False)
smeshhomard.SetPublishMeshOUT(True)
smeshhomard.SetMeshNameOUT("COEUR_2D_Uniform_R")
smeshhomard.SetMeshFileOUT(output_med_2)
smeshhomard.SetKeepWorkingFiles(False)
smeshhomard.SetLogInFile(True)
smeshhomard.SetLogFile(log_file_2)
smeshhomard.SetRemoveLogOnSuccess(True)
smeshhomard.SetVerboseLevel(0)
smeshhomard.Compute()
if os.path.isfile(output_med_2):
print("Test Uniform refinement Case 2: Error: output med file has not been removed")
assert(False)
if os.path.isfile(log_file_2):
print("Test Uniform refinement Case 2: Error: log file has not been removed")
assert(False)
shutil.rmtree(working_dir)
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser()

View File

@ -56,6 +56,8 @@ SET(BAD_TESTS
IF(NOT WIN32) IF(NOT WIN32)
LIST(APPEND BAD_TESTS LIST(APPEND BAD_TESTS
MGAdaptTests_without_session.py MGAdaptTests_without_session.py
test_homard_adapt.py
test_uniform_refinement.py
test_smeshplugin_mg_tetra_parallele.py test_smeshplugin_mg_tetra_parallele.py
) )
ENDIF(NOT WIN32) ENDIF(NOT WIN32)

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

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: 42 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. 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:: .. 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: .. _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. 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 .. image:: ../images/adaptation_01.png
:align: center :align: center

View File

@ -0,0 +1,169 @@
.. _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.
Filtering by the groups
***********************
.. index:: single: group
We can restrict the application of the boundary to groups. So elements not belonging to these groups will not be affected. We check the associated button **Filtering with groups**. The list of the present groups of elements in the mesh is shown. It is enough to check those wanted to restrict the boundary.
.. image:: ../images/adaptation_with_homard_boundary_groups.png
:align: center
.. _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,21 @@
Adaptation Adaptation
********** **********
.. _tui_homard_adapt:
HOMARD
======
.. literalinclude:: ../../../examples/test_uniform_refinement.py
:language: python
:download:`Download this script <../../../examples/test_uniform_refinement.py>`
.. literalinclude:: ../../../examples/test_homard_adapt.py
:language: python
:download:`Download this script <../../../examples/test_homard_adapt.py>`
.. _tui_mg_adapt: .. _tui_mg_adapt:
MG_Adapt MG_Adapt

View File

@ -40,6 +40,7 @@ SET(SalomeIDLSMESH_IDLSOURCES
SMESH_Measurements.idl SMESH_Measurements.idl
${CMAKE_CURRENT_BINARY_DIR}/SMESH_smIdType.idl ${CMAKE_CURRENT_BINARY_DIR}/SMESH_smIdType.idl
MG_ADAPT.idl MG_ADAPT.idl
SMESH_Homard.idl
) )
SET(_idl_include_dirs SET(_idl_include_dirs

View File

@ -35,6 +35,11 @@
#include "SMESH_Hypothesis.idl" #include "SMESH_Hypothesis.idl"
#include "SMESH_smIdType.idl" #include "SMESH_smIdType.idl"
module SMESHHOMARD
{
interface HOMARD_Gen;
};
module SMESH module SMESH
{ {
typedef sequence<SALOMEDS::SObject> sobject_list; typedef sequence<SALOMEDS::SObject> sobject_list;
@ -581,7 +586,9 @@ module SMESH
in double theTolerance ); in double theTolerance );
MG_ADAPT CreateMG_ADAPT(); MG_ADAPT CreateMG_ADAPT();
MG_ADAPT_OBJECT Adaptation(in string adaptType); SMESHHOMARD::HOMARD_Gen CreateHOMARD_ADAPT() raises ( SALOME::SALOME_Exception );
//MG_ADAPT_OBJECT Adaptation(in string adaptType);
SALOME::GenericObj Adaptation(in string adaptType) raises ( SALOME::SALOME_Exception );
MG_ADAPT CreateAdaptationHypothesis(); MG_ADAPT CreateAdaptationHypothesis();
}; };

183
idl/SMESH_Homard.idl Normal file
View File

@ -0,0 +1,183 @@
// Copyright (C) 2011-2021 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef _SMESH_HOMARD_IDL
#define _SMESH_HOMARD_IDL
#include "SMESH_Mesh.idl"
#include "SALOME_Exception.idl"
#include "SALOMEDS.idl"
module SMESHHOMARD
{
typedef sequence<double> double_array;
typedef sequence<double> extrema;
typedef sequence<string> ListGroupType;
typedef sequence<string> ListBoundaryGroupType;
typedef sequence<string> listeBoundarys;
interface HOMARD_Boundary : SALOME::GenericObj
{
// Generalites
void SetName(in string Name) raises (SALOME::SALOME_Exception);
string GetName() raises (SALOME::SALOME_Exception);
// Caracteristiques
void SetType (in long Type) raises (SALOME::SALOME_Exception);
long GetType() raises (SALOME::SALOME_Exception);
void SetDataFile(in string DataFile) raises (SALOME::SALOME_Exception);
string GetDataFile() raises (SALOME::SALOME_Exception);
void SetMeshName(in string MeshName) raises (SALOME::SALOME_Exception);
string GetMeshName() raises (SALOME::SALOME_Exception);
void SetCylinder (in double Xcentre, in double Ycentre, in double Zcentre,
in double Xaxe, in double Yaxe, in double Zaxe, in double rayon)
raises (SALOME::SALOME_Exception);
void SetSphere (in double Xcentre, in double Ycentre, in double Zcentre, in double rayon)
raises (SALOME::SALOME_Exception);
void SetConeR (in double Xcentre1, in double Ycentre1, in double Zcentre1,
in double Rayon1,
in double Xcentre2, in double Ycentre2, in double Zcentre2,
in double Rayon2) raises (SALOME::SALOME_Exception);
void SetConeA(in double Xaxe, in double Yaxe, in double Zaxe, in double Angle,
in double Xcentre, in double Ycentre, in double ZCentre)
raises (SALOME::SALOME_Exception);
void SetTorus (in double Xcentre, in double Ycentre, in double Zcentre,
in double Xaxe, in double Yaxe, in double Zaxe,
in double rayonRev, in double rayonPri)
raises (SALOME::SALOME_Exception);
SMESHHOMARD::double_array GetCoords() raises (SALOME::SALOME_Exception);
void SetLimit (in double Xincr, in double Yincr, in double Zincr)
raises (SALOME::SALOME_Exception);
SMESHHOMARD::double_array GetLimit() raises (SALOME::SALOME_Exception);
void AddGroup(in string LeGroupe) raises (SALOME::SALOME_Exception);
void SetGroups(in ListGroupType ListGroup) raises (SALOME::SALOME_Exception);
ListGroupType GetGroups() raises (SALOME::SALOME_Exception);
string GetDumpPython() raises (SALOME::SALOME_Exception);
};
interface HOMARD_Cas : SALOME::GenericObj
{
void SetDirName(in string NomDir) raises (SALOME::SALOME_Exception);
string GetDirName() raises (SALOME::SALOME_Exception);
void SetBoundingBox(in extrema LesExtremes) raises (SALOME::SALOME_Exception);
extrema GetBoundingBox() raises (SALOME::SALOME_Exception);
void AddGroup(in string Group) raises (SALOME::SALOME_Exception);
void SetGroups(in ListGroupType ListGroup) raises (SALOME::SALOME_Exception);
ListGroupType GetGroups() raises (SALOME::SALOME_Exception);
void AddBoundary(in string BoundaryName) raises (SALOME::SALOME_Exception);
void AddBoundaryGroup(in string BoundaryName,
in string Group) raises (SALOME::SALOME_Exception);
ListBoundaryGroupType GetBoundaryGroup() raises (SALOME::SALOME_Exception);
void SupprBoundaryGroup() raises (SALOME::SALOME_Exception);
string GetDumpPython() raises (SALOME::SALOME_Exception);
};
interface HOMARD_Gen : SALOME::GenericObj
{
// Create boundaries
HOMARD_Boundary CreateBoundaryCAO (in string BoundaryName, in string FileName)
raises(SALOME::SALOME_Exception);
HOMARD_Boundary CreateBoundaryDi (in string BoundaryName, in string MeshName,
in string FileName)
raises(SALOME::SALOME_Exception);
HOMARD_Boundary CreateBoundaryCylinder (in string BoundaryName,
in double Xcentre, in double Ycentre, in double Zcentre,
in double Xaxis, in double Yaxis, in double Zaxis,
in double Radius)
raises (SALOME::SALOME_Exception);
HOMARD_Boundary CreateBoundarySphere (in string BoundaryName,
in double Xcentre, in double Ycentre, in double Zcentre,
in double Radius)
raises(SALOME::SALOME_Exception);
HOMARD_Boundary CreateBoundaryConeR (in string BoundaryName,
in double Xcentre1, in double Ycentre1, in double Zcentre1,
in double Radius1,
in double Xcentre2, in double Ycentre2, in double Zcentre2,
in double Radius2)
raises(SALOME::SALOME_Exception);
HOMARD_Boundary CreateBoundaryConeA (in string BoundaryName,
in double Xaxis, in double Yaxis, in double Zaxis,
in double Angle,
in double Xcentre, in double Ycentre, in double Zcentre)
raises(SALOME::SALOME_Exception);
HOMARD_Boundary CreateBoundaryTorus (in string BoundaryName,
in double Xcentre, in double Ycentre, in double Zcentre,
in double Xaxis, in double Yaxis, in double Zaxis,
in double RadiusRev, in double RadiusPri)
raises (SALOME::SALOME_Exception);
// Set mesh (SMESH_Mesh object or MED file) and working directory
HOMARD_Cas CreateCaseOnMesh(in string MeshName,
in SMESH::SMESH_Mesh smeshMesh,
in string theWorkingDir) raises(SALOME::SALOME_Exception);
HOMARD_Cas CreateCase(in string MeshName,
in string FileName,
in string theWorkingDir) raises(SALOME::SALOME_Exception);
// Associate boundaries to groups
void AddBoundary(in string BoundaryName) raises (SALOME::SALOME_Exception);
void AddBoundaryGroup(in string BoundaryName,
in string Group) raises (SALOME::SALOME_Exception);
// Information
HOMARD_Boundary GetBoundary(in string BoundaryName) raises (SALOME::SALOME_Exception);
HOMARD_Cas GetCase() raises (SALOME::SALOME_Exception);
listeBoundarys GetAllBoundarysName() raises (SALOME::SALOME_Exception);
// Preferences
void SetConfType(in long ConfType) raises (SALOME::SALOME_Exception);
void SetKeepMedOUT (in boolean theKeepMedOUT);
void SetPublishMeshOUT (in boolean thePublishMeshOUT);
void SetMeshNameOUT (in string theMeshName) raises (SALOME::SALOME_Exception);
void SetMeshFileOUT (in string theFileName) raises (SALOME::SALOME_Exception);
void SetVerboseLevel (in long theLevel);
void SetKeepWorkingFiles (in boolean theKeepWorkingFiles);
void SetLogInFile (in boolean theLogInFile);
void SetLogFile (in string theFileName) raises (SALOME::SALOME_Exception);
void SetRemoveLogOnSuccess (in boolean theRemoveLogOnSuccess);
// Computation
long Compute() raises (SALOME::SALOME_Exception);
// Clean data
void InvalideBoundary (in string BoundaryName) raises (SALOME::SALOME_Exception);
long DeleteBoundary (in string BoundaryName) raises (SALOME::SALOME_Exception);
void DeleteCase() raises (SALOME::SALOME_Exception);
};
}; // module SMESHHOMARD
#endif

View File

@ -23,6 +23,7 @@
SET(SMESH_RESOURCES_FILES SET(SMESH_RESOURCES_FILES
ModuleMesh.png ModuleMesh.png
adapt_mg_adapt.png adapt_mg_adapt.png
adapt_homard.png
advanced_mesh_info.png advanced_mesh_info.png
bare_border_face.png bare_border_face.png
bare_border_volume.png bare_border_volume.png

BIN
resources/adapt_homard.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

View File

@ -89,6 +89,7 @@ SET(SMESHimpl_HEADERS
SMESH_ProxyMesh.hxx SMESH_ProxyMesh.hxx
SMESH_SMESH.hxx SMESH_SMESH.hxx
MG_ADAPT.hxx MG_ADAPT.hxx
SMESH_Homard.hxx
) )
# --- sources --- # --- sources ---
@ -108,6 +109,7 @@ SET(SMESHimpl_SOURCES
SMESH_ProxyMesh.cxx SMESH_ProxyMesh.cxx
SMESH_MesherHelper.cxx SMESH_MesherHelper.cxx
MG_ADAPT.cxx MG_ADAPT.cxx
SMESH_Homard.cxx
) )
# --- rules --- # --- rules ---

1184
src/SMESH/SMESH_Homard.cxx Normal file

File diff suppressed because it is too large Load Diff

242
src/SMESH/SMESH_Homard.hxx Normal file
View File

@ -0,0 +1,242 @@
// HOMARD HOMARD : implementation of HOMARD idl descriptions
//
// Copyright (C) 2011-2021 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : HOMARD.hxx
// Author : Gerald NICOLAS, EDF
// Module : HOMARD
#ifndef _SMESH_HOMARD_ADAPT_HXX_
#define _SMESH_HOMARD_ADAPT_HXX_
#include "SMESH_SMESH.hxx"
#include <vector>
#include <string>
#include <list>
#include <iostream>
#include <fstream>
#if defined WIN32
#pragma warning ( disable: 4251 )
#endif
namespace SMESHHOMARDImpl
{
class SMESH_EXPORT HOMARD_Boundary
{
public:
HOMARD_Boundary();
~HOMARD_Boundary();
// Generalites
void SetName( const char* Name );
std::string GetName() const;
std::string GetDumpPython() const;
// Caracteristiques
void SetType( int Type );
int GetType() const;
void SetMeshName( const char* MeshName );
std::string GetMeshName() const;
void SetDataFile( const char* DataFile );
std::string GetDataFile() const;
void SetCylinder( double X0, double X1, double X2, double X3,
double X4, double X5, double X6 );
void SetSphere( double X0, double X1, double X2, double X3 );
void SetConeR( double Xcentre1, double Ycentre1, double Zcentre1, double Rayon1,
double Xcentre2, double Ycentre2, double Zcentre2, double Rayon2);
void SetConeA( double Xaxe, double Yaxe, double Zaxe, double Angle,
double Xcentre, double Ycentre, double ZCentre);
void SetTorus( double X0, double X1, double X2, double X3,
double X4, double X5, double X6, double X7 );
std::vector<double> GetCoords() const;
void SetLimit( double X0, double X1, double X2 );
std::vector<double> GetLimit() const;
void AddGroup( const char* LeGroupe);
void SetGroups(const std::list<std::string>& ListGroup );
const std::list<std::string>& GetGroups() const;
private:
std::string _Name;
std::string _DataFile;
std::string _MeshName;
int _Type;
double _Xmin, _Xmax, _Ymin, _Ymax, _Zmin, _Zmax;
double _Xaxe, _Yaxe, _Zaxe;
double _Xcentre, _Ycentre, _Zcentre, _rayon;
double _Xincr, _Yincr, _Zincr;
double _Xcentre1, _Ycentre1, _Zcentre1, _Rayon1;
double _Xcentre2, _Ycentre2, _Zcentre2, _Rayon2;
double _Angle;
std::list<std::string> _ListGroupSelected;
};
class SMESH_EXPORT HOMARD_Cas
{
public:
HOMARD_Cas();
~HOMARD_Cas();
// Generalites
std::string GetDumpPython() const;
// Caracteristiques
int SetDirName( const char* NomDir );
std::string GetDirName() const;
void SetBoundingBox( const std::vector<double>& extremas );
const std::vector<double>& GetBoundingBox() const;
void AddGroup( const char* Group);
void SetGroups( const std::list<std::string>& ListGroup );
const std::list<std::string>& GetGroups() const;
void SupprGroups();
void AddBoundary( const char* Boundary );
void AddBoundaryGroup( const char* Boundary, const char* Group );
const std::list<std::string>& GetBoundaryGroup() const;
void SupprBoundaryGroup();
void AddIteration( const char* NomIteration );
private:
std::string _NomDir;
int _Etat;
std::vector<double> _Boite; // cf HomardQTCommun pour structure du vecteur
std::list<std::string> _ListGroup;
std::list<std::string> _ListBoundaryGroup;
typedef std::string IterName;
typedef std::list<IterName> IterNames;
IterNames _ListIter;
};
class SMESH_EXPORT HomardDriver
{
public:
HomardDriver(const std::string siter, const std::string siterp1);
~HomardDriver();
//
void TexteInit( const std::string DirCompute, const std::string LogFile, const std::string Langue );
void TexteInfo( int TypeBila, int NumeIter );
void TexteMajCoords( int NumeIter );
void CreeFichierDonn();
void TexteAdap();
void CreeFichier();
void TexteMaillage( const std::string NomMesh, const std::string MeshFile, int apres );
void TexteMaillageHOMARD( const std::string Dir, const std::string liter, int apres );
void TexteConfRaffDera( int ConfType );
void TexteBoundaryOption( int BoundaryOption );
void TexteBoundaryCAOGr( const std::string GroupName );
void TexteBoundaryDi( const std::string MeshName, const std::string MeshFile );
void TexteBoundaryDiGr( const std::string GroupName );
void TexteBoundaryAn( const std::string NameBoundary, int NumeBoundary, int BoundaryType, double x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7 );
void TexteBoundaryAnGr( const std::string NameBoundary, int NumeBoundary, const std::string GroupName );
void TexteAdvanced( int NivMax, double DiamMin, int AdapInit, int LevelOutput );
void TexteInfoCompute( int MessInfo );
//
int ExecuteHomard();
public:
int _modeHOMARD;
std::string _HOMARD_Exec;
std::string _NomDir;
std::string _NomFichierConfBase;
std::string _NomFichierConf;
std::string _NomFichierDonn;
std::string _siter;
std::string _siterp1;
std::string _Texte;
bool _bLu;
};
class HOMARD_Iteration;
class SMESH_EXPORT HOMARD_Gen
{
public :
HOMARD_Gen();
~HOMARD_Gen();
};
class SMESH_EXPORT HOMARD_Iteration
{
public:
HOMARD_Iteration();
~HOMARD_Iteration();
// Generalites
void SetName( const char* Name );
std::string GetName() const;
// Caracteristiques
void SetDirNameLoc( const char* NomDir );
std::string GetDirNameLoc() const;
void SetNumber( int NumIter );
int GetNumber() const;
void SetState( int etat );
int GetState() const;
void SetMeshName( const char* NomMesh );
std::string GetMeshName() const;
void SetMeshFile( const char* MeshFile );
std::string GetMeshFile() const;
void SetLogFile( const char* LogFile );
std::string GetLogFile() const;
void SetFileInfo( const char* FileInfo );
std::string GetFileInfo() const;
// Divers
void SetInfoCompute( int MessInfo );
int GetInfoCompute() const;
private:
std::string _Name;
int _Etat;
int _NumIter;
std::string _NomMesh;
std::string _MeshFile;
std::string _LogFile;
std::string _NomDir;
std::string _FileInfo;
int _MessInfo;
};
}; // namespace SMESHHOMARDImpl
#endif

View File

@ -150,6 +150,9 @@ SET(_moc_HEADERS
SMESHGUI_PreVisualObj.h SMESHGUI_PreVisualObj.h
SMESHGUI_MG_ADAPTDRIVER.h SMESHGUI_MG_ADAPTDRIVER.h
SMESHGUI_MgAdaptDlg.h SMESHGUI_MgAdaptDlg.h
SMESHGUI_HomardAdaptDlg.h
SMESHGUI_HomardBoundaryDlg.h
SMESHGUI_HomardListGroup.h
) )
# header files / no moc processing # header files / no moc processing
@ -172,6 +175,7 @@ SET(_other_HEADERS
SMESHGUI_FileValidator.h SMESHGUI_FileValidator.h
SMESHGUI_SelectionProxy.h SMESHGUI_SelectionProxy.h
SMESH_SMESHGUI.hxx SMESH_SMESHGUI.hxx
SMESHGUI_HomardUtils.h
) )
# header files / to install # header files / to install
@ -267,6 +271,10 @@ SET(_other_SOURCES
SMESHGUI_IdPreview.cxx SMESHGUI_IdPreview.cxx
SMESHGUI_MG_ADAPTDRIVER.cxx SMESHGUI_MG_ADAPTDRIVER.cxx
SMESHGUI_MgAdaptDlg.cxx SMESHGUI_MgAdaptDlg.cxx
SMESHGUI_HomardUtils.cxx
SMESHGUI_HomardAdaptDlg.cxx
SMESHGUI_HomardBoundaryDlg.cxx
SMESHGUI_HomardListGroup.cxx
) )
# sources / to compile # sources / to compile
@ -280,6 +288,9 @@ SET(_ts_RESOURCES
SMESH_msg_en.ts SMESH_msg_en.ts
SMESH_msg_fr.ts SMESH_msg_fr.ts
SMESH_msg_ja.ts SMESH_msg_ja.ts
SMESHGUI_Homard_msg_en.ts
SMESHGUI_Homard_msg_fr.ts
SMESHGUI_Homard_msg_ja.ts
) )
# --- rules --- # --- rules ---

View File

@ -61,6 +61,7 @@
#include "SMESHGUI_Hypotheses.h" #include "SMESHGUI_Hypotheses.h"
#include "SMESHGUI_HypothesesUtils.h" #include "SMESHGUI_HypothesesUtils.h"
#include "SMESHGUI_MG_ADAPTDRIVER.h" #include "SMESHGUI_MG_ADAPTDRIVER.h"
#include "SMESHGUI_HomardAdaptDlg.h"
#include "SMESHGUI_Make2DFrom3DOp.h" #include "SMESHGUI_Make2DFrom3DOp.h"
#include "SMESHGUI_MakeNodeAtPointDlg.h" #include "SMESHGUI_MakeNodeAtPointDlg.h"
#include "SMESHGUI_Measurements.h" #include "SMESHGUI_Measurements.h"
@ -145,6 +146,7 @@
#include CORBA_CLIENT_HEADER(SMESH_MeshEditor) #include CORBA_CLIENT_HEADER(SMESH_MeshEditor)
#include CORBA_CLIENT_HEADER(SMESH_Measurements) #include CORBA_CLIENT_HEADER(SMESH_Measurements)
#include CORBA_CLIENT_HEADER(SMESH_Mesh) #include CORBA_CLIENT_HEADER(SMESH_Mesh)
#include CORBA_CLIENT_HEADER(SMESH_Homard)
// Qt includes // Qt includes
// #define INCLUDE_MENUITEM_DEF // VSR commented ???????? // #define INCLUDE_MENUITEM_DEF // VSR commented ????????
@ -3028,6 +3030,27 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
break; break;
} }
#endif #endif
case SMESHOp::OpHomardAdapt:
{
if ( isStudyLocked() )
break;
EmitSignalDeactivateDialog();
SALOME::GenericObj_wrap< SMESHHOMARD::HOMARD_Gen > homardGen;
try {
homardGen = GetSMESHGen()->CreateHOMARD_ADAPT();
}
catch ( const SALOME::SALOME_Exception& S_ex ) {
SUIT_MessageBox::critical(SMESHGUI::desktop(),
QObject::tr("SMESH_ERROR"),
QObject::tr(S_ex.details.text.in()));
}
if (!homardGen->_is_nil()) {
SMESHGUI_HomardAdaptDlg *aDlg = new SMESHGUI_HomardAdaptDlg(homardGen);
aDlg->show();
}
break;
}
// Adaptation - end // Adaptation - end
case SMESHOp::OpSplitBiQuadratic: case SMESHOp::OpSplitBiQuadratic:
case SMESHOp::OpConvertMeshToQuadratic: case SMESHOp::OpConvertMeshToQuadratic:
@ -4266,6 +4289,7 @@ void SMESHGUI::initialize( CAM_Application* app )
#ifndef DISABLE_MG_ADAPT #ifndef DISABLE_MG_ADAPT
createSMESHAction( SMESHOp::OpMGAdapt, "MG_ADAPT", "ICON_MG_ADAPT" ); createSMESHAction( SMESHOp::OpMGAdapt, "MG_ADAPT", "ICON_MG_ADAPT" );
#endif #endif
createSMESHAction( SMESHOp::OpHomardAdapt, "HOMARD_ADAPT", "ICON_HOMARD_ADAPT" );
// Adaptation - end // Adaptation - end
createSMESHAction( SMESHOp::OpMinimumDistance, "MEASURE_MIN_DIST", "ICON_MEASURE_MIN_DIST" ); createSMESHAction( SMESHOp::OpMinimumDistance, "MEASURE_MIN_DIST", "ICON_MEASURE_MIN_DIST" );
@ -4486,6 +4510,7 @@ void SMESHGUI::initialize( CAM_Application* app )
#ifndef DISABLE_MG_ADAPT #ifndef DISABLE_MG_ADAPT
createMenu( SMESHOp::OpMGAdapt, adaptId, -1 ); createMenu( SMESHOp::OpMGAdapt, adaptId, -1 );
#endif #endif
createMenu( SMESHOp::OpHomardAdapt, adaptId, -1 );
// Adaptation - end // Adaptation - end
createMenu( SMESHOp::OpMinimumDistance, measureId, -1 ); createMenu( SMESHOp::OpMinimumDistance, measureId, -1 );
@ -4636,6 +4661,7 @@ void SMESHGUI::initialize( CAM_Application* app )
int adaptTb = createTool( tr( "TB_ADAPTATION" ), QString( "SMESHAdaptationToolbar" ) ) ; int adaptTb = createTool( tr( "TB_ADAPTATION" ), QString( "SMESHAdaptationToolbar" ) ) ;
createTool( SMESHOp::OpMGAdapt, adaptTb ); createTool( SMESHOp::OpMGAdapt, adaptTb );
#endif #endif
createTool( SMESHOp::OpHomardAdapt, adaptTb );
// Adaptation - end // Adaptation - end
int measuremTb = createTool( tr( "TB_MEASUREM" ), QString( "SMESHMeasurementsToolbar" ) ) ; int measuremTb = createTool( tr( "TB_MEASUREM" ), QString( "SMESHMeasurementsToolbar" ) ) ;
@ -4719,11 +4745,12 @@ void SMESHGUI::initialize( CAM_Application* app )
createPopupItem( SMESHOp::OpCreateBoundaryElements, OB, mesh_group, "&& selcount=1 && dim>=2"); createPopupItem( SMESHOp::OpCreateBoundaryElements, OB, mesh_group, "&& selcount=1 && dim>=2");
// Adaptation - begin // Adaptation - begin
popupMgr()->insert( separator(), -1, 0 );
#ifndef DISABLE_MG_ADAPT #ifndef DISABLE_MG_ADAPT
popupMgr()->insert( separator(), -1, 0 );
createPopupItem( SMESHOp::OpMGAdapt, OB, mesh ); createPopupItem( SMESHOp::OpMGAdapt, OB, mesh );
popupMgr()->insert( separator(), -1, 0 );
#endif #endif
createPopupItem( SMESHOp::OpHomardAdapt, OB, mesh );
popupMgr()->insert( separator(), -1, 0 );
// Adaptation - end // Adaptation - end
QString only_one_non_empty = QString( " && %1=1 && numberOfNodes>0" ).arg( dc ); QString only_one_non_empty = QString( " && %1=1 && numberOfNodes>0" ).arg( dc );

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,233 @@
// Copyright (C) 2011-2021 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef SMESHGUI_HOMARDADAPTDLG_HXX
#define SMESHGUI_HOMARDADAPTDLG_HXX
#include "SMESH_SMESHGUI.hxx"
#include <SALOMEconfig.h>
#include CORBA_CLIENT_HEADER(SMESH_Homard)
#include CORBA_SERVER_HEADER(SMESH_Mesh)
#include <SALOME_GenericObj_wrap.hxx>
#include <SalomeApp_Module.h>
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QFormLayout>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QRadioButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QTableWidget>
#include <QtWidgets/QWidget>
#include <QtWidgets/QTabWidget>
#include <QtWidgets/QSpinBox>
class SMESHGUI_HomardAdaptArguments;
class SMESHGUI_HomardAdaptAdvanced;
//=================================================================================
// class : SMESHGUI_HomardAdaptDlg
// purpose :
//=================================================================================
class SMESHGUI_EXPORT SMESHGUI_HomardAdaptDlg : public QDialog
{
Q_OBJECT
public:
SMESHGUI_HomardAdaptDlg(SMESHHOMARD::HOMARD_Gen_ptr theHomardGen);
~SMESHGUI_HomardAdaptDlg();
void AddBoundaryCAO(QString newBoundary);
void AddBoundaryAn(QString newBoundary);
void AddBoundaryDi(QString newBoundary);
protected:
QString myWorkingDir;
SMESHHOMARD::HOMARD_Cas_var myCase;
SALOME::GenericObj_wrap< SMESHHOMARD::HOMARD_Gen > myHomardGen;
virtual void InitConnect();
virtual void InitBoundarys();
public slots:
virtual void SetFileName();
virtual void SetBoundaryNo();
virtual void SetBoundaryCAO();
virtual void SetBoundaryNonCAO();
virtual void PushBoundaryCAONew();
virtual void PushBoundaryCAOEdit();
virtual void PushBoundaryCAOHelp();
virtual void SetBoundaryD();
virtual void PushBoundaryDiNew();
virtual void PushBoundaryDiEdit();
virtual void PushBoundaryDiHelp();
virtual void SetBoundaryA();
virtual void PushBoundaryAnNew();
virtual void PushBoundaryAnEdit();
virtual void PushBoundaryAnHelp();
bool CheckCase(bool fixCase);
virtual void PushOnOK();
virtual bool PushOnApply();
virtual void PushOnHelp();
void selectionChanged();
void updateSelection();
private:
SMESHGUI_HomardAdaptArguments* myArgs;
SMESHGUI_HomardAdaptAdvanced* myAdvOpt;
SMESH::SMESH_Mesh_var myMesh;
QPushButton *buttonHelp;
QPushButton *buttonApply;
QPushButton *buttonOk;
QPushButton *buttonCancel;
};
//=================================================================================
// class : SMESHGUI_HomardAdaptArguments
// purpose :
//=================================================================================
class SMESHGUI_HomardAdaptArguments : public QWidget
{
Q_OBJECT
public:
enum ModeIn { MedFile, Browser };
SMESHGUI_HomardAdaptArguments (QWidget* parent);
~SMESHGUI_HomardAdaptArguments();
void setupUi();
public:
// Mesh In
QButtonGroup* myInMeshGroup;
QRadioButton* myInMedFileRadio;
QRadioButton* myInBrowserRadio;
QPushButton* mySelectInMedFileButton;
QLineEdit* mySelectInMedFileLineEdit; // LEFileName
QLineEdit* myInBrowserObject;
// Mesh Out
QLineEdit* myOutMeshNameLineEdit;
QCheckBox* myOutMedFileChk;
QPushButton* mySelectOutMedFileButton;
QLineEdit* mySelectOutMedFileLineEdit;
QCheckBox* myOutPublishChk;
// Conformity type
QRadioButton *RBConforme;
QRadioButton *RBNonConforme;
// Boundary type
QGroupBox *GBTypeBoun;
QRadioButton *RBBoundaryNo;
QRadioButton *RBBoundaryCAO;
QRadioButton *RBBoundaryNonCAO;
QHBoxLayout *hboxLayout3;
QCheckBox *CBBoundaryD;
QCheckBox *CBBoundaryA;
QGroupBox *GBBoundaryC; // CAO boundary
QPushButton *PBBoundaryCAOEdit;
QPushButton *PBBoundaryCAOHelp;
QComboBox *CBBoundaryCAO;
QPushButton *PBBoundaryCAONew;
QGroupBox *GBBoundaryN; // Non CAO boundary
QGroupBox *GBBoundaryD;
QComboBox *CBBoundaryDi;
QPushButton *PBBoundaryDiEdit;
QPushButton *PBBoundaryDiHelp;
QPushButton *PBBoundaryDiNew;
QGroupBox *GBBoundaryA;
QFormLayout *formLayout;
QTableWidget *TWBoundary;
QPushButton *PBBoundaryAnEdit;
QPushButton *PBBoundaryAnNew;
QPushButton *PBBoundaryAnHelp;
signals:
void updateSelection();
private slots:
void modeInChanged(int);
void clear();
void onOutMedFileChk(int);
void onOutPublishChk(int);
void onSelectOutMedFileButton();
};
//=================================================================================
// class : SMESHGUI_HomardAdaptAdvanced
// purpose :
//=================================================================================
class SMESHGUI_HomardAdaptAdvanced : public QWidget
{
Q_OBJECT
public:
SMESHGUI_HomardAdaptAdvanced(QWidget* = 0);
~SMESHGUI_HomardAdaptAdvanced();
void setupWidget();
public:
QGroupBox *logGroupBox;
QLabel *workingDirectoryLabel;
QLineEdit *workingDirectoryLineEdit;
QPushButton *workingDirectoryPushButton;
QLabel *verboseLevelLabel;
QSpinBox *verboseLevelSpin;
QCheckBox *logInFileCheck;
QCheckBox *removeLogOnSuccessCheck;
QCheckBox *keepWorkingFilesCheck;
private slots:
void onWorkingDirectoryPushButton();
};
#endif // SMESHGUI_HOMARDADAPTDLG_HXX

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,326 @@
// Copyright (C) 2011-2021 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "SMESHGUI_HomardListGroup.h"
#include "SMESHGUI_HomardBoundaryDlg.h"
#include "SMESHGUI_HomardUtils.h"
#include "SMESHGUI_Utils.h"
#include "SalomeApp_Tools.h"
#include <SUIT_Desktop.h>
#include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h>
#include <SUIT_Session.h>
#include <SUIT_ViewManager.h>
#include <utilities.h>
#include <QFileDialog>
using namespace std;
// ------------------------------------------------------------------------------------
SMESH_CreateListGroupCAO::SMESH_CreateListGroupCAO(SMESH_CreateBoundaryCAO* parentBound,
bool modal,
SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
QString aCaseName,
QStringList listeGroupesHypo)
: QDialog(0), SMESH_Ui_CreateListGroup(),
_aCaseName (aCaseName),
_listeGroupesHypo (listeGroupesHypo),
_parentBound(parentBound)
{
MESSAGE("Debut de SMESH_CreateListGroupCAO");
myHomardGen = SMESHHOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
setupUi(this);
setModal(modal);
InitConnect();
InitGroupes();
}
// ------------------------------------------------------------------------------------
SMESH_CreateListGroupCAO::SMESH_CreateListGroupCAO(SMESH_CreateBoundaryCAO* parentBound,
SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
QString aCaseName,
QStringList listeGroupesHypo)
: QDialog(0), SMESH_Ui_CreateListGroup(),
_aCaseName (aCaseName),
_listeGroupesHypo (listeGroupesHypo),
_parentBound(parentBound)
{
myHomardGen = SMESHHOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
setupUi(this);
InitConnect();
}
// ------------------------------------------------------------------------
SMESH_CreateListGroupCAO::~SMESH_CreateListGroupCAO()
// ------------------------------------------------------------------------
{
// no need to delete child widgets, Qt does it all for us
}
// ------------------------------------------------------------------------
void SMESH_CreateListGroupCAO::InitConnect()
// ------------------------------------------------------------------------
{
connect( buttonOk, SIGNAL( pressed() ), this, SLOT( PushOnOK() ) );
connect( buttonApply, SIGNAL( pressed() ), this, SLOT( PushOnApply() ) );
connect( buttonCancel, SIGNAL( pressed() ), this, SLOT( close() ) );
connect( buttonHelp, SIGNAL( pressed() ), this, SLOT( PushOnHelp() ) );
}
// ------------------------------------------------------------------------
bool SMESH_CreateListGroupCAO::PushOnApply()
// ------------------------------------------------------------------------
// Appele lorsque l'un des boutons Ok ou Apply est presse
//
{
QStringList ListeGroup ;
for ( int row=0; row< TWGroupe->rowCount(); row++)
{
if ( TWGroupe->item( row, 0 )->checkState() == Qt::Checked )
ListeGroup.insert(0, QString(TWGroupe->item(row, 1)->text()) );
}
if ( _parentBound ) { _parentBound->setGroups(ListeGroup);};
return true;
}
// ------------------------------------------------------------------------
void SMESH_CreateListGroupCAO::PushOnOK()
// ------------------------------------------------------------------------
{
if (PushOnApply()) this->close();
if ( _parentBound ) { _parentBound->raise(); _parentBound->activateWindow(); };
}
// ------------------------------------------------------------------------
void SMESH_CreateListGroupCAO::PushOnHelp()
// ------------------------------------------------------------------------
{
SMESH::ShowHelpFile(QString("homard_create_boundary.html#filtering-by-the-groups"));
}
// ------------------------------------------------------------------------
void SMESH_CreateListGroupCAO::InitGroupes()
// ------------------------------------------------------------------------
{
MESSAGE("Debut de SMESH_CreateListGroupCAO::InitGroupes ");
for ( int row=0; row< TWGroupe->rowCount(); row++)
TWGroupe->removeRow(row);
TWGroupe->setRowCount(0);
if (_aCaseName == QString("")) { return; };
SMESHHOMARD::HOMARD_Cas_var monCas = myHomardGen->GetCase();
SMESHHOMARD::ListGroupType_var _listeGroupesCas = monCas->GetGroups();
for ( int i = 0; i < _listeGroupesCas->length(); i++ ) {
TWGroupe->insertRow(i);
TWGroupe->setItem( i, 0, new QTableWidgetItem( QString ("") ) );
TWGroupe->item( i, 0 )->setFlags( 0 );
TWGroupe->item( i, 0 )->setFlags( Qt::ItemIsUserCheckable|Qt::ItemIsEnabled );
if (_listeGroupesHypo.contains (QString((_listeGroupesCas)[i])))
{TWGroupe->item( i, 0 )->setCheckState( Qt::Checked );}
else
{TWGroupe->item( i, 0 )->setCheckState( Qt::Unchecked );}
TWGroupe->setItem( i, 1, new QTableWidgetItem(QString((_listeGroupesCas)[i]).trimmed()));
TWGroupe->item( i, 1 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable );
}
TWGroupe->resizeColumnsToContents();
TWGroupe->resizeRowsToContents();
TWGroupe->clearSelection();
// MESSAGE("Fin de SMESH_CreateListGroupCAO::InitGroupes ");
}
// ------------------------------------------------------------------------
SMESH_CreateListGroup::SMESH_CreateListGroup(SMESH_CreateBoundaryDi* parentBound, bool modal,
SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
QString aCaseName, QStringList listeGroupesHypo)
: QDialog(0), SMESH_Ui_CreateListGroup(),
_aCaseName (aCaseName),
_listeGroupesHypo (listeGroupesHypo),
_parentBound(parentBound)
{
MESSAGE("Debut de SMESH_CreateListGroup");
myHomardGen = SMESHHOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
setupUi(this);
setModal(modal);
InitConnect();
InitGroupes();
}
// ------------------------------------------------------------------------
SMESH_CreateListGroup::SMESH_CreateListGroup(SMESH_CreateBoundaryDi* parentBound,
SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
QString aCaseName, QStringList listeGroupesHypo)
: QDialog(0), SMESH_Ui_CreateListGroup(),
_aCaseName (aCaseName),
_listeGroupesHypo (listeGroupesHypo),
_parentBound(parentBound)
{
myHomardGen = SMESHHOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
setupUi(this);
InitConnect();
}
// ------------------------------------------------------------------------
SMESH_CreateListGroup::~SMESH_CreateListGroup()
{
// no need to delete child widgets, Qt does it all for us
}
// ------------------------------------------------------------------------
void SMESH_CreateListGroup::InitConnect()
// ------------------------------------------------------------------------
{
connect( buttonOk, SIGNAL( pressed() ), this, SLOT( PushOnOK() ) );
connect( buttonApply, SIGNAL( pressed() ), this, SLOT( PushOnApply() ) );
connect( buttonCancel, SIGNAL( pressed() ), this, SLOT( close() ) );
connect( buttonHelp, SIGNAL( pressed() ), this, SLOT( PushOnHelp() ) );
}
// ------------------------------------------------------------------------
bool SMESH_CreateListGroup::PushOnApply()
// ------------------------------------------------------------------------
// Appele lorsque l'un des boutons Ok ou Apply est presse
//
{
QStringList ListeGroup ;
for ( int row=0; row< TWGroupe->rowCount(); row++)
{
if ( TWGroupe->item( row, 0 )->checkState() == Qt::Checked )
ListeGroup.insert(0, QString(TWGroupe->item(row, 1)->text()) );
}
if ( _parentBound ) { _parentBound->setGroups(ListeGroup);};
return true;
}
// ------------------------------------------------------------------------
void SMESH_CreateListGroup::PushOnOK()
// ------------------------------------------------------------------------
{
if (PushOnApply())
{
this->close();
if ( _parentBound ) { _parentBound->raise(); _parentBound->activateWindow(); };
}
}
// ------------------------------------------------------------------------
void SMESH_CreateListGroup::PushOnHelp()
// ------------------------------------------------------------------------
{
SMESH::ShowHelpFile(QString("homard_create_boundary.html#filtering-by-the-groups"));
}
// ------------------------------------------------------------------------
void SMESH_CreateListGroup::InitGroupes()
// ------------------------------------------------------------------------
{
MESSAGE("Debut de SMESH_CreateListGroup::InitGroupes ");
for ( int row=0; row< TWGroupe->rowCount(); row++)
TWGroupe->removeRow(row);
TWGroupe->setRowCount(0);
if (_aCaseName == QString("")) { return; };
SMESHHOMARD::HOMARD_Cas_var monCas = myHomardGen->GetCase();
SMESHHOMARD::ListGroupType_var _listeGroupesCas = monCas->GetGroups();
for ( int i = 0; i < _listeGroupesCas->length(); i++ )
{
TWGroupe->insertRow(i);
TWGroupe->setItem( i, 0, new QTableWidgetItem( QString ("") ) );
TWGroupe->item( i, 0 )->setFlags( 0 );
TWGroupe->item( i, 0 )->setFlags( Qt::ItemIsUserCheckable|Qt::ItemIsEnabled );
if (_listeGroupesHypo.contains (QString((_listeGroupesCas)[i])))
{TWGroupe->item( i, 0 )->setCheckState( Qt::Checked );}
else
{TWGroupe->item( i, 0 )->setCheckState( Qt::Unchecked );}
TWGroupe->setItem( i, 1, new QTableWidgetItem(QString((_listeGroupesCas)[i]).trimmed()));
TWGroupe->item( i, 1 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable );
}
TWGroupe->resizeColumnsToContents();
TWGroupe->resizeRowsToContents();
TWGroupe->clearSelection();
// MESSAGE("Fin de SMESH_CreateListGroup::InitGroupes ");
}
//---------------------------------------------------------------------
SMESH_EditListGroupCAO::SMESH_EditListGroupCAO( SMESH_CreateBoundaryCAO* parentBound,
bool modal,
SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
QString aCaseName,
QStringList listeGroupesHypo):
//---------------------------------------------------------------------
SMESH_CreateListGroupCAO(parentBound,myHomardGen0,aCaseName,listeGroupesHypo)
{
MESSAGE("Debut de SMESH_EditListGroupCAO");
setWindowTitle(QObject::tr("HOM_GROU_EDIT_WINDOW_TITLE"));
setModal(true);
InitGroupes();
}
//------------------------------------
SMESH_EditListGroupCAO:: ~SMESH_EditListGroupCAO()
//------------------------------------
{
}
// -------------------------------------
void SMESH_EditListGroupCAO:: InitGroupes()
// -------------------------------------
{
for (int i = 0; i < _listeGroupesHypo.size(); i++ )
{
std::cerr << _listeGroupesHypo[i].toStdString().c_str() << std::endl;
TWGroupe->insertRow(i);
TWGroupe->setItem( i, 0, new QTableWidgetItem( QString ("") ) );
TWGroupe->item( i, 0 )->setFlags( 0 );
TWGroupe->item( i, 0 )->setCheckState( Qt::Checked );
TWGroupe->setItem( i, 1, new QTableWidgetItem(_listeGroupesHypo[i]));
}
TWGroupe->resizeRowsToContents();
}
//---------------------------------------------------------------------
SMESH_EditListGroup::SMESH_EditListGroup( SMESH_CreateBoundaryDi* parentBound,
bool modal,
SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
QString aCaseName,
QStringList listeGroupesHypo):
//---------------------------------------------------------------------
SMESH_CreateListGroup(parentBound,myHomardGen0,aCaseName,listeGroupesHypo)
{
MESSAGE("Debut de SMESH_EditListGroup");
setWindowTitle(QObject::tr("HOM_GROU_EDIT_WINDOW_TITLE"));
setModal(true);
InitGroupes();
}
//------------------------------------
SMESH_EditListGroup::~SMESH_EditListGroup()
//------------------------------------
{
}
// -------------------------------------
void SMESH_EditListGroup::InitGroupes()
// -------------------------------------
{
for (int i = 0; i < _listeGroupesHypo.size(); i++ )
{
std::cerr << _listeGroupesHypo[i].toStdString().c_str() << std::endl;
TWGroupe->insertRow(i);
TWGroupe->setItem( i, 0, new QTableWidgetItem( QString ("") ) );
TWGroupe->item( i, 0 )->setFlags( 0 );
TWGroupe->item( i, 0 )->setCheckState( Qt::Checked );
TWGroupe->setItem( i, 1, new QTableWidgetItem(_listeGroupesHypo[i]));
}
TWGroupe->resizeRowsToContents();
}

View File

@ -0,0 +1,254 @@
// Copyright (C) 2011-2021 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef MON_CREATELISTGROUPCAO_H
#define MON_CREATELISTGROUPCAO_H
#include "SMESH_SMESHGUI.hxx"
#include <SALOMEconfig.h>
#include <SalomeApp_Module.h>
//#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
#include CORBA_CLIENT_HEADER(SMESH_Homard)
#include <QDialog>
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QTableWidget>
class SMESH_CreateBoundaryCAO;
class SMESH_CreateBoundaryDi;
QT_BEGIN_NAMESPACE
class SMESH_Ui_CreateListGroup
{
public:
QGridLayout *gridLayout;
QGroupBox *GBButtons;
QGridLayout *gridLayout1;
QPushButton *buttonHelp;
QPushButton *buttonCancel;
QPushButton *buttonApply;
QPushButton *buttonOk;
QGroupBox *GBOptions;
QGridLayout *gridLayout2;
QTableWidget *TWGroupe;
void setupUi(QDialog *CreateListGroup)
{
if (CreateListGroup->objectName().isEmpty())
CreateListGroup->setObjectName(QString::fromUtf8("CreateListGroup"));
CreateListGroup->resize(717, 600);
QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(0));
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(CreateListGroup->sizePolicy().hasHeightForWidth());
CreateListGroup->setSizePolicy(sizePolicy);
CreateListGroup->setAutoFillBackground(true);
CreateListGroup->setSizeGripEnabled(true);
gridLayout = new QGridLayout(CreateListGroup);
#ifndef Q_OS_MAC
gridLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
gridLayout->setContentsMargins(9, 9, 9, 9);
#endif
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
GBButtons = new QGroupBox(CreateListGroup);
GBButtons->setObjectName(QString::fromUtf8("GBButtons"));
gridLayout1 = new QGridLayout(GBButtons);
#ifndef Q_OS_MAC
gridLayout1->setSpacing(6);
#endif
#ifndef Q_OS_MAC
gridLayout1->setContentsMargins(9, 9, 9, 9);
#endif
gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
buttonHelp = new QPushButton(GBButtons);
buttonHelp->setObjectName(QString::fromUtf8("buttonHelp"));
gridLayout1->addWidget(buttonHelp, 0, 3, 1, 1);
buttonCancel = new QPushButton(GBButtons);
buttonCancel->setObjectName(QString::fromUtf8("buttonCancel"));
gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1);
buttonApply = new QPushButton(GBButtons);
buttonApply->setObjectName(QString::fromUtf8("buttonApply"));
gridLayout1->addWidget(buttonApply, 0, 1, 1, 1);
buttonOk = new QPushButton(GBButtons);
buttonOk->setObjectName(QString::fromUtf8("buttonOk"));
gridLayout1->addWidget(buttonOk, 0, 0, 1, 1);
gridLayout->addWidget(GBButtons, 1, 0, 1, 1);
GBOptions = new QGroupBox(CreateListGroup);
GBOptions->setObjectName(QString::fromUtf8("GBOptions"));
gridLayout2 = new QGridLayout(GBOptions);
#ifndef Q_OS_MAC
gridLayout2->setSpacing(6);
#endif
#ifndef Q_OS_MAC
gridLayout2->setContentsMargins(9, 9, 9, 9);
#endif
gridLayout2->setObjectName(QString::fromUtf8("gridLayout2"));
TWGroupe = new QTableWidget(GBOptions);
if (TWGroupe->columnCount() < 2)
TWGroupe->setColumnCount(2);
QTableWidgetItem *__qtablewidgetitem = new QTableWidgetItem();
TWGroupe->setHorizontalHeaderItem(0, __qtablewidgetitem);
QTableWidgetItem *__qtablewidgetitem1 = new QTableWidgetItem();
TWGroupe->setHorizontalHeaderItem(1, __qtablewidgetitem1);
TWGroupe->setObjectName(QString::fromUtf8("TWGroupe"));
TWGroupe->setShowGrid(true);
TWGroupe->setRowCount(0);
TWGroupe->setColumnCount(2);
gridLayout2->addWidget(TWGroupe, 0, 0, 1, 1);
gridLayout->addWidget(GBOptions, 0, 0, 1, 1);
retranslateUi(CreateListGroup);
QMetaObject::connectSlotsByName(CreateListGroup);
} // setupUi
void retranslateUi(QDialog *CreateListGroup)
{
CreateListGroup->setWindowTitle(QApplication::translate("CreateListGroup", "Selection of groups", nullptr));
GBButtons->setTitle(QString());
buttonHelp->setText(QApplication::translate("CreateListGroup", "Help", nullptr));
buttonCancel->setText(QApplication::translate("CreateListGroup", "Cancel", nullptr));
buttonApply->setText(QApplication::translate("CreateListGroup", "Apply", nullptr));
buttonOk->setText(QApplication::translate("CreateListGroup", "OK", nullptr));
GBOptions->setTitle(QApplication::translate("CreateListGroup", "Selected groups", nullptr));
QTableWidgetItem *___qtablewidgetitem = TWGroupe->horizontalHeaderItem(0);
___qtablewidgetitem->setText(QApplication::translate("CreateListGroup", "Selection", nullptr));
QTableWidgetItem *___qtablewidgetitem1 = TWGroupe->horizontalHeaderItem(1);
___qtablewidgetitem1->setText(QApplication::translate("CreateListGroup", "Group", nullptr));
} // retranslateUi
};
namespace Ui {
class CreateListGroup: public SMESH_Ui_CreateListGroup {};
} // namespace Ui
QT_END_NAMESPACE
class SMESHGUI_EXPORT SMESH_CreateListGroupCAO : public QDialog, public SMESH_Ui_CreateListGroup
{
Q_OBJECT
public:
SMESH_CreateListGroupCAO( SMESH_CreateBoundaryCAO* parentBound, bool modal, SMESHHOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo);
SMESH_CreateListGroupCAO( SMESH_CreateBoundaryCAO* parentBound, SMESHHOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo);
virtual ~SMESH_CreateListGroupCAO();
protected :
SMESHHOMARD::HOMARD_Gen_var myHomardGen;
SMESH_CreateBoundaryCAO * _parentBound;
QString _aCaseName;
QStringList _listeGroupesHypo;
virtual void InitConnect();
virtual void InitGroupes();
public slots:
virtual void PushOnOK();
virtual bool PushOnApply();
virtual void PushOnHelp();
};
class SMESHGUI_EXPORT SMESH_CreateListGroup : public QDialog, public SMESH_Ui_CreateListGroup
{
Q_OBJECT
public:
SMESH_CreateListGroup( SMESH_CreateBoundaryDi* parentBound, bool modal, SMESHHOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo);
SMESH_CreateListGroup( SMESH_CreateBoundaryDi* parentBound, SMESHHOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo);
virtual ~SMESH_CreateListGroup();
protected :
SMESHHOMARD::HOMARD_Gen_var myHomardGen;
SMESH_CreateBoundaryDi * _parentBound;
QString _aCaseName;
QStringList _listeGroupesHypo;
virtual void InitConnect();
virtual void InitGroupes();
public slots:
virtual void PushOnOK();
virtual bool PushOnApply();
virtual void PushOnHelp();
};
class SMESHGUI_EXPORT SMESH_EditListGroupCAO : public SMESH_CreateListGroupCAO
{
Q_OBJECT
public:
SMESH_EditListGroupCAO( SMESH_CreateBoundaryCAO* parentBound, bool modal, SMESHHOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo);
virtual ~SMESH_EditListGroupCAO();
protected :
virtual void InitGroupes();
};
class SMESHGUI_EXPORT SMESH_EditListGroup : public SMESH_CreateListGroup
{
Q_OBJECT
public:
SMESH_EditListGroup( SMESH_CreateBoundaryDi* parentBound, bool modal,
SMESHHOMARD::HOMARD_Gen_var myHomardGen,
QString aCaseName, QStringList listeGroupesHypo);
virtual ~SMESH_EditListGroup();
protected :
virtual void InitGroupes();
};
#endif // MON_CREATELISTGROUPCAO_H

View File

@ -0,0 +1,659 @@
// Copyright (C) 2011-2021 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "SMESHGUI_HomardUtils.h"
#include <utilities.h>
#include "OB_Browser.h"
#include "SUIT_Desktop.h"
#include "SUIT_Application.h"
#include "SUIT_Session.h"
#include "LightApp_SelectionMgr.h"
#include "SalomeApp_Application.h"
#include "SalomeApp_Module.h"
#include "SalomeApp_Study.h"
#include "SALOME_ListIO.hxx"
#include "SALOMEconfig.h"
#include <string>
#include <qmessagebox.h>
#include <qcombobox.h>
#include <qfiledialog.h>
#include <qstring.h>
#include <stdlib.h>
#include <qstringlist.h>
#include <sys/stat.h>
#ifndef WIN32
#include <dirent.h>
#include <unistd.h>
#endif
#include "SalomeApp_Tools.h"
#include <med.h>
SALOME_ListIO SMESH_HOMARD_UTILS::mySelected;
//================================================================
// Function : GetActiveStudy
// Returne un pointeur sur l'etude active
//================================================================
SUIT_Study* SMESH_HOMARD_UTILS::GetActiveStudy()
{
SUIT_Application* app = SUIT_Session::session()->activeApplication();
if (app)
return app->activeStudy();
else
return NULL;
}
//================================================================
// Function : getStudy
// Returne un pointeur sur l'etude active
//================================================================
_PTR(Study) SMESH_HOMARD_UTILS::getStudy()
{
static _PTR(Study) _study;
if(!_study)
_study = SalomeApp_Application::getStudy();
return _study;
}
//================================================================
// Function : updateObjBrowser
// Purpose : met a jour l arbre d 'etude pour Homard
//================================================================
void SMESH_HOMARD_UTILS::updateObjBrowser()
{
SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>(SUIT_Session::session()->activeApplication());
if (app) {
// Le nom identifiant doit etre la valeur du parametre
// name de la section HOMARD du fichier SalomeApp.xml
CAM_Module* module = app->module("Homard" );
SalomeApp_Module* appMod = dynamic_cast<SalomeApp_Module*>( module );
if ( appMod ) {
app->updateObjectBrowser();
appMod->updateObjBrowser( true );
}
else
MESSAGE( "--- SMESHHOMARD::updateObjBrowser: appMod = NULL");
}
}
//================================================================
// Function : selectedIO
// Return the list of selected SALOME_InteractiveObject's
//================================================================
const SALOME_ListIO& SMESH_HOMARD_UTILS::selectedIO()
{
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* > ( SUIT_Session::session()->activeApplication() );
LightApp_SelectionMgr* aSelectionMgr = app->selectionMgr();
if( aSelectionMgr )
{
aSelectionMgr->selectedObjects( mySelected );
for (SALOME_ListIteratorOfListIO it (mySelected); it.More(); it.Next())
SCRUTE(it.Value()->getEntry());
};
return mySelected;
}
//================================================================
// Function : IObjectCount
// Return the number of selected objects
//================================================================
int SMESH_HOMARD_UTILS::IObjectCount()
{
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
LightApp_SelectionMgr* aSelectionMgr = app->selectionMgr();
if( aSelectionMgr )
{
aSelectionMgr->selectedObjects( mySelected );
SCRUTE(mySelected.Extent());
return mySelected.Extent();
}
return 0;
}
//================================================================
// Function : firstIObject
// Purpose : Return the first selected object in the selected object list
//================================================================
Handle(SALOME_InteractiveObject) SMESH_HOMARD_UTILS::firstIObject()
{
const SALOME_ListIO& aList = selectedIO();
return aList.Extent() > 0 ? aList.First() : Handle(SALOME_InteractiveObject)();
}
//================================================================
// Function : lastIObject
// Return the last selected object in the selected object list
//================================================================
Handle(SALOME_InteractiveObject) SMESH_HOMARD_UTILS::lastIObject()
{
const SALOME_ListIO& aList = selectedIO();
return aList.Extent() > 0 ? aList.Last() : Handle(SALOME_InteractiveObject)();
}
//================================================================
// Retourne vrai si l'objet est du type voulu
// . Dans le cas d'un cas, d'une hypothese, d'une zone, on se contente
// d'une comparaison simple entre le type stocke et TypeObject.
// . Pour l'iteration, le type stocke en attribut est sous la forme
// "IterationHomard" + le nom de l'iteration precedente.
// Il faut donc regarder si la chaine commence par TypeObject.
// . Idem pour le fichier de messages : "Mess " + numero d'iteration
//
// On filtre ce genre de situation avec option :
// -1 : comparaison totale
// 0 : comparaison sur le debut de la chaine
//================================================================
bool SMESH_HOMARD_UTILS::isObject(_PTR(SObject) MonObj, QString TypeObject, int option)
{
// MESSAGE("isObject, TypeObject = "<<TypeObject.toStdString().c_str()<<", option = "<<option);
// Existence d'un attribut ?
_PTR(GenericAttribute) anAttr;
if ( !MonObj->FindAttribute(anAttr, "AttributeComment") ) return false;
// Quel type ?
_PTR(AttributeComment) aComment (anAttr);
QString Type = QString(aComment->Value().c_str());
// MESSAGE("Type = "<<Type.toStdString().c_str());
// Est-ce le bon ?
bool bOK = false ;
if ( option == 0 )
{
int position = Type.lastIndexOf(TypeObject);
// MESSAGE("position = "<<position);
if ( position == 0 ) { bOK = true ; }
}
else
{
if ( Type == TypeObject ) { bOK = true ; }
}
return bOK ;
}
//================================================================
// Retourne vrai si l'objet est une frontiere CAO
//================================================================
bool SMESH_HOMARD_UTILS::isBoundaryCAO(_PTR(SObject) MonObj)
{
return isObject( MonObj, QString("BoundaryCAOHomard"), -1 ) ;
}
//================================================================
// Retourne vrai si l'objet est une frontiere analytique
//================================================================
bool SMESH_HOMARD_UTILS::isBoundaryAn(_PTR(SObject) MonObj)
{
return isObject( MonObj, QString("BoundaryAnHomard"), -1 ) ;
}
//================================================================
// Retourne vrai si l'objet est une frontiere discrete
//================================================================
bool SMESH_HOMARD_UTILS::isBoundaryDi(_PTR(SObject) MonObj)
{
return isObject( MonObj, QString("BoundaryDiHomard"), -1 ) ;
}
//================================================================
// Retourne vrai si l'objet est un cas
//================================================================
bool SMESH_HOMARD_UTILS::isCase(_PTR(SObject) MonObj)
{
return isObject( MonObj, QString("CasHomard"), -1 ) ;
}
//================================================================
// Retourne vrai si l'objet est une Hypothese
//================================================================
bool SMESH_HOMARD_UTILS::isHypo(_PTR(SObject) MonObj)
{
return isObject( MonObj, QString("HypoHomard"), -1 ) ;
}
//================================================================
// Retourne vrai si l'objet est une iteration
//================================================================
bool SMESH_HOMARD_UTILS::isIter(_PTR(SObject) MonObj)
{
return isObject( MonObj, QString("IterationHomard"), 0 ) ;
}
//================================================================
// Retourne vrai si l'objet est un fichier de type TypeFile
//================================================================
bool SMESH_HOMARD_UTILS::isFileType(_PTR(SObject) MonObj, QString TypeFile)
{
return isObject( MonObj, TypeFile, 0 ) ;
}
// ============================================================================
QString SMESH_HOMARD_QT_COMMUN::SelectionArbreEtude(QString commentaire, int option )
// ============================================================================
// Retourne l'objet selectionne dans l'arbre d'etudes
// commentaire :
// . si le commentaire est une chaine vide, on ne tient pas compte du type de l'objet
// et on retourne le nom de cet objet
// . sinon :
// . si l'objet est du type defini par commentaire, retourne le nom de cet objet
// . sinon on retourne une QString("")
// option :
// . Si option = 0, ce n'est pas grave de ne rien trouver ; aucun message n'est emis
// . Si option = 1, ce n'est pas grave de ne rien trouver mais on emet un message
{
// MESSAGE("SelectionArbreEtude : commentaire = " << commentaire.toStdString().c_str() << " et option = " << option);
int nbSel = SMESH_HOMARD_UTILS::IObjectCount() ;
if ( nbSel == 0 )
{
if ( option == 1 )
{
QMessageBox::warning( 0, QObject::tr("HOM_WARNING"),
QObject::tr("HOM_SELECT_OBJECT_1") );
}
return QString("");
}
if ( nbSel > 1 )
{
QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
QObject::tr("HOM_SELECT_OBJECT_2") );
return QString("");
}
//
Handle(SALOME_InteractiveObject) aIO = SMESH_HOMARD_UTILS::firstIObject();
if ( aIO->hasEntry() )
{
// MESSAGE("aIO->getEntry() = " << aIO->getEntry());
_PTR(Study) aStudy = SMESH_HOMARD_UTILS::getStudy();
_PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) );
_PTR(GenericAttribute) anAttr;
if (aSO->FindAttribute(anAttr, "AttributeComment") )
{
if ( commentaire != "" )
{
_PTR(AttributeComment) attributComment = anAttr;
QString aComment= QString(attributComment->Value().data());
// MESSAGE("... aComment = " << aComment.toStdString().c_str());
int iaux = aComment.lastIndexOf(commentaire);
// MESSAGE("... iaux = " << iaux);
if ( iaux !=0 )
{
QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
QObject::tr("HOM_SELECT_OBJECT_3").arg(commentaire) );
return QString("");
}
}
if (aSO->FindAttribute(anAttr, "AttributeName") )
{
_PTR(AttributeName) attributName = anAttr;
QString aName= QString(attributName->Value().data());
return aName;
}
}
}
//
return QString("");
}
// =======================================================================
QString SMESH_HOMARD_QT_COMMUN::SelectionCasEtude()
// =======================================================================
{
QString aName = QString("");
int nbSel = SMESH_HOMARD_UTILS::IObjectCount() ;
if ( nbSel == 0 )
{
QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
QObject::tr("HOM_SELECT_OBJECT_1") );
return QString("");
}
if ( nbSel > 1 )
{
QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
QObject::tr("HOM_SELECT_OBJECT_2") );
return QString("");
}
Handle(SALOME_InteractiveObject) aIO = SMESH_HOMARD_UTILS::firstIObject();
if ( aIO->hasEntry() )
{
_PTR(Study) aStudy = SMESH_HOMARD_UTILS::getStudy();
_PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) );
_PTR(SObject) aSObjCas = aSO->GetFather();
_PTR(GenericAttribute) anAttr;
if (aSObjCas->FindAttribute(anAttr, "AttributeName") )
{
_PTR(AttributeName) attributName = anAttr;
aName= QString(attributName->Value().data());
}
return aName;
}
return QString("");
}
// =======================================================================
QString SMESH_HOMARD_QT_COMMUN::PushNomFichier(bool avertir, QString TypeFichier)
// =======================================================================
// Gestion les boutons qui permettent de
// 1) retourne le nom d'un fichier par une fenetre de dialogue si aucun
// objet est selectionne dans l arbre d etude
// 2) retourne le nom du fichier asocie a l objet
// selectionne dans l arbre d etude
{
// MESSAGE("PushNomFichier avec avertir "<<avertir<<" et TypeFichier = "<<TypeFichier.toStdString().c_str());
QString aFile = QString::null;
//
// A. Filtre
QString filtre ;
//
if ( TypeFichier == "med" ) { filtre = QString("Med") ; }
else if ( TypeFichier == "py" ) { filtre = QString("Python") ; }
else { filtre = TypeFichier ; }
//
if ( TypeFichier != "" ) { filtre += QString(" files (*.") + TypeFichier + QString(");;") ; }
//
filtre += QString("all (*) ") ;
//
// B. Selection
//int nbSel = SMESH_HOMARD_UTILS::IObjectCount() ;
int nbSel = 0;
// MESSAGE("nbSel ="<<nbSel);
// B.1. Rien n'est selectionne
if ( nbSel == 0 )
{
//aFile = QFileDialog::getOpenFileName(0, QObject::tr("HOM_SELECT_FILE_0"), QString(""), QString("Med files (*.med);;all (*) ") );
aFile = QFileDialog::getOpenFileName(0, QObject::tr("HOM_SELECT_FILE_0"), QString(""), filtre );
}
// B.2. Un objet est selectionne
else if (nbSel == 1)
{
Handle(SALOME_InteractiveObject) aIO = SMESH_HOMARD_UTILS::firstIObject();
if ( aIO->hasEntry() )
{
_PTR(Study) aStudy = SMESH_HOMARD_UTILS::getStudy();
_PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) );
_PTR(GenericAttribute) anAttr;
_PTR(AttributeFileType) aFileType;
_PTR(AttributeExternalFileDef) aFileName;
if (aSO) {
if (aSO->FindAttribute(anAttr, "AttributeFileType") ) {
aFileType=anAttr;
QString fileType=QString(aFileType->Value().data());
if ( fileType==QString("FICHIERMED")) {
if (aSO->FindAttribute(anAttr,"AttributeExternalFileDef")) {
aFileName=anAttr;
aFile= QString(aFileName->Value().data()); }
}
}
}
}
if ( aFile==QString::null )
{
if ( avertir ) {
QMessageBox::warning( 0, QObject::tr("HOM_WARNING"),
QObject::tr("HOM_SELECT_STUDY") );
}
aFile = QFileDialog::getOpenFileName(0, QObject::tr("HOM_SELECT_FILE_0"), QString(""), filtre );
}
}
// B.3. Bizarre
else
{
QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
QObject::tr("HOM_SELECT_FILE_2") );
}
return aFile;
}
// =======================================================================
med_idt SMESH_HOMARD_QT_COMMUN::OuvrirFichier(QString aFile)
// =======================================================================
// renvoie le medId associe au fichier Med apres ouverture
{
med_idt medIdt = MEDfileOpen(aFile.toStdString().c_str(),MED_ACC_RDONLY);
if (medIdt <0)
{
QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
QObject::tr("HOM_MED_FILE_1") );
}
return medIdt;
}
// ======================================================
QString SMESH_HOMARD_QT_COMMUN::LireNomMaillage(QString aFile)
// ========================================================
{
QString nomMaillage = "" ;
int erreur = 0 ;
med_idt medIdt ;
while ( erreur == 0 )
{
// Ouverture du fichier
medIdt = SMESH_HOMARD_QT_COMMUN::OuvrirFichier(aFile);
if ( medIdt < 0 )
{
erreur = 1 ;
break ;
}
med_int numberOfMeshes = MEDnMesh(medIdt) ;
if (numberOfMeshes == 0 )
{
QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
QObject::tr("HOM_MED_FILE_2") );
erreur = 2 ;
break ;
}
if (numberOfMeshes > 1 )
{
QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
QObject::tr("HOM_MED_FILE_3") );
erreur = 3 ;
break ;
}
nomMaillage = SMESH_HOMARD_QT_COMMUN::LireNomMaillage2(medIdt,1);
break ;
}
// Fermeture du fichier
if ( medIdt > 0 ) MEDfileClose(medIdt);
return nomMaillage;
}
// =======================================================================
QString SMESH_HOMARD_QT_COMMUN::LireNomMaillage2(med_idt medIdt ,int meshId)
// =======================================================================
{
QString NomMaillage=QString::null;
char meshname[MED_NAME_SIZE+1];
med_int spacedim,meshdim;
med_mesh_type meshtype;
char descriptionription[MED_COMMENT_SIZE+1];
char dtunit[MED_SNAME_SIZE+1];
med_sorting_type sortingtype;
med_int nstep;
med_axis_type axistype;
int naxis = MEDmeshnAxis(medIdt,1);
char *axisname=new char[naxis*MED_SNAME_SIZE+1];
char *axisunit=new char[naxis*MED_SNAME_SIZE+1];
med_err aRet = MEDmeshInfo(medIdt,
meshId,
meshname,
&spacedim,
&meshdim,
&meshtype,
descriptionription,
dtunit,
&sortingtype,
&nstep,
&axistype,
axisname,
axisunit);
if ( aRet < 0 ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), \
QObject::tr("HOM_MED_FILE_4") ); }
else { NomMaillage=QString(meshname); }
delete[] axisname ;
delete[] axisunit ;
return NomMaillage;
}
// =======================================================================
std::list<QString> SMESH_HOMARD_QT_COMMUN::GetListeChamps(QString aFile)
// =======================================================================
{
// Il faut voir si plusieurs maillages
MESSAGE("GetListeChamps");
std::list<QString> ListeChamp ;
med_err erreur = 0 ;
med_idt medIdt ;
while ( erreur == 0 )
{
// Ouverture du fichier
SCRUTE(aFile.toStdString());
medIdt = SMESH_HOMARD_QT_COMMUN::OuvrirFichier(aFile);
if ( medIdt < 0 )
{
erreur = 1 ;
break ;
}
// Lecture du nombre de champs
med_int ncha = MEDnField(medIdt) ;
if (ncha < 1 )
{
QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
QObject::tr("HOM_MED_FILE_5") );
erreur = 2 ;
break ;
}
// Lecture des caracteristiques des champs
for (int i=0; i< ncha; i++)
{
// Lecture du nombre de composantes
med_int ncomp = MEDfieldnComponent(medIdt,i+1);
// Lecture du type du champ, des noms des composantes et du nom de l'unite
char nomcha [MED_NAME_SIZE+1];
char meshname[MED_NAME_SIZE+1];
char * comp = (char*) malloc(ncomp*MED_SNAME_SIZE+1);
char * unit = (char*) malloc(ncomp*MED_SNAME_SIZE+1);
char dtunit[MED_SNAME_SIZE+1];
med_bool local;
med_field_type typcha;
med_int nbofcstp;
erreur = MEDfieldInfo(medIdt,i+1,nomcha,meshname,&local,&typcha,comp,unit,dtunit,&nbofcstp) ;
free(comp);
free(unit);
if ( erreur < 0 )
{
QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
QObject::tr("HOM_MED_FILE_6") );
break ;
}
ListeChamp.push_back(QString(nomcha));
}
break ;
}
// Fermeture du fichier
if ( medIdt > 0 ) MEDfileClose(medIdt);
return ListeChamp;
}
// ======================================================================================
std::list<QString> SMESH_HOMARD_QT_COMMUN::GetListeComposants(QString aFile, QString aChamp)
// ======================================================================================
{
MESSAGE ( "GetListeComposants pour le fichier " << aFile.toStdString().c_str());
MESSAGE ( "GetListeComposants pour le champ " << aChamp.toStdString().c_str());
std::list<QString> ListeComposants;
med_err erreur = 0 ;
med_idt medIdt ;
while ( erreur == 0 )
{
// Ouverture du fichier
SCRUTE(aFile.toStdString());
medIdt = SMESH_HOMARD_QT_COMMUN::OuvrirFichier(aFile);
if ( medIdt < 0 )
{
erreur = 1 ;
break ;
}
// Lecture du nombre de champs
med_int ncha = MEDnField(medIdt) ;
if (ncha < 1 )
{
QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
QObject::tr("HOM_MED_FILE_5") );
erreur = 2 ;
break ;
}
// Lecture des caracteristiques des champs
for (int i=0; i< ncha; i++)
{
// Lecture du nombre de composantes
med_int ncomp = MEDfieldnComponent(medIdt,i+1);
// Lecture du type du champ, des noms des composantes et du nom de l'unite
char nomcha [MED_NAME_SIZE+1];
char meshname[MED_NAME_SIZE+1];
char * comp = (char*) malloc(ncomp*MED_SNAME_SIZE+1);
char * unit = (char*) malloc(ncomp*MED_SNAME_SIZE+1);
char dtunit[MED_SNAME_SIZE+1];
med_bool local;
med_field_type typcha;
med_int nbofcstp;
erreur = MEDfieldInfo(medIdt,i+1,nomcha,meshname,&local,&typcha,comp,unit,dtunit,&nbofcstp) ;
free(unit);
if ( erreur < 0 )
{
free(comp);
QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
QObject::tr("HOM_MED_FILE_6") );
break ;
}
// Lecture des composantes si c'est le bon champ
if ( QString(nomcha) == aChamp )
{
for (int j = 0; j <ncomp; j++)
{
char cible[MED_SNAME_SIZE +1];
strncpy(cible,comp+j*MED_SNAME_SIZE,MED_SNAME_SIZE );
cible[MED_SNAME_SIZE ]='\0';
ListeComposants.push_back(QString(cible));
}
}
// Menage
free(comp);
// Sortie si c'est bon
if ( QString(nomcha) == aChamp ) { break ; }
}
break ;
}
// Fermeture du fichier
if ( medIdt > 0 ) MEDfileClose(medIdt);
return ListeComposants;
}

View File

@ -0,0 +1,112 @@
// Copyright (C) 2011-2021 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef SMESH_HOMARD_H_UTILS
#define SMESH_HOMARD_H_UTILS
#include "SMESH_SMESHGUI.hxx"
#include <SALOMEconfig.h>
#include <omniORB4/CORBA.h>
//#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
#include CORBA_CLIENT_HEADER(SMESH_Homard)
#include <SALOMEDSClient_definitions.hxx>
#include <SALOME_InteractiveObject.hxx>
#include <LightApp_DataOwner.h>
#include <SalomeApp_Application.h>
#include <SALOME_ListIO.hxx>
//#include <SALOME_Selection.h>
#include <SalomeApp_Module.h>
#include <med.h>
#include <qstring.h>
#include <vector>
#include <set>
class QString;
class QStringList;
class QComboBox;
class SUIT_ViewWindow;
class SUIT_Desktop;
class SUIT_Study;
class SUIT_ResourceMgr;
class CAM_Module;
class SALOMEDSClient_Study;
class SALOMEDSClient_SObject;
class SalomeApp_Study;
class SalomeApp_Module;
class LightApp_SelectionMgr;
namespace SMESH_HOMARD_UTILS {
SMESHGUI_EXPORT SUIT_Study* GetActiveStudy();
SMESHGUI_EXPORT _PTR(Study) getStudy();
SMESHGUI_EXPORT void updateObjBrowser();
// Function returns a list of SALOME_InteractiveObject's from
// selection manager in GUI
SMESHGUI_EXPORT const SALOME_ListIO& selectedIO();
// Function returns the number of selected objects
SMESHGUI_EXPORT int IObjectCount();
// Function returns the first selected object in the list
// of selected objects
SMESHGUI_EXPORT Handle(SALOME_InteractiveObject) firstIObject() ;
// Function returns the last selected object in the list
// of selected objects
SMESHGUI_EXPORT Handle(SALOME_InteractiveObject) lastIObject() ;
SMESHGUI_EXPORT bool isBoundaryCAO(_PTR(SObject) MonObj);
SMESHGUI_EXPORT bool isBoundaryAn(_PTR(SObject) MonObj);
SMESHGUI_EXPORT bool isBoundaryDi(_PTR(SObject) MonObj);
SMESHGUI_EXPORT bool isCase(_PTR(SObject) MonObj);
SMESHGUI_EXPORT bool isHypo(_PTR(SObject) MonObj);
SMESHGUI_EXPORT bool isIter(_PTR(SObject) MonObj);
SMESHGUI_EXPORT bool isFileType(_PTR(SObject) MonObj, QString TypeFile);
SMESHGUI_EXPORT bool isObject(_PTR(SObject) MonObj, QString TypeObject, int option );
extern SALOME_ListIO mySelected;
}
namespace SMESH_HOMARD_QT_COMMUN
{
SMESHGUI_EXPORT QString PushNomFichier(bool avertir, QString TypeFichier="");
SMESHGUI_EXPORT QString LireNomMaillage(QString aFile);
SMESHGUI_EXPORT QString LireNomMaillage2(med_idt Medidt,int MeshId);
SMESHGUI_EXPORT med_idt OuvrirFichier(QString aFile);
SMESHGUI_EXPORT std::list<QString> GetListeChamps(QString aFile);
SMESHGUI_EXPORT std::list<QString> GetListeComposants(QString aFile, QString aChamp);
SMESHGUI_EXPORT QString SelectionArbreEtude(QString commentaire, int grave );
SMESHGUI_EXPORT QString SelectionCasEtude();
};
#endif // ifndef SMESH_HOMARD_H_UTILS

View File

@ -0,0 +1,255 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="en_US">
<context>
<name>@default</name>
<message>
<source>ADAPT_WITH_HOMARD</source>
<translation>Adaptation with HOMARD</translation>
</message>
<message>
<source>HOM_WARNING</source>
<translation>Warning</translation>
</message>
<message>
<source>HOM_ERROR</source>
<translation>Error</translation>
</message>
<message>
<source>HOM_INACTIVE_BUTTON</source>
<translation>Inactive button</translation>
</message>
<message>
<source>HOM_SELECT_OBJECT_1</source>
<translation>Select an object.</translation>
</message>
<message>
<source>HOM_SELECT_OBJECT_2</source>
<translation>Select only one object.</translation>
</message>
<message>
<source>HOM_SELECT_OBJECT_3</source>
<translation>Select an object with type %1.</translation>
</message>
<message>
<source>HOM_SELECT_OBJECT_4</source>
<translation>The name of the object is already selected. Modify it or cancel.</translation>
</message>
<message>
<source>HOM_SELECT_FILE_0</source>
<translation>File selection</translation>
</message>
<message>
<source>HOM_SELECT_FILE_1</source>
<translation>Select a file.</translation>
</message>
<message>
<source>HOM_SELECT_FILE_2</source>
<translation>Select only one file.</translation>
</message>
<message>
<source>HOM_SELECT_FILE_3</source>
<translation>This file cannot be opened.</translation>
</message>
<message>
<source>HOM_SCRIPT_FILE</source>
<translation>A script file must be given.</translation>
</message>
<message>
<source>HOM_MED_FILE_1</source>
<translation>This MED file cannot be read.</translation>
</message>
<message>
<source>HOM_MED_FILE_2</source>
<translation>No mesh in this MED file.</translation>
</message>
<message>
<source>HOM_MED_FILE_3</source>
<translation>More than one mesh in this MED file.</translation>
</message>
<message>
<source>HOM_MED_FILE_4</source>
<translation>The mesh in this MED file cannot be read.</translation>
</message>
<message>
<source>HOM_SELECT_STUDY</source>
<translation>Select a study object with associated MED file \n or select a MED file.</translation>
</message>
<message>
<source>HOM_CASE_NAME</source>
<translation>The case must be named.</translation>
</message>
<message>
<source>HOM_CASE_DIRECTORY_1</source>
<translation>A directory for the case must be selected.</translation>
</message>
<message>
<source>HOM_CASE_DIRECTORY_2</source>
<translation>This directory is already used by the case </translation>
</message>
<message>
<source>HOM_CASE_DIRECTORY_3</source>
<translation>A valid directory for the case must be selected.</translation>
</message>
<message>
<source>HOM_CASE_DIRECTORY_4</source>
<translation>A directory for the computation must be selected.</translation>
</message>
<message>
<source>HOM_START_DIRECTORY_1</source>
<translation>A starting directory for the pursuit must be selected.</translation>
</message>
<message>
<source>HOM_START_DIRECTORY_3</source>
<translation>A valid directory for the pursuit must be selected.</translation>
</message>
<message>
<source>HOM_CASE_MESH</source>
<translation>The file of the initial mesh must be selected.</translation>
</message>
<message>
<source>HOM_CASE_GROUP</source>
<translation>The group &quot;%1&quot; cannot be given for more than 1 boundary.</translation>
</message>
<message>
<source>HOM_CASE_EDIT_WINDOW_TITLE</source>
<translation>Edition of a case</translation>
</message>
<message>
<source>HOM_CASE_EDIT_STATE_0</source>
<translation>Initial mesh.</translation>
</message>
<message>
<source>HOM_CASE_EDIT_STATE</source>
<translation>Pursuit of an iteration.</translation>
</message>
<message>
<source>HOM_CASE_PURSUE_WINDOW_TITLE</source>
<translation>Case: pursuit of a stored iteration</translation>
</message>
<message>
<source>HOM_ITER_NAME</source>
<translation>The iteration must be named.</translation>
</message>
<message>
<source>HOM_ITER_STARTING_POINT</source>
<translation>The previous iteration must be given.</translation>
</message>
<message>
<source>HOM_ITER_MESH</source>
<translation>Give a name for the final mesh.</translation>
</message>
<message>
<source>HOM_ITER_HYPO</source>
<translation>A hypothesis must be selected.</translation>
</message>
<message>
<source>HOM_ITER_STARTING_POINT_0</source>
<translation>Mesh</translation>
</message>
<message>
<source>HOM_ITER_STARTING_POINT_1</source>
<translation>First iteration of the case.</translation>
</message>
<message>
<source>HOM_ITER_STARTING_POINT_2</source>
<translation>First iteration of the case for the pursuit.</translation>
</message>
<message>
<source>HOM_ITER_EDIT_WINDOW_TITLE</source>
<translation>Edition of an iteration</translation>
</message>
<message>
<source>HOM_HYPO_NAME</source>
<translation>The hypothesis must be named.</translation>
</message>
<message>
<source>HOM_HYPO_NORM_L2</source>
<translation>L2 norm</translation>
</message>
<message>
<source>HOM_HYPO_NORM_INF</source>
<translation>Infinite norm</translation>
</message>
<message>
<source>HOM_HYPO_NORM_ABS</source>
<translation>Absolute</translation>
</message>
<message>
<source>HOM_HYPO_NORM_REL</source>
<translation>Relative</translation>
</message>
<message>
<source>HOM_HYPO_COMP</source>
<translation>At least, one component must be selected.</translation>
</message>
<message>
<source>HOM_HYPO_EDIT_WINDOW_TITLE</source>
<translation>Edition of a hypothesis</translation>
</message>
<message>
<source>HOM_BOUN_NAME</source>
<translation>The boundary must be named.</translation>
</message>
<message>
<source>HOM_BOUN_MESH</source>
<translation>The file for the mesh of the boundary must be selected.</translation>
</message>
<message>
<source>HOM_BOUN_CAO</source>
<translation>The file for the CAO must be selected.</translation>
</message>
<message>
<source>HOM_BOUN_CASE</source>
<translation>The meshfile of the case is unknown.</translation>
</message>
<message>
<source>HOM_AXE</source>
<translation>The axis must be a non 0 vector.</translation>
</message>
<message>
<source>HOM_BOUN_C_EDIT_WINDOW_TITLE</source>
<translation>Edition of a CAO based boundary</translation>
</message>
<message>
<source>HOM_BOUN_A_EDIT_WINDOW_TITLE</source>
<translation>Edition of an analytical boundary</translation>
</message>
<message>
<source>HOM_BOUN_D_EDIT_WINDOW_TITLE</source>
<translation>Edition of a discrete boundary</translation>
</message>
<message>
<source>HOM_GROU_EDIT_WINDOW_TITLE</source>
<translation>Selected groups</translation>
</message>
<message>
<source>HOM_MESH_INFO_0</source>
<translation>Mesh analysis</translation>
</message>
<message>
<source>HOM_MESH_INFO_1</source>
<translation>Select at least one option.</translation>
</message>
<message>
<source>HOM_MESH_INFO_2</source>
<translation>Analysis in the object browser, file </translation>
</message>
<message>
<source>PREF_TAB_GENERAL</source>
<translation>General</translation>
</message>
<message>
<source>PREF_PUBLICATION</source>
<translation>Publication</translation>
</message>
<message>
<source>PREF_PUBLICATION_MAILLAGE_IN</source>
<translation>IN meshes</translation>
</message>
<message>
<source>PREF_PUBLICATION_MAILLAGE_OUT</source>
<translation>OUT meshes</translation>
</message>
</context>
</TS>

View File

@ -0,0 +1,871 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="fr_FR">
<context>
<name>@default</name>
<message>
<source>HOM_WARNING</source>
<translation>Avertissement</translation>
</message>
<message>
<source>HOM_ERROR</source>
<translation>Erreur</translation>
</message>
<message>
<source>HOM_INACTIVE_BUTTON</source>
<translation>Bouton inactif</translation>
</message>
<message>
<source>OK</source>
<translation>Appliquer et fermer</translation>
</message>
<message>
<source>Apply</source>
<translation>Appliquer</translation>
</message>
<message>
<source>Cancel</source>
<translation>Annuler</translation>
</message>
<message>
<source>Help</source>
<translation>Aide</translation>
</message>
<message>
<source>New</source>
<translation>Nouveau</translation>
</message>
<message>
<source>Edit</source>
<translation>Editer</translation>
</message>
<message>
<source>Quit</source>
<translation>Quitter</translation>
</message>
<message>
<source>Name</source>
<translation>Nom</translation>
</message>
<message>
<source>Directory</source>
<translation>Répertoire</translation>
</message>
<message>
<source>Mesh</source>
<translation>Maillage</translation>
</message>
<message>
<source>Selection</source>
<translation>Sélection</translation>
</message>
<message>
<source>None</source>
<translation>Aucun</translation>
</message>
<message>
<source>All</source>
<translation>Tout</translation>
</message>
<message>
<source>HOM_SELECT_OBJECT_1</source>
<translation>Sélectionner un objet.</translation>
</message>
<message>
<source>HOM_SELECT_OBJECT_2</source>
<translation>Sélectionner un seul objet.</translation>
</message>
<message>
<source>HOM_SELECT_OBJECT_3</source>
<translation>Sélectionner un objet de type %1.</translation>
</message>
<message>
<source>HOM_SELECT_OBJECT_4</source>
<translation>Le nom est déjà choisi. Modifiez le ou annulez la saisie.</translation>
</message>
<message>
<source>HOM_SELECT_FILE_0</source>
<translation>Choix de fichier</translation>
</message>
<message>
<source>HOM_SELECT_FILE_1</source>
<translation>Sélectionner un fichier.</translation>
</message>
<message>
<source>HOM_SELECT_FILE_2</source>
<translation>Sélectionner un seul fichier.</translation>
</message>
<message>
<source>HOM_SELECT_FILE_3</source>
<translation>Impossible d'ouvrir ce fichier.</translation>
</message>
<message>
<source>HOM_SCRIPT_FILE</source>
<translation>Il faut donner un fichier pour le script python.</translation>
</message>
<message>
<source>HOM_MED_FILE_1</source>
<translation>Ce fichier MED est illisible.</translation>
</message>
<message>
<source>HOM_MED_FILE_2</source>
<translation>Ce fichier MED ne contient aucun maillage.</translation>
</message>
<message>
<source>HOM_MED_FILE_3</source>
<translation>Ce fichier MED contient plus d'un maillage.</translation>
</message>
<message>
<source>HOM_MED_FILE_4</source>
<translation>Impossible de lire le maillage de ce fichier MED.</translation>
</message>
<message>
<source>HOM_SELECT_STUDY</source>
<translation>Sélectionner une étude avec un fichier MED associé\n ou sélectionner un fichier MED.</translation>
</message>
<message>
<source>HOM_CASE_DIRECTORY_3</source>
<translation>Un répertoire valide doit être choisi.</translation>
</message>
<message>
<source>HOM_CASE_DIRECTORY_4</source>
<translation>Il faut choisir un répertoire de travail pour le calcul.</translation>
</message>
<message>
<source>HOM_START_DIRECTORY_1</source>
<translation>Il faut choisir un répertoire contenant l'itération à poursuivre.</translation>
</message>
<message>
<source>HOM_START_DIRECTORY_3</source>
<translation>Un répertoire valide contenant l'itération à poursuivre doit être choisi.</translation>
</message>
<message>
<source>HOM_CASE_MESH</source>
<translation>Il faut choisir le maillage initial.</translation>
</message>
<message>
<source>HOM_CASE_GROUP</source>
<translation>Le groupe &quot;%1&quot; ne peut pas être attribué à plus d'une frontière.</translation>
</message>
<message>
<source>HOM_CASE_EDIT_WINDOW_TITLE</source>
<translation>Edition d'un cas</translation>
</message>
<message>
<source>HOM_CASE_EDIT_STATE_0</source>
<translation>Maillage initial.</translation>
</message>
<message>
<source>HOM_CASE_EDIT_STATE</source>
<translation>Poursuite d'une itération.</translation>
</message>
<message>
<source>HOM_CASE_PURSUE_WINDOW_TITLE</source>
<translation>Cas de poursuite d'une itération</translation>
</message>
<message>
<source>The configuration file cannot be found.</source>
<translation>Le fichier de configuration de HOMARD est introuvable.</translation>
</message>
<message>
<source>The configuration file cannot be read.</source>
<translation>Le fichier de configuration de HOMARD est illisible.</translation>
</message>
<message>
<source>The HOMARD mesh file cannot be found.</source>
<translation>Le fichier de maillage de HOMARD est introuvable.</translation>
</message>
<message>
<source>HOM_ITER_NAME</source>
<translation>Il faut donner un nom à l'itération.</translation>
</message>
<message>
<source>HOM_ITER_STARTING_POINT</source>
<translation>Il faut désigner l'itération précédente.</translation>
</message>
<message>
<source>HOM_ITER_MESH</source>
<translation>Donner le nom du maillage final.</translation>
</message>
<message>
<source>HOM_ITER_HYPO</source>
<translation>Choisir une hypothèse.</translation>
</message>
<message>
<source>HOM_ITER_STARTING_POINT_0</source>
<translation>Maillage</translation>
</message>
<message>
<source>HOM_ITER_STARTING_POINT_1</source>
<translation>Itération initiale du cas.</translation>
</message>
<message>
<source>HOM_ITER_STARTING_POINT_2</source>
<translation>Itération initiale du cas pour la poursuite.</translation>
</message>
<message>
<source>HOM_ITER_EDIT_WINDOW_TITLE</source>
<translation>Edition d'une itération</translation>
</message>
<message>
<source>Boundary type</source>
<translation>Type de frontière</translation>
</message>
<message>
<source>No boundary</source>
<translation>Pas de frontière</translation>
</message>
<message>
<source>Non CAO</source>
<translation>Autre que CAO</translation>
</message>
<message>
<source>Discrete boundary</source>
<translation>Frontière discrète</translation>
</message>
<message>
<source>Analytical boundary</source>
<translation>Frontière analytique</translation>
</message>
<message>
<source>Conformity type</source>
<translation>Type de conformité</translation>
</message>
<message>
<source>Conformal</source>
<translation>Conforme</translation>
</message>
<message>
<source>Non conformal</source>
<translation>Non conforme</translation>
</message>
<message>
<source>Non conformal option</source>
<translation>Option de non conformité</translation>
</message>
<message>
<source>Conformity +</source>
<translation>Conformité +</translation>
</message>
<message>
<source>Free</source>
<translation>Libre</translation>
</message>
<message>
<source>1 hanging node per mesh</source>
<translation>1 noeud pendant par maille</translation>
</message>
<message>
<source>1 node per edge</source>
<translation>1 noeud pendant par arête</translation>
</message>
<message>
<source>Advanced options</source>
<translation>Options avancées</translation>
</message>
<message>
<source>Authorized pyramids</source>
<translation>Pyramides autorisées</translation>
</message>
<message>
<source>Minimal diameter</source>
<translation>Diamètre minimal</translation>
</message>
<message>
<source>Initialization of adaptation</source>
<translation>Initialisation de l'adaptation</translation>
</message>
<message>
<source>Maximal level</source>
<translation>Niveau maximal</translation>
</message>
<message>
<source>Output of the level of refinement</source>
<translation>Sortie du niveau de raffinement</translation>
</message>
<message>
<source>Output of the qualities</source>
<translation>Sortie des qualités</translation>
</message>
<message>
<source>Output of the diameters</source>
<translation>Sortie des diamètres</translation>
</message>
<message>
<source>Output of the parents</source>
<translation>Sortie des parents</translation>
</message>
<message>
<source>Output of the neighbours</source>
<translation>Sortie des voisins</translation>
</message>
<message>
<source>Create an iteration</source>
<translation>Création d'une itération</translation>
</message>
<message>
<source>Iteration Name</source>
<translation>Nom de l'itération</translation>
</message>
<message>
<source>Previous iteration</source>
<translation>Itération précédente</translation>
</message>
<message>
<source>Invalid boundary</source>
<translation>Frontière non valable</translation>
</message>
<message>
<source>Invalid case</source>
<translation>Cas non valable</translation>
</message>
<message>
<source>Invalid case context</source>
<translation>Cas contextuel non valable</translation>
</message>
<message>
<source>Invalid hypothesis</source>
<translation>Hypothèse non valable</translation>
</message>
<message>
<source>Invalid iteration</source>
<translation>Itération non valable</translation>
</message>
<message>
<source>This boundary has already been defined.</source>
<translation>Cette frontière est déjà définie.</translation>
</message>
<message>
<source>This case has already been defined.</source>
<translation>Ce cas est déjà défini.</translation>
</message>
<message>
<source>This hypothesis has already been defined.</source>
<translation>Cette hypothèse est déjà définie.</translation>
</message>
<message>
<source>This iteration has already been defined.</source>
<translation>Cette itération est déjà définie.</translation>
</message>
<message>
<source>The parent iteration is not defined.</source>
<translation>L'itération parent n'est pas définie.</translation>
</message>
<message>
<source>Unable to create the iteration.</source>
<translation>Impossible de créer l'itération.</translation>
</message>
<message>
<source>The directory for the computation cannot be created.</source>
<translation>Impossible de créer le répertoire pour le calcul de l'itération.</translation>
</message>
<message>
<source>This iteration is the first of the case and cannot be computed.</source>
<translation>Cette itération définit le point de départ du cas. Elle ne peut pas être calculée.</translation>
</message>
<message>
<source>This iteration does not have any associated hypothesis.</source>
<translation>Cette itération n'est associée à aucune hypothèse.</translation>
</message>
<message>
<source>The mesh file does not exist.</source>
<translation>Le fichier du maillage n'existe pas.</translation>
</message>
<message>
<source>The mesh file cannot be deleted.</source>
<translation>Impossible de supprimer le fichier du maillage.</translation>
</message>
<message>
<source>Mesh n</source>
<translation>Maillage n</translation>
</message>
<message>
<source>Mesh n+1</source>
<translation>Maillage n+1</translation>
</message>
<message>
<source>Rank</source>
<translation>Numéro d'ordre</translation>
</message>
<message>
<source>Hypothesis</source>
<translation>Hypothèse</translation>
</message>
<message>
<source>Create a hypothesis</source>
<translation>Création d'une hypothèse</translation>
</message>
<message>
<source>HOM_HYPO_NAME</source>
<translation>Il faut donner un nom à l'hypothèse.</translation>
</message>
<message>
<source>HOM_HYPO_NORM_L2</source>
<translation>Norme L2</translation>
</message>
<message>
<source>HOM_HYPO_NORM_INF</source>
<translation>Norme infinie</translation>
</message>
<message>
<source>HOM_HYPO_NORM_ABS</source>
<translation>Absolu</translation>
</message>
<message>
<source>HOM_HYPO_NORM_REL</source>
<translation>Relatif</translation>
</message>
<message>
<source>HOM_HYPO_COMP</source>
<translation>Il faut choisir au moins une composante.</translation>
</message>
<message>
<source>HOM_HYPO_EDIT_WINDOW_TITLE</source>
<translation>Edition d'une hypothèse</translation>
</message>
<message>
<source>Type of adaptation</source>
<translation>Type d'adaptation</translation>
</message>
<message>
<source>Uniform</source>
<translation>Uniforme</translation>
</message>
<message>
<source>Uniform adaptation</source>
<translation>Adaptation uniforme</translation>
</message>
<message>
<source>Coarsening</source>
<translation>Déraffinement</translation>
</message>
<message>
<source>Refinement</source>
<translation>Raffinement</translation>
</message>
<message>
<source>Nothing</source>
<translation>Rien</translation>
</message>
<message>
<source>Jump between elements</source>
<translation>Saut entre éléments</translation>
</message>
<message>
<source>Component</source>
<translation>Composante</translation>
</message>
<message>
<source>Refinement threshold</source>
<translation>Seuil de raffinement</translation>
</message>
<message>
<source>Coarsening threshold</source>
<translation>Seuil de déraffinement</translation>
</message>
<message>
<source>Percentage of meshes</source>
<translation>Pourcentage de mailles</translation>
</message>
<message>
<source>Mean + n*(std deviation)</source>
<translation>Moyenne + n*(ecart-type)</translation>
</message>
<message>
<source>No refinement</source>
<translation>Sans raffinement</translation>
</message>
<message>
<source>Mean - n*(std deviation)</source>
<translation>Moyenne - n*(ecart-type)</translation>
</message>
<message>
<source>No coarsening</source>
<translation>Sans déraffinement</translation>
</message>
<message>
<source>Chosen</source>
<translation>Choisi</translation>
</message>
<message>
<source>Box</source>
<translation>Boîte</translation>
</message>
<message>
<source>Sphere</source>
<translation>Sphère</translation>
</message>
<message>
<source>Cylinder</source>
<translation>Cylindre</translation>
</message>
<message>
<source>Disk</source>
<translation>Disque</translation>
</message>
<message>
<source>Disk with hole</source>
<translation>Disque avec trou</translation>
</message>
<message>
<source>Pipe</source>
<translation>Tuyau</translation>
</message>
<message>
<source>Coordinates</source>
<translation>Coordonnées</translation>
</message>
<message>
<source>Get CAO</source>
<translation>Acquisition de la CAO</translation>
</message>
<message>
<source>Create an analytical boundary</source>
<translation>Création d'une frontière analytique</translation>
</message>
<message>
<source>Create a discrete boundary</source>
<translation>Création d'une frontière discrète</translation>
</message>
<message>
<source>Type of boundary</source>
<translation>Type de la frontière</translation>
</message>
<message>
<source>Torus</source>
<translation>Tore</translation>
</message>
<message>
<source>Radius</source>
<translation>Rayon</translation>
</message>
<message>
<source>Radius 1</source>
<translation>Rayon 1</translation>
</message>
<message>
<source>Radius 2</source>
<translation>Rayon 2</translation>
</message>
<message>
<source>External radius</source>
<translation>Rayon externe</translation>
</message>
<message>
<source>Internal radius</source>
<translation>Rayon interne</translation>
</message>
<message>
<source>Height</source>
<translation>Hauteur</translation>
</message>
<message>
<source>X axis</source>
<translation>X axe</translation>
</message>
<message>
<source>Y axis</source>
<translation>Y axe</translation>
</message>
<message>
<source>Z axis</source>
<translation>Z axe</translation>
</message>
<message>
<source>R revolution</source>
<translation>R révolution</translation>
</message>
<message>
<source>Primary R</source>
<translation>R primaire</translation>
</message>
<message>
<source>HOM_BOUN_NAME</source>
<translation>Il faut donner un nom à la frontière.</translation>
</message>
<message>
<source>HOM_BOUN_MESH</source>
<translation>Il faut choisir le fichier qui contient le maillage de la frontière discrète.</translation>
</message>
<message>
<source>HOM_BOUN_CAO</source>
<translation>Il faut choisir le fichier qui contient la CAO.</translation>
</message>
<message>
<source>HOM_BOUN_CASE</source>
<translation>Le fichier du maillage du cas est inconnu.</translation>
</message>
<message>
<source>HOM_AXE</source>
<translation>L'axe doit être un vecteur non nul.</translation>
</message>
<message>
<source>HOM_BOUN_C_EDIT_WINDOW_TITLE</source>
<translation>Edition d'une frontière basée sur une CAO</translation>
</message>
<message>
<source>HOM_BOUN_A_EDIT_WINDOW_TITLE</source>
<translation>Edition d'une frontière analytique</translation>
</message>
<message>
<source>HOM_BOUN_D_EDIT_WINDOW_TITLE</source>
<translation>Edition d'une frontière discrète</translation>
</message>
<message>
<source>HOM_GROU_EDIT_WINDOW_TITLE</source>
<translation>Groupes choisis</translation>
</message>
<message>
<source>The height must be positive.</source>
<translation>La hauteur doit être positive.</translation>
</message>
<message>
<source>The radius must be positive.</source>
<translation>Un rayon doit être positif.</translation>
</message>
<message>
<source>The axis must be a non 0 vector.</source>
<translation>L'axe doit être un vecteur non nul.</translation>
</message>
<message>
<source>The angle must be included higher than 0 degree and lower than 90 degrees.</source>
<translation>L'angle doit être compris entre 0 et 90 degrés.</translation>
</message>
<message>
<source>The radius must be different.</source>
<translation>Les rayons doivent être différents.</translation>
</message>
<message>
<source>The centers must be different.</source>
<translation>Les centres doivent être différents.</translation>
</message>
<message>
<source>The external radius must be higher than the internal radius.</source>
<translation>Le rayon externe doit être supérieur au rayon interne.</translation>
</message>
<message>
<source>The X coordinates are not coherent.</source>
<translation>Les coordonnées en X ne sont pas cohérentes.</translation>
</message>
<message>
<source>The Y coordinates are not coherent.</source>
<translation>Les coordonnées en Y ne sont pas cohérentes.</translation>
</message>
<message>
<source>The Z coordinates are not coherent.</source>
<translation>Les coordonnées en Z ne sont pas cohérentes.</translation>
</message>
<message>
<source>The first coordinates are not coherent.</source>
<translation>Les premières coordonnées ne sont pas cohérentes.</translation>
</message>
<message>
<source>The second coordinates are not coherent.</source>
<translation>Les secondes coordonnées ne sont pas cohérentes.</translation>
</message>
<message>
<source>The orientation must be 1, 2 or 3.</source>
<translation>L'orientation vaut 1, 2 ou 3.</translation>
</message>
<message>
<source>HOM_MESH_INFO_0</source>
<translation>Analyse de maillage</translation>
</message>
<message>
<source>HOM_MESH_INFO_1</source>
<translation>Choisir au moins une option.</translation>
</message>
<message>
<source>HOM_MESH_INFO_2</source>
<translation>Bilan de l'analyse dans l'arbre d'études, fichier </translation>
</message>
<message>
<source>Filtering with groups</source>
<translation>Filtrage par les groupes</translation>
</message>
<message>
<source>Selection of groups</source>
<translation>Choix des groupes</translation>
</message>
<message>
<source>Selected groups</source>
<translation>Groupes choisis</translation>
</message>
<message>
<source>Group</source>
<translation>Groupe</translation>
</message>
<message>
<source>Information on a mesh</source>
<translation>Analyse d'un maillage</translation>
</message>
<message>
<source>Group size</source>
<translation>Taille des domaines</translation>
</message>
<message>
<source>Quality</source>
<translation>Qualité</translation>
</message>
<message>
<source>Connection</source>
<translation>Connexité</translation>
</message>
<message>
<source>Diametre</source>
<translation>Diamètre</translation>
</message>
<message>
<source>Entanglement</source>
<translation>Interpénétration</translation>
</message>
<message>
<source>No change is allowed in a boundary. Ask for evolution.</source>
<translation>Impossible de changer une donnée dans une frontière. Demander une évolution.</translation>
</message>
<message>
<source>This boundary is used in a case and cannot be deleted.</source>
<translation>Cette frontière est utilisée dans un cas ; elle ne peut pas être détruite.</translation>
</message>
<message>
<source>This hypothesis is used and cannot be deleted.</source>
<translation>Cette hypothèse est utilisée dans une itération ; elle ne peut pas être détruite.</translation>
</message>
<message>
<source>This iteration cannot be deleted.</source>
<translation>Cette itération ne peut pas être détruite.</translation>
</message>
<message>
<source>The directory for the calculation cannot be cleared.</source>
<translation>Menage du repertoire de calcul impossible</translation>
</message>
<message>
<source>Starting point</source>
<translation>Point de départ</translation>
</message>
<message>
<source>From an iteration</source>
<translation>A partir d'une itération</translation>
</message>
<message>
<source>From a case</source>
<translation>A partir d'un cas</translation>
</message>
<message>
<source>Iteration into the case</source>
<translation>Choix d'une itération dans le cas</translation>
</message>
<message>
<source>Last iteration</source>
<translation>A partir de la dernière itération</translation>
</message>
<message>
<source>Iteration number</source>
<translation>A partir d'une itération numérotée</translation>
</message>
<message>
<source>The directory of the case does not exist.</source>
<translation>Le répertoire du cas n'existe pas.</translation>
</message>
<message>
<source>The directory for the case cannot be modified because some iterations are already defined.</source>
<translation>Impossible de changer le répertoire du cas car des itérations ont déjà é définies.</translation>
</message>
<message>
<source>The directory for the case cannot be reached.</source>
<translation>Impossible d'atteindre ce répertoire pour le cas.</translation>
</message>
<message>
<source>The starting point for the case cannot be copied into the working directory.</source>
<translation>Impossible de copier le point de départ du cas dans le répertoire de travail.</translation>
</message>
<message>
<source>The starting point for the case cannot be moved into the new directory.</source>
<translation>Impossible de déplacer le point de départ du cas dans le nouveau répertoire.</translation>
</message>
<message>
<source>The directory of the case for the pursuit does not exist.</source>
<translation>Le répertoire du cas de reprise n'existe pas.</translation>
</message>
<message>
<source>The directory of the iteration does not exist.</source>
<translation>Le répertoire de l'itération de reprise n'existe pas.</translation>
</message>
<message>
<source>The number of iteration must be positive.</source>
<translation>Le numéro de l'itération doit etre positif.</translation>
</message>
<message>
<source>Number of iteration</source>
<translation>Numéro de l'itération</translation>
</message>
<message>
<source>Case</source>
<translation>Cas</translation>
</message>
<message>
<source>Mesh file</source>
<translation>Maillage initial</translation>
</message>
<message>
<source>Constant</source>
<translation>Constant</translation>
</message>
<message>
<source>Variable</source>
<translation>Variable</translation>
</message>
<message>
<source>Type of schema</source>
<translation>Type de schema</translation>
</message>
<message>
<source>Maximum of ...</source>
<translation>Maximum de ...</translation>
</message>
<message>
<source>Iterations</source>
<translation>Itérations</translation>
</message>
<message>
<source>Nodes</source>
<translation>Noeuds</translation>
</message>
<message>
<source>Elements</source>
<translation>Eléments</translation>
</message>
<message>
<source>Test of convergence</source>
<translation>Test de convergence</translation>
</message>
<message>
<source>Edit a file</source>
<translation>Affichage d'un fichier</translation>
</message>
<message>
<source>Print</source>
<translation>Imprimer</translation>
</message>
<message>
<source>Invalid study context</source>
<translation>Etude contextuelle non valable</translation>
</message>
<message>
<source>PREF_TAB_GENERAL</source>
<translation>Général</translation>
</message>
<message>
<source>PREF_PUBLICATION</source>
<translation>Publication</translation>
</message>
<message>
<source>PREF_PUBLICATION_MAILLAGE_IN</source>
<translation>Les maillages d'entrée</translation>
</message>
<message>
<source>PREF_PUBLICATION_MAILLAGE_OUT</source>
<translation>Les maillages de sortie</translation>
</message>
</context>
</TS>

View File

@ -0,0 +1,868 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="ja" sourcelanguage="en">
<context>
<name>@default</name>
<message>
<source>HOM_WARNING</source>
<translation></translation>
</message>
<message>
<source>HOM_ERROR</source>
<translation></translation>
</message>
<message>
<source>HOM_INACTIVE_BUTTON</source>
<translation></translation>
</message>
<message>
<source>OK</source>
<translation>Ok</translation>
</message>
<message>
<source>Apply</source>
<translation></translation>
</message>
<message>
<source>Cancel</source>
<translation></translation>
</message>
<message>
<source>Help</source>
<translation></translation>
</message>
<message>
<source>New</source>
<translation></translation>
</message>
<message>
<source>Edit</source>
<translation></translation>
</message>
<message>
<source>Quit</source>
<translation></translation>
</message>
<message>
<source>Name</source>
<translation></translation>
</message>
<message>
<source>Directory</source>
<translation></translation>
</message>
<message>
<source>Mesh</source>
<translation></translation>
</message>
<message>
<source>Selection</source>
<translation></translation>
</message>
<message>
<source>None</source>
<translation></translation>
</message>
<message>
<source>All</source>
<translation></translation>
</message>
<message>
<source>HOM_SELECT_OBJECT_1</source>
<translation></translation>
</message>
<message>
<source>HOM_SELECT_OBJECT_2</source>
<translation>1 </translation>
</message>
<message>
<source>HOM_SELECT_OBJECT_3</source>
<translation> %1 </translation>
</message>
<message>
<source>HOM_SELECT_OBJECT_4</source>
<translation>The name of the object is already selected. Modify it or cancel.</translation>
</message>
<message>
<source>HOM_SELECT_FILE_0</source>
<translation></translation>
</message>
<message>
<source>HOM_SELECT_FILE_1</source>
<translation></translation>
</message>
<message>
<source>HOM_SELECT_FILE_2</source>
<translation>1 </translation>
</message>
<message>
<source>HOM_SELECT_FILE_3</source>
<translation></translation>
</message>
<message>
<source>HOM_SCRIPT_FILE</source>
<translation> python </translation>
</message>
<message>
<source>HOM_MED_FILE_1</source>
<translation></translation>
</message>
<message>
<source>HOM_MED_FILE_2</source>
<translation></translation>
</message>
<message>
<source>HOM_MED_FILE_3</source>
<translation> 1 </translation>
</message>
<message>
<source>HOM_MED_FILE_4</source>
<translation> </translation>
</message>
<message>
<source>HOM_MED_FILE_5</source>
<translation></translation>
</message>
<message>
<source>HOM_MED_FILE_6</source>
<translation> </translation>
</message>
<message>
<source>HOM_SELECT_STUDY</source>
<translation> associe
</translation>
</message>
<message>
<source>Create a case</source>
<translation></translation>
</message>
<message>
<source>HOM_CASE_NAME</source>
<translation></translation>
</message>
<message>
<source>HOM_CASE_DIRECTORY_1</source>
<translation>1 </translation>
</message>
<message>
<source>HOM_CASE_DIRECTORY_2</source>
<translation>使</translation>
</message>
<message>
<source>HOM_CASE_DIRECTORY_3</source>
<translation></translation>
</message>
<message>
<source>HOM_CASE_DIRECTORY_4</source>
<translation></translation>
</message>
<message>
<source>HOM_START_DIRECTORY_1</source>
<translation></translation>
</message>
<message>
<source>HOM_START_DIRECTORY_3</source>
<translation></translation>
</message>
<message>
<source>HOM_CASE_MESH</source>
<translation>1 </translation>
</message>
<message>
<source>HOM_CASE_GROUP</source>
<translation>"%1"</translation>
</message>
<message>
<source>HOM_CASE_EDIT_WINDOW_TITLE</source>
<translation></translation>
</message>
<message>
<source>HOM_CASE_EDIT_STATE_0</source>
<translation></translation>
</message>
<message>
<source>HOM_CASE_EDIT_STATE</source>
<translation></translation>
</message>
<message>
<source>HOM_CASE_PURSUE_WINDOW_TITLE</source>
<translation></translation>
</message>
<message>
<source>The configuration file cannot be found.</source>
<translation></translation>
</message>
<message>
<source>The configuration file cannot be read.</source>
<translation></translation>
</message>
<message>
<source>The HOMARD mesh file cannot be found.</source>
<translation>HOMARDメッシュファイルが見つかりません</translation>
</message>
<message>
<source>HOM_ITER_NAME</source>
<translation></translation>
</message>
<message>
<source>HOM_ITER_STARTING_POINT</source>
<translation></translation>
</message>
<message>
<source>HOM_ITER_MESH</source>
<translation></translation>
</message>
<message>
<source>HOM_ITER_HYPO</source>
<translation></translation>
</message>
<message>
<source>HOM_ITER_STARTING_POINT_0</source>
<translation></translation>
</message>
<message>
<source>HOM_ITER_STARTING_POINT_1</source>
<translation></translation>
</message>
<message>
<source>HOM_ITER_STARTING_POINT_2</source>
<translation></translation>
</message>
<message>
<source>HOM_ITER_EDIT_WINDOW_TITLE</source>
<translation></translation>
</message>
<message>
<source>Discrete boundary</source>
<translation></translation>
</message>
<message>
<source>Analytical boundary</source>
<translation></translation>
</message>
<message>
<source>Conformity type</source>
<translation></translation>
</message>
<message>
<source>Conformal</source>
<translation></translation>
</message>
<message>
<source>Non conformal</source>
<translation></translation>
</message>
<message>
<source>Non conformal option</source>
<translation></translation>
</message>
<message>
<source>Conformity +</source>
<translation> +</translation>
</message>
<message>
<source>Free</source>
<translation>Free</translation>
</message>
<message>
<source>1 hanging node per mesh</source>
<translation>1</translation>
</message>
<message>
<source>1 node per edge</source>
<translation>1</translation>
</message>
<message>
<source>Advanced options</source>
<translation></translation>
</message>
<message>
<source>Authorized pyramids</source>
<translation></translation>
</message>
<message>
<source>Minimal diameter</source>
<translation></translation>
</message>
<message>
<source>Initialization of adaptation</source>
<translation></translation>
</message>
<message>
<source>Maximal level</source>
<translation></translation>
</message>
<message>
<source>Output of the level of refinement</source>
<translation></translation>
</message>
<message>
<source>Output of the qualities</source>
<translation></translation>
</message>
<message>
<source>Output of the diameters</source>
<translation></translation>
</message>
<message>
<source>Output of the parents</source>
<translation></translation>
</message>
<message>
<source>Output of the neighbours</source>
<translation></translation>
</message>
<message>
<source>Create an iteration</source>
<translation></translation>
</message>
<message>
<source>Iteration Name</source>
<translation></translation>
</message>
<message>
<source>Previous iteration</source>
<translation></translation>
</message>
<message>
<source>Invalid boundary</source>
<translation></translation>
</message>
<message>
<source>Invalid case</source>
<translation></translation>
</message>
<message>
<source>Invalid case context</source>
<translation></translation>
</message>
<message>
<source>Invalid hypothesis</source>
<translation>hypothesis</translation>
</message>
<message>
<source>Invalid iteration</source>
<translation></translation>
</message>
<message>
<source>This boundary has already been defined.</source>
<translation></translation>
</message>
<message>
<source>This case has already been defined.</source>
<translation></translation>
</message>
<message>
<source>This hypothesis has already been defined.</source>
<translation>hypothesisは既に定義されています</translation>
</message>
<message>
<source>This iteration has already been defined.</source>
<translation></translation>
</message>
<message>
<source>The parent iteration is not defined.</source>
<translation></translation>
</message>
<message>
<source>Unable to create the iteration.</source>
<translation></translation>
</message>
<message>
<source>The directory for the computation cannot be created.</source>
<translation></translation>
</message>
<message>
<source>This iteration is the first of the case and cannot be computed.</source>
<translation></translation>
</message>
<message>
<source>This iteration does not have any associated hypothesis.</source>
<translation> hypothesis </translation>
</message>
<message>
<source>The mesh file does not exist.</source>
<translation> </translation>
</message>
<message>
<source>The mesh file cannot be deleted.</source>
<translation> </translation>
</message>
<message>
<source>Mesh n</source>
<translation> n</translation>
</message>
<message>
<source>Mesh n+1</source>
<translation> n + 1</translation>
</message>
<message>
<source>Rank</source>
<translation></translation>
</message>
<message>
<source>Hypothesis</source>
<translation>Hypothesis</translation>
</message>
<message>
<source>Create a hypothesis</source>
<translation>hypothesis </translation>
</message>
<message>
<source>HOM_HYPO_NAME</source>
<translation></translation>
</message>
<message>
<source>HOM_HYPO_NORM_L2</source>
<translation> L2</translation>
</message>
<message>
<source>HOM_HYPO_NORM_INF</source>
<translation></translation>
</message>
<message>
<source>HOM_HYPO_NORM_ABS</source>
<translation></translation>
</message>
<message>
<source>HOM_HYPO_NORM_REL</source>
<translation></translation>
</message>
<message>
<source>HOM_HYPO_COMP</source>
<translation>1 </translation>
</message>
<message>
<source>HOM_HYPO_EDIT_WINDOW_TITLE</source>
<translation></translation>
</message>
<message>
<source>Type of adaptation</source>
<translation></translation>
</message>
<message>
<source>Uniform</source>
<translation></translation>
</message>
<message>
<source>Uniform adaptation</source>
<translation></translation>
</message>
<message>
<source>Refinement</source>
<translation></translation>
</message>
<message>
<source>Nothing</source>
<translation></translation>
</message>
<message>
<source>Jump between elements</source>
<translation></translation>
</message>
<message>
<source>Component</source>
<translation></translation>
</message>
<message>
<source>Refinement threshold</source>
<translation></translation>
</message>
<message>
<source>Coarsening threshold</source>
<translation></translation>
</message>
<message>
<source>Percentage of meshes</source>
<translation></translation>
</message>
<message>
<source>Mean + n*(std deviation)</source>
<translation> + n * ()</translation>
</message>
<message>
<source>No refinement</source>
<translation></translation>
</message>
<message>
<source>Mean - n*(std deviation)</source>
<translation> - n * ()</translation>
</message>
<message>
<source>No coarsening</source>
<translation></translation>
</message>
<message>
<source>Chosen</source>
<translation></translation>
</message>
<message>
<source>Box</source>
<translation>Box</translation>
</message>
<message>
<source>Sphere</source>
<translation></translation>
</message>
<message>
<source>Cylinder</source>
<translation></translation>
</message>
<message>
<source>Disk</source>
<translation></translation>
</message>
<message>
<source>Disk with hole</source>
<translation></translation>
</message>
<message>
<source>Pipe</source>
<translation></translation>
</message>
<message>
<source>Coordinates</source>
<translation></translation>
</message>
<message>
<source>Create an analytical boundary</source>
<translation></translation>
</message>
<message>
<source>Create a discrete boundary</source>
<translation></translation>
</message>
<message>
<source>Type of boundary</source>
<translation></translation>
</message>
<message>
<source>Torus</source>
<translation></translation>
</message>
<message>
<source>Radius</source>
<translation></translation>
</message>
<message>
<source>Radius 1</source>
<translation>1</translation>
</message>
<message>
<source>Radius 2</source>
<translation>2</translation>
</message>
<message>
<source>External radius</source>
<translation></translation>
</message>
<message>
<source>Internal radius</source>
<translation></translation>
</message>
<message>
<source>Height</source>
<translation></translation>
</message>
<message>
<source>X axis</source>
<translation>X </translation>
</message>
<message>
<source>Y axis</source>
<translation>Y </translation>
</message>
<message>
<source>Z axis</source>
<translation>Z </translation>
</message>
<message>
<source>R revolution</source>
<translation>R </translation>
</message>
<message>
<source>Primary R</source>
<translation> R</translation>
</message>
<message>
<source>HOM_BOUN_NAME</source>
<translation></translation>
</message>
<message>
<source>HOM_BOUN_MESH</source>
<translation>1 </translation>
</message>
<message>
<source>HOM_BOUN_CASE</source>
<translation></translation>
</message>
<message>
<source>HOM_AXE</source>
<translation></translation>
</message>
<message>
<source>HOM_BOUN_A_EDIT_WINDOW_TITLE</source>
<translation></translation>
</message>
<message>
<source>HOM_BOUN_D_EDIT_WINDOW_TITLE</source>
<translation></translation>
</message>
<message>
<source>HOM_GROU_EDIT_WINDOW_TITLE</source>
<translation></translation>
</message>
<message>
<source>The height must be positive.</source>
<translation></translation>
</message>
<message>
<source>The radius must be positive.</source>
<translation></translation>
</message>
<message>
<source>The axis must be a non 0 vector.</source>
<translation> 0 </translation>
</message>
<message>
<source>The angle must be included higher than 0 degree and lower than 90 degrees.</source>
<translation>0 ° 90 °</translation>
</message>
<message>
<source>The radius must be different.</source>
<translation></translation>
</message>
<message>
<source>The centers must be different.</source>
<translation></translation>
</message>
<message>
<source>The external radius must be higher than the internal radius.</source>
<translation></translation>
</message>
<message>
<source>The X coordinates are not coherent.</source>
<translation>X座標は論理上問題があります</translation>
</message>
<message>
<source>The Y coordinates are not coherent.</source>
<translation>Y座標は論理上問題があります</translation>
</message>
<message>
<source>The Z coordinates are not coherent.</source>
<translation>Z座標は論理上問題があります</translation>
</message>
<message>
<source>The first coordinates are not coherent.</source>
<translation></translation>
</message>
<message>
<source>The second coordinates are not coherent.</source>
<translation>2</translation>
</message>
<message>
<source>The orientation must be 1, 2 or 3.</source>
<translation>123</translation>
</message>
<message>
<source>HOM_MESH_INFO_0</source>
<translation></translation>
</message>
<message>
<source>HOM_MESH_INFO_1</source>
<translation> 1 </translation>
</message>
<message>
<source>HOM_MESH_INFO_2</source>
<translation> </translation>
</message>
<message>
<source>Filtering with groups</source>
<translation></translation>
</message>
<message>
<source>Selection of groups</source>
<translation></translation>
</message>
<message>
<source>Selected groups</source>
<translation></translation>
</message>
<message>
<source>Group</source>
<translation> :</translation>
</message>
<message>
<source>Information on a mesh</source>
<translation></translation>
</message>
<message>
<source>Group size</source>
<translation></translation>
</message>
<message>
<source>Quality</source>
<translation></translation>
</message>
<message>
<source>Connection</source>
<translation></translation>
</message>
<message>
<source>Diametre</source>
<translation></translation>
</message>
<message>
<source>Entanglement</source>
<translation></translation>
</message>
<message>
<source>No change is allowed in a boundary. Ask for evolution.</source>
<translation></translation>
</message>
<message>
<source>This boundary is used in a case and cannot be deleted.</source>
<translation>使</translation>
</message>
<message>
<source>This hypothesis is used and cannot be deleted.</source>
<translation>hypothesisは使用されており</translation>
</message>
<message>
<source>This iteration cannot be deleted.</source>
<translation></translation>
</message>
<message>
<source>The directory for the calculation cannot be cleared.</source>
<translation></translation>
</message>
<message>
<source>Starting point</source>
<translation></translation>
</message>
<message>
<source>From an iteration</source>
<translation></translation>
</message>
<message>
<source>From a case</source>
<translation></translation>
</message>
<message>
<source>Iteration into the case</source>
<translation></translation>
</message>
<message>
<source>Last iteration</source>
<translation></translation>
</message>
<message>
<source>Iteration number</source>
<translation></translation>
</message>
<message>
<source>The directory of the case does not exist.</source>
<translation></translation>
</message>
<message>
<source>The directory for the case cannot be modified because some iterations are already defined.</source>
<translation></translation>
</message>
<message>
<source>The directory for the case cannot be reached.</source>
<translation></translation>
</message>
<message>
<source>The starting point for the case cannot be copied into the working directory.</source>
<translation></translation>
</message>
<message>
<source>The starting point for the case cannot be moved into the new directory.</source>
<translation></translation>
</message>
<message>
<source>The directory of the case for the pursuit does not exist.</source>
<translation></translation>
</message>
<message>
<source>The directory of the iteration does not exist.</source>
<translation></translation>
</message>
<message>
<source>The number of iteration must be positive.</source>
<translation></translation>
</message>
<message>
<source>Number of iteration</source>
<translation></translation>
</message>
<message>
<source>Case</source>
<translation></translation>
</message>
<message>
<source>Mesh file</source>
<translation></translation>
</message>
<message>
<source>Constant</source>
<translation></translation>
</message>
<message>
<source>Variable</source>
<translation></translation>
</message>
<message>
<source>Type of schema</source>
<translation></translation>
</message>
<message>
<source>Maximum of ...</source>
<translation>...</translation>
</message>
<message>
<source>Iterations</source>
<translation></translation>
</message>
<message>
<source>Nodes</source>
<translation></translation>
</message>
<message>
<source>Elements</source>
<translation></translation>
</message>
<message>
<source>Test of convergence</source>
<translation></translation>
</message>
<message>
<source>Edit a file</source>
<translation></translation>
</message>
<message>
<source>Print</source>
<translation></translation>
</message>
<message>
<source>Invalid study context</source>
<translation></translation>
</message>
<message>
<source>PREF_TAB_GENERAL</source>
<translation></translation>
</message>
<message>
<source>PREF_PUBLICATION</source>
<translation></translation>
</message>
<message>
<source>PREF_PUBLICATION_MAILLAGE_IN</source>
<translation></translation>
</message>
<message>
<source>PREF_PUBLICATION_MAILLAGE_OUT</source>
<translation></translation>
</message>
</context>
</TS>

View File

@ -184,6 +184,7 @@ namespace SMESHOp {
OpSplitBiQuadratic = 4515, // MENU MODIFICATION - SPLIT BI-QUADRATIC TO LINEAR OpSplitBiQuadratic = 4515, // MENU MODIFICATION - SPLIT BI-QUADRATIC TO LINEAR
// Adaptation ---------------------//-------------------------------- // Adaptation ---------------------//--------------------------------
OpMGAdapt = 8020, // MENU ADAPTATION - MG-ADAPT OpMGAdapt = 8020, // MENU ADAPTATION - MG-ADAPT
OpHomardAdapt = 8021, // MENU ADAPTATION - HOMARD-ADAPT
// Measurements -------------------//-------------------------------- // Measurements -------------------//--------------------------------
OpPropertiesLength = 5000, // MENU MEASUREMENTS - BASIC PROPERTIES - LENGTH OpPropertiesLength = 5000, // MENU MEASUREMENTS - BASIC PROPERTIES - LENGTH
OpPropertiesArea = 5001, // MENU MEASUREMENTS - BASIC PROPERTIES - AREA OpPropertiesArea = 5001, // MENU MEASUREMENTS - BASIC PROPERTIES - AREA

View File

@ -87,6 +87,10 @@
<source>ICON_MG_ADAPT</source> <source>ICON_MG_ADAPT</source>
<translation>adapt_mg_adapt.png</translation> <translation>adapt_mg_adapt.png</translation>
</message> </message>
<message>
<source>ICON_HOMARD_ADAPT</source>
<translation>adapt_homard.png</translation>
</message>
<message> <message>
<source>ICON_CONV_TO_QUAD</source> <source>ICON_CONV_TO_QUAD</source>
<translation>mesh_conv_to_quad.png</translation> <translation>mesh_conv_to_quad.png</translation>

View File

@ -340,6 +340,10 @@
<source>MEN_MG_ADAPT</source> <source>MEN_MG_ADAPT</source>
<translation>Remesh with MG_Adapt</translation> <translation>Remesh with MG_Adapt</translation>
</message> </message>
<message>
<source>MEN_HOMARD_ADAPT</source>
<translation>Uniform refinement</translation>
</message>
<message> <message>
<source>Args</source> <source>Args</source>
<translation>Arguments</translation> <translation>Arguments</translation>
@ -3025,6 +3029,10 @@ Check algorithm documentation for supported geometry</translation>
<source>ADAPT_PREF_NONE</source> <source>ADAPT_PREF_NONE</source>
<translation>None</translation> <translation>None</translation>
</message> </message>
<message>
<source>ADAPT_WITH_HOMARD</source>
<translation>Adaptation with HOMARD</translation>
</message>
<message> <message>
<source>ADAPT_PREF_MG_ADAPT</source> <source>ADAPT_PREF_MG_ADAPT</source>
<translation>Adaptation with MG-Adapt</translation> <translation>Adaptation with MG-Adapt</translation>
@ -3216,6 +3224,10 @@ Use Display Entity menu command to show them.
<source>SMESH_Z</source> <source>SMESH_Z</source>
<translation>Z</translation> <translation>Z</translation>
</message> </message>
<message>
<source>SMESH_Z_SCALARBAR</source>
<translation>Z:</translation>
</message>
<message> <message>
<source>STATE_ALGO_MISSING</source> <source>STATE_ALGO_MISSING</source>
<translation>%3 %2D algorithm is missing</translation> <translation>%3 %2D algorithm is missing</translation>
@ -3312,6 +3324,10 @@ Use Display Entity menu command to show them.
<source>STB_MG_ADAPT</source> <source>STB_MG_ADAPT</source>
<translation>Remesh with MG_Adapt</translation> <translation>Remesh with MG_Adapt</translation>
</message> </message>
<message>
<source>STB_HOMARD_ADAPT</source>
<translation>Uniform refinement</translation>
</message>
<message> <message>
<source>STB_CONV_TO_QUAD</source> <source>STB_CONV_TO_QUAD</source>
<translation>Convert to/from quadratic</translation> <translation>Convert to/from quadratic</translation>
@ -4008,6 +4024,10 @@ Use Display Entity menu command to show them.
<source>TOP_MG_ADAPT</source> <source>TOP_MG_ADAPT</source>
<translation>Remesh with MG_Adapt</translation> <translation>Remesh with MG_Adapt</translation>
</message> </message>
<message>
<source>TOP_HOMARD_ADAPT</source>
<translation>Uniform refinement</translation>
</message>
<message> <message>
<source>TOP_CONV_TO_QUAD</source> <source>TOP_CONV_TO_QUAD</source>
<translation>Convert to/from quadratic</translation> <translation>Convert to/from quadratic</translation>

View File

@ -340,6 +340,10 @@
<source>MEN_MG_ADAPT</source> <source>MEN_MG_ADAPT</source>
<translation>Remaillage avec MG_Adapt</translation> <translation>Remaillage avec MG_Adapt</translation>
</message> </message>
<message>
<source>MEN_HOMARD_ADAPT</source>
<translation>Raffinement uniforme</translation>
</message>
<message> <message>
<source>Args</source> <source>Args</source>
<translation>Arguments</translation> <translation>Arguments</translation>
@ -1610,6 +1614,10 @@ Merci de les corriger, puis essayez de nouveau</translation>
<source>SMESH_AVAILABLE</source> <source>SMESH_AVAILABLE</source>
<translation>Disponible</translation> <translation>Disponible</translation>
</message> </message>
<message>
<source>SMESH_NOT_AVAILABLE</source>
<translation>Indisponible</translation>
</message>
<message> <message>
<source>SMESH_AVAILABLE_ALGORITHMS</source> <source>SMESH_AVAILABLE_ALGORITHMS</source>
<translation>Algorithmes disponibles</translation> <translation>Algorithmes disponibles</translation>
@ -1750,7 +1758,7 @@ Merci de les corriger, puis essayez de nouveau</translation>
</message> </message>
<message> <message>
<source>SMESH_CONTINUE_MESH_VISUALIZATION</source> <source>SMESH_CONTINUE_MESH_VISUALIZATION</source>
<translation>La système semble manquer de mémoire pour visualiser le maillage, <translation>Le système semble manquer de mémoire pour visualiser le maillage,
ce qui peut faire planter l'application. Voulez-vous continuer la visualisation ?</translation> ce qui peut faire planter l'application. Voulez-vous continuer la visualisation ?</translation>
</message> </message>
<message> <message>
@ -2816,6 +2824,10 @@ Référez-vous à la documentation sur l'algorithme et la géométrie supportée
</message> </message>
<message> <message>
<source>SMESH_RENUMBERING</source> <source>SMESH_RENUMBERING</source>
<translation>Renumérotation</translation>
</message>
<message>
<source>SMESH_RENUMBER</source>
<translation>Renuméroter</translation> <translation>Renuméroter</translation>
</message> </message>
<message> <message>
@ -3011,6 +3023,10 @@ Référez-vous à la documentation sur l'algorithme et la géométrie supportée
<source>ADAPT_PREF_NONE</source> <source>ADAPT_PREF_NONE</source>
<translation>Sans</translation> <translation>Sans</translation>
</message> </message>
<message>
<source>ADAPT_WITH_HOMARD</source>
<translation>Adaptation avec HOMARD</translation>
</message>
<message> <message>
<source>ADAPT_PREF_MG_ADAPT</source> <source>ADAPT_PREF_MG_ADAPT</source>
<translation>Adaptation avec MG-Adapt</translation> <translation>Adaptation avec MG-Adapt</translation>
@ -3203,6 +3219,10 @@ Utilisez le menu &quot;Visualiser une entité&quot; pour les afficher.
<source>SMESH_Z</source> <source>SMESH_Z</source>
<translation>Z</translation> <translation>Z</translation>
</message> </message>
<message>
<source>SMESH_Z_SCALARBAR</source>
<translation>Z :</translation>
</message>
<message> <message>
<source>STATE_ALGO_MISSING</source> <source>STATE_ALGO_MISSING</source>
<translation>Il manque l'algorithme %3 %2D</translation> <translation>Il manque l'algorithme %3 %2D</translation>
@ -3299,6 +3319,10 @@ Utilisez le menu &quot;Visualiser une entité&quot; pour les afficher.
<source>STB_MG_ADAPT</source> <source>STB_MG_ADAPT</source>
<translation>Remaillage avec MG_Adapt</translation> <translation>Remaillage avec MG_Adapt</translation>
</message> </message>
<message>
<source>STB_HOMARD_ADAPT</source>
<translation>Raffinement uniforme</translation>
</message>
<message> <message>
<source>STB_CONV_TO_QUAD</source> <source>STB_CONV_TO_QUAD</source>
<translation>Convertir vers/depuis quadratique</translation> <translation>Convertir vers/depuis quadratique</translation>
@ -3521,7 +3545,7 @@ Utilisez le menu &quot;Visualiser une entité&quot; pour les afficher.
</message> </message>
<message> <message>
<source>STB_DEFLECTION_2D</source> <source>STB_DEFLECTION_2D</source>
<translation>Deflection 2D</translation> <translation>Déflection 2D</translation>
</message> </message>
<message> <message>
<source>STB_MAP</source> <source>STB_MAP</source>
@ -3995,6 +4019,10 @@ Utilisez le menu &quot;Visualiser une entité&quot; pour les afficher.
<source>TOP_MG_ADAPT</source> <source>TOP_MG_ADAPT</source>
<translation>Remaillage avec MG_Adapt</translation> <translation>Remaillage avec MG_Adapt</translation>
</message> </message>
<message>
<source>TOP_HOMARD_ADAPT</source>
<translation>Raffinement uniforme</translation>
</message>
<message> <message>
<source>TOP_CONV_TO_QUAD</source> <source>TOP_CONV_TO_QUAD</source>
<translation>Convertir vers/de quadratique</translation> <translation>Convertir vers/de quadratique</translation>

View File

@ -115,6 +115,7 @@ SET(SMESHEngine_HEADERS
SMESH.hxx SMESH.hxx
SMESH_Component_Generator.hxx SMESH_Component_Generator.hxx
MG_ADAPT_i.hxx MG_ADAPT_i.hxx
SMESH_Homard_i.hxx
) )
# --- sources --- # --- sources ---
@ -144,6 +145,7 @@ SET(SMESHEngine_SOURCES
SMESH_PreMeshInfo.cxx SMESH_PreMeshInfo.cxx
SMESH_Component_Generator.cxx SMESH_Component_Generator.cxx
MG_ADAPT_i.cxx MG_ADAPT_i.cxx
SMESH_Homard_i.cxx
) )
# --- rules --- # --- rules ---

View File

@ -19,6 +19,8 @@
#include "MG_ADAPT_i.hxx" #include "MG_ADAPT_i.hxx"
#include CORBA_SERVER_HEADER(SMESH_Homard)
#include "MG_ADAPT.hxx" #include "MG_ADAPT.hxx"
#include "SMESH_File.hxx" #include "SMESH_File.hxx"
#include "SMESH_Gen_i.hxx" #include "SMESH_Gen_i.hxx"
@ -114,7 +116,8 @@ SMESH::MG_ADAPT_ptr SMESH_Gen_i::CreateAdaptationHypothesis()
return SMESH::MG_ADAPT_ptr(); return SMESH::MG_ADAPT_ptr();
#endif #endif
} }
SMESH::MG_ADAPT_OBJECT_ptr SMESH_Gen_i::Adaptation( const char* adaptationType) //SMESH::MG_ADAPT_OBJECT_ptr SMESH_Gen_i::Adaptation( const char* adaptationType)
SALOME::GenericObj_ptr SMESH_Gen_i::Adaptation( const char* adaptationType)
{ {
#ifndef DISABLE_MG_ADAPT #ifndef DISABLE_MG_ADAPT
if (!strcmp(adaptationType, "MG_Adapt")) if (!strcmp(adaptationType, "MG_Adapt"))
@ -124,6 +127,9 @@ SMESH::MG_ADAPT_OBJECT_ptr SMESH_Gen_i::Adaptation( const char* adaptationType)
return anObj._retn(); return anObj._retn();
} }
#endif #endif
if (!strcmp(adaptationType, "Uniform")) {
return CreateHOMARD_ADAPT();
}
return SMESH::MG_ADAPT_OBJECT_ptr(); return SMESH::MG_ADAPT_OBJECT_ptr();
} }
//============================================================================= //=============================================================================

View File

@ -1013,6 +1013,11 @@ void _pyGen::Process( const Handle(_pyCommand)& theCommand )
{ {
Handle(_pyMesh) mesh = new _pyMesh( theCommand ); Handle(_pyMesh) mesh = new _pyMesh( theCommand );
AddObject( mesh ); AddObject( mesh );
// set mesh name
_pyID id = mesh->GetID(), comma("'");
if ( myObjectNames.IsBound( id ))
theCommand->SetArg( theCommand->GetNbArgs() + 1,
comma + myObjectNames( id ) + comma);
return; return;
} }
if ( method == "CreateMeshesFromUNV" || if ( method == "CreateMeshesFromUNV" ||

View File

@ -477,8 +477,10 @@ public:
int CountInPyDump(const TCollection_AsciiString& text); int CountInPyDump(const TCollection_AsciiString& text);
SMESH::MG_ADAPT_ptr CreateMG_ADAPT(); SMESH::MG_ADAPT_ptr CreateMG_ADAPT();
SMESHHOMARD::HOMARD_Gen_ptr CreateHOMARD_ADAPT();
SMESH::MG_ADAPT_ptr CreateAdaptationHypothesis(); SMESH::MG_ADAPT_ptr CreateAdaptationHypothesis();
SMESH::MG_ADAPT_OBJECT_ptr Adaptation( const char* adaptationType); //SMESH::MG_ADAPT_OBJECT_ptr Adaptation( const char* adaptationType);
SALOME::GenericObj_ptr Adaptation( const char* adaptationType);
// ***************************************** // *****************************************
// Internal methods // Internal methods

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,310 @@
// Copyright (C) 2011-2021 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef _SMESH_HOMARD_I_HXX_
#define _SMESH_HOMARD_I_HXX_
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SMESH_Homard)
#include CORBA_CLIENT_HEADER(SALOMEDS)
#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
#include CORBA_CLIENT_HEADER(SMESH_Gen)
#include CORBA_CLIENT_HEADER(SMESH_Mesh)
#include "SMESH.hxx"
#include "SMESH_Homard.hxx"
//#include "FrontTrack.hxx"
#include "SALOME_Component_i.hxx"
#include "SALOME_NamingService.hxx"
#include "Utils_CorbaException.hxx"
#include <map>
#include <set>
#include <string>
#include <vector>
namespace SMESHHOMARD_I
{
class SMESH_I_EXPORT HOMARD_Boundary_i : public virtual SALOME::GenericObj_i,
public virtual POA_SMESHHOMARD::HOMARD_Boundary
{
public:
HOMARD_Boundary_i(SMESHHOMARD::HOMARD_Gen_var gen_i);
HOMARD_Boundary_i();
virtual ~HOMARD_Boundary_i();
// Generalites
void SetName(const char* Name);
char* GetName();
char* GetDumpPython();
// Caracteristiques
void SetType(CORBA::Long Type);
CORBA::Long GetType();
void SetMeshName(const char* MeshName);
char* GetMeshName();
void SetDataFile(const char* DataFile);
char* GetDataFile();
void SetCylinder(double Xcentre, double Ycentre, double ZCentre,
double Xaxe, double Yaxe, double Zaxe,
double rayon);
void SetSphere(double Xcentre, double Ycentre, double ZCentre,
double rayon);
void SetConeR(double Xcentre1, double Ycentre1, double Zcentre1, double Rayon1,
double Xcentre2, double Ycentre2, double Zcentre2, double Rayon2);
void SetConeA(double Xaxe, double Yaxe, double Zaxe, double Angle,
double Xcentre, double Ycentre, double ZCentre);
void SetTorus(double Xcentre, double Ycentre, double ZCentre,
double Xaxe, double Yaxe, double Zaxe,
double rayonRev, double rayonPri);
SMESHHOMARD::double_array* GetCoords();
void SetLimit(double Xincr, double Yincr, double Zincr);
SMESHHOMARD::double_array* GetLimit();
void AddGroup(const char* Group);
void SetGroups(const SMESHHOMARD::ListGroupType& ListGroup);
SMESHHOMARD::ListGroupType* GetGroups();
private:
SMESHHOMARDImpl::HOMARD_Boundary* myHomardBoundary;
SMESHHOMARD::HOMARD_Gen_var _gen_i;
};
class SMESH_I_EXPORT HOMARD_Cas_i : public virtual SALOME::GenericObj_i,
public virtual POA_SMESHHOMARD::HOMARD_Cas
{
public:
HOMARD_Cas_i(SMESHHOMARD::HOMARD_Gen_var gen_i);
HOMARD_Cas_i();
virtual ~HOMARD_Cas_i();
char* GetDumpPython();
// Caracteristiques
void SetDirName(const char* NomDir);
char* GetDirName();
void SetBoundingBox(const SMESHHOMARD::extrema& LesExtremes);
SMESHHOMARD::extrema* GetBoundingBox();
void AddGroup(const char* Group);
void SetGroups(const SMESHHOMARD::ListGroupType& ListGroup);
SMESHHOMARD::ListGroupType* GetGroups();
void AddBoundary(const char* Boundary);
void AddBoundaryGroup(const char* Boundary, const char* Group);
SMESHHOMARD::ListBoundaryGroupType* GetBoundaryGroup();
void SupprBoundaryGroup();
void AddIteration(const char* NomIteration);
private:
SMESHHOMARDImpl::HOMARD_Cas* myHomardCas;
SMESHHOMARD::HOMARD_Gen_var _gen_i;
};
class SMESH_I_EXPORT HOMARD_Iteration_i
{
public:
HOMARD_Iteration_i(SMESHHOMARD::HOMARD_Gen_var gen_i);
HOMARD_Iteration_i();
virtual ~HOMARD_Iteration_i();
// Generalites
void SetName(const char* Name);
char* GetName();
// Caracteristiques
void SetDirNameLoc(const char* NomDir);
char* GetDirNameLoc();
char* GetDirName();
void SetNumber(CORBA::Long NumIter);
CORBA::Long GetNumber();
void SetState(CORBA::Long etat);
CORBA::Long GetState();
void SetMeshName(const char* NomMesh);
char* GetMeshName();
void SetMeshFile(const char* MeshFile);
char* GetMeshFile();
void SetLogFile(const char* LogFile);
char* GetLogFile();
void SetFileInfo(const char* FileInfo);
char* GetFileInfo();
// Liens avec les autres structures
void SetCaseName(const char* NomCas);
char* GetCaseName();
// Drivers
void SetInfoCompute(CORBA::Long MessInfo);
CORBA::Long GetInfoCompute();
private:
SMESHHOMARDImpl::HOMARD_Iteration* myHomardIteration;
SMESHHOMARD::HOMARD_Gen_var _gen_i;
};
class SMESH_I_EXPORT HOMARD_Gen_i : public virtual SALOME::GenericObj_i,
public virtual POA_SMESHHOMARD::HOMARD_Gen
{
public:
HOMARD_Gen_i();
virtual ~HOMARD_Gen_i();
// Les creations
SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundary (const char* nomBoundary,
CORBA::Long typeBoundary);
SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundaryCAO (const char* nomBoundary,
const char* DataFile);
SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundaryDi (const char* nomBoundary,
const char* MeshName, const char* DataFile);
SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundaryCylinder
(const char* nomBoundary,
CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis,
CORBA::Double Rayon);
SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundarySphere
(const char* nomBoundary,
CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
CORBA::Double Rayon);
SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundaryConeR
(const char* nomBoundary,
CORBA::Double Xcentre1, CORBA::Double Ycentre1, CORBA::Double Zcentre1,
CORBA::Double Rayon1,
CORBA::Double Xcentre2, CORBA::Double Ycentre2, CORBA::Double Zcentre2,
CORBA::Double Rayon2);
SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundaryConeA
(const char* nomBoundary,
CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis,
CORBA::Double Angle,
CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre);
SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundaryTorus
(const char* nomBoundary,
CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis,
CORBA::Double RayonRev, CORBA::Double RayonPri);
SMESHHOMARD::HOMARD_Cas_ptr CreateCaseOnMesh (const char* MeshName,
SMESH::SMESH_Mesh_ptr smeshMesh,
const char* theWorkingDir);
SMESHHOMARD::HOMARD_Cas_ptr CreateCase (const char* MeshName,
const char* FileName,
const char* theWorkingDir);
HOMARD_Iteration_i* CreateIteration();
// Les informations
SMESHHOMARD::HOMARD_Boundary_ptr GetBoundary (const char* nomBoundary);
SMESHHOMARD::HOMARD_Cas_ptr GetCase ();
HOMARD_Iteration_i* GetIteration (CORBA::Long numIter);
SMESHHOMARD::listeBoundarys* GetAllBoundarysName();
void InvalideBoundary(const char* nomBoundary);
CORBA::Long DeleteBoundary(const char* nomBoundary);
void DeleteCase();
CORBA::Long DeleteIteration(int numIter);
void AddBoundary(const char* Boundary);
void AddBoundaryGroup(const char* Boundary, const char* Group);
void AssociateCaseIter(int numIter, const char* labelIter);
char* CreateDirNameIter(const char* nomrep, CORBA::Long num);
CORBA::Long Compute();
CORBA::Long ComputeAdap(SMESHHOMARDImpl::HomardDriver* myDriver);
CORBA::Long ComputeCAO();
CORBA::Long ComputeCAObis();
char* ComputeDirManagement();
char* ComputeDirPaManagement();
int DriverTexteBoundary(SMESHHOMARDImpl::HomardDriver* myDriver);
void PublishResultInSmesh(const char* NomFich);
void DeleteResultInSmesh(std::string NomFich, std::string MeshName);
void PythonDump();
// Preferences
void SetConfType (CORBA::Long theConfType);
void SetKeepMedOUT (bool theKeepMedOUT);
void SetPublishMeshOUT (bool thePublishMeshOUT);
void SetMeshNameOUT (const char* theMeshNameOUT);
void SetMeshFileOUT (const char* theMeshFileOUT);
void SetVerboseLevel (CORBA::Long theVerboseLevel);
void SetKeepWorkingFiles(bool theKeepWorkingFiles);
void SetLogInFile(bool theLogInFile);
void SetLogFile (const char* theLogFile);
void SetRemoveLogOnSuccess(bool theRemoveLogOnSuccess);
private:
SMESHHOMARD::HOMARD_Boundary_ptr newBoundary();
SMESHHOMARD::HOMARD_Cas_ptr newCase();
HOMARD_Iteration_i* newIteration();
private:
SMESHHOMARDImpl::HOMARD_Gen* myHomard;
HOMARD_Iteration_i* myIteration0;
HOMARD_Iteration_i* myIteration1;
SMESHHOMARD::HOMARD_Cas_var myCase;
std::map<std::string, SMESHHOMARD::HOMARD_Boundary_var> _mesBoundarys;
// Preferences
int _ConfType; // Le type de conformite ou non conformite
bool _KeepMedOUT;
bool _PublishMeshOUT;
bool _KeepWorkingFiles;
bool _LogInFile;
bool _RemoveLogOnSuccess;
int _VerboseLevel;
std::string _MeshNameOUT;
std::string _MeshFileOUT;
std::string _LogFile;
// Input data type
bool _CaseOnMedFile;
SMESH::SMESH_Mesh_var _SmeshMesh;
std::string _TmpMeshFile;
};
SMESH_I_EXPORT std::vector<double> GetBoundingBoxInMedFile(const char * aFile);
SMESH_I_EXPORT std::set<std::string> GetListeGroupesInMedFile(const char * aFile);
}; // namespace SMESHHOMARD_I
#endif