From e85ddd2bb09fa022663c6ba843796aa71151779f Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 18 Mar 2014 17:28:37 +0400 Subject: [PATCH] 22504: [CEA 1078] The creation of a sub-mesh UseExistingFaces suppresses the created elements Rename the algorithms in the dialog box: - Use existing faces => Use faces to be created manually - Use existing 2D elements => Import 1D-2D elements from another mesh - Use existing edges => Use edges to be created manually - Use existing 1D elements => Import 1D elements from another mesh --- .../examples/defining_hypotheses_ex16.py | 2 +- doc/salome/examples/use_existing_faces.py | 6 ++-- .../gui/SMESH/input/basic_meshing_algos.doc | 4 +-- .../gui/SMESH/input/constructing_meshes.doc | 17 ++++++----- .../gui/SMESH/input/smeshpy_interface.doc | 2 +- .../SMESH/input/tui_defining_hypotheses.doc | 4 +-- .../SMESH/input/tui_use_existing_faces.doc | 6 ++-- .../gui/SMESH/input/use_existing_algos.doc | 30 ++++++++++--------- resources/StdMeshers.xml.in | 8 ++--- 9 files changed, 42 insertions(+), 37 deletions(-) diff --git a/doc/salome/examples/defining_hypotheses_ex16.py b/doc/salome/examples/defining_hypotheses_ex16.py index 9125787b2..ce11e3e40 100644 --- a/doc/salome/examples/defining_hypotheses_ex16.py +++ b/doc/salome/examples/defining_hypotheses_ex16.py @@ -1,4 +1,4 @@ -# "Use Existing Elements" example +# "Import 2D Elements from Another Mesh" example import salome salome.salome_init() diff --git a/doc/salome/examples/use_existing_faces.py b/doc/salome/examples/use_existing_faces.py index 631316444..c4b95fdaf 100644 --- a/doc/salome/examples/use_existing_faces.py +++ b/doc/salome/examples/use_existing_faces.py @@ -1,4 +1,4 @@ -# Use existing faces algorithm +# Usage of "Use Faces to be Created Manually" algorithm import salome @@ -109,8 +109,8 @@ mesh.Compute() # compute 2D mesh mesh.Quadrangle() -mesh.UseExistingFaces(f1) # UseExistingFaces() allows using my2DMeshing() -mesh.UseExistingFaces(f2) +mesh.UseExistingFaces(f1) # UseExistingFaces() allows using my2DMeshing(); +mesh.UseExistingFaces(f2) # assign UseExistingFaces() BEFORE calling my2DMeshing()! my2DMeshing( f1 ) my2DMeshing( f2 ) assert mesh.Compute() diff --git a/doc/salome/gui/SMESH/input/basic_meshing_algos.doc b/doc/salome/gui/SMESH/input/basic_meshing_algos.doc index 142ca62f4..e76863e8a 100644 --- a/doc/salome/gui/SMESH/input/basic_meshing_algos.doc +++ b/doc/salome/gui/SMESH/input/basic_meshing_algos.doc @@ -59,8 +59,8 @@ There is also a number of more specific algorithms:
  • \subpage prism_3d_algo_page "for meshing prismatic shapes"
  • \subpage radial_quadrangle_1D2D_algo_page "for meshing special 2d faces (circles and part of circles)"
  • -\ref use_existing_anchor "Use existing edges" and -\ref use_existing_anchor "Use existing faces" algorithms can be +\ref use_existing_anchor "Use Edges to be Created Manually" and +\ref use_existing_anchor "Use Faces to be Created Manually" algorithms can be used to create a 1D or a 2D mesh in a python script. \ref constructing_meshes_page "Constructing meshes" page describes in diff --git a/doc/salome/gui/SMESH/input/constructing_meshes.doc b/doc/salome/gui/SMESH/input/constructing_meshes.doc index b0538b7b9..b6c687bb0 100644 --- a/doc/salome/gui/SMESH/input/constructing_meshes.doc +++ b/doc/salome/gui/SMESH/input/constructing_meshes.doc @@ -347,26 +347,29 @@ By default, the information box is always shown after mesh computation operation

    \anchor use_existing_anchor -

    "Use existing edges" and "Use existing faces" algorithms

    +

    "Use Edges to be Created Manually" and "Use Faces to be Created Manually" algorithms

    It is possible to create a 1D or a 2D mesh in a python script (using AddNode, AddEdge and AddFace commands) and then use such sub-meshes in the construction of a 2D or a 3D mesh. For -this, there exist two algorithms: Use existing edges and Use - existing faces. -For example, you want to use standard algorithms to generate 1D and 3D +this, there exist two algorithms: Use Edges to be Created +Manually and Use Faces to be Created Manually. +Imagine, you want to use standard algorithms to generate 1D and 3D meshes and to create 2D mesh by your python code. Then you
    1. create a mesh object, assign a 1D algorithm,
    2. invoke \b Compute command, which computes a 1D mesh,
    3. -
    4. assign Use existing faces and a 3D algorithm,
    5. +
    6. assign Use Faces to be Created Manually and a 3D algorithm,
    7. run your python code, which creates a 2D mesh,
    8. invoke \b Compute command, which computes a 3D mesh.
    +\warning Use Edges to be Created Manually and Use Faces to +be Created Manually algorithms should be assigned _before_ +mesh generation by the Python code. Consider trying a sample script demonstrating the usage of -\ref tui_use_existing_faces "Use existing faces" algorithm for -construction of a 2D mesh using Python commands. +\ref tui_use_existing_faces "Use Faces to be Created Manually" +algorithm for construction of a 2D mesh using Python commands. \image html use_existing_face_sample_mesh.png Mesh computed by \ref tui_use_existing_faces "the sample script" diff --git a/doc/salome/gui/SMESH/input/smeshpy_interface.doc b/doc/salome/gui/SMESH/input/smeshpy_interface.doc index c3bb2ae18..df7e15967 100644 --- a/doc/salome/gui/SMESH/input/smeshpy_interface.doc +++ b/doc/salome/gui/SMESH/input/smeshpy_interface.doc @@ -24,7 +24,7 @@ Note that these functions either encapsulate the python programming interface of The functions are distributed in the python package \b salome.smesh. \note -The main package \bsalome contains other sub-packages that are distributed with the other +The main package \b salome contains other sub-packages that are distributed with the other SALOME modules. For example, the KERNEL module provides the python package \b salome.kernel and GEOM the package \b salome.geom. diff --git a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc index 863bf76e7..fe1eb4ae1 100644 --- a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc +++ b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc @@ -37,7 +37,7 @@ This page provides example codes of \ref tui_defining_meshing_algos
  • \ref tui_quadrangle_parameters "Quadrangle Parameters" hypothesis
  • -
  • \ref tui_import "Use Existing Elements" algorithm
  • +
  • \ref tui_import "Import 2D Elements from Another Mesh" algorithm

  • @@ -124,7 +124,7 @@ This page provides example codes of \ref tui_defining_meshing_algos \tui_script{defining_hypotheses_ex15.py} \anchor tui_import -

    "Use Existing Elements" example

    +

    "Import 2D Elements from Another Mesh" example

    \tui_script{defining_hypotheses_ex16.py} \anchor tui_viscous_layers diff --git a/doc/salome/gui/SMESH/input/tui_use_existing_faces.doc b/doc/salome/gui/SMESH/input/tui_use_existing_faces.doc index ddc56cb83..03928c38b 100644 --- a/doc/salome/gui/SMESH/input/tui_use_existing_faces.doc +++ b/doc/salome/gui/SMESH/input/tui_use_existing_faces.doc @@ -1,9 +1,9 @@ /*! -\page tui_use_existing_faces Use existing faces algorithm +\page tui_use_existing_faces Usage of "Use Faces to be Created Manually" algorithm -This sample demonstrates how to use Use existing faces algorithm, -which is actulally just a stub allowing to use your own 2D algoritm +This sample demonstrates how to use Use Faces to be Created Manually algorithm, +which is actually just a stub allowing to use your own 2D algorithm implemented in Python. \tui_script{use_existing_faces.py} diff --git a/doc/salome/gui/SMESH/input/use_existing_algos.doc b/doc/salome/gui/SMESH/input/use_existing_algos.doc index 79f718510..98ace8ad0 100644 --- a/doc/salome/gui/SMESH/input/use_existing_algos.doc +++ b/doc/salome/gui/SMESH/input/use_existing_algos.doc @@ -1,8 +1,9 @@ /*! -\page import_algos_page Use Existing Elements Algorithms +\page import_algos_page "Import nD Elements from Another Mesh" Algorithms -\n Use Existing Elements algorithms allow to define the mesh of a geometrical +\n Import nD Elements from Another Mesh algorithms allow to +define the mesh of a geometrical object by importing suitably located mesh elements from another mesh. The mesh elements to import from the other mesh should be contained in groups. If several groups are used to mesh the same geometry, validity of @@ -17,13 +18,14 @@ part, by storing meshes of parts in files and then fusing them together using these algorithms.
    -Use Existing 1D Elements algorithm allows to define the mesh of -a geometrical edge (or group of edges) +Import 1D Elements from Another Mesh algorithm allows to define +the mesh of a geometrical edge (or group of edges) by importing mesh edges contained in a group (or groups) from another mesh. -\n To apply this algorithm select the edge to be meshed (indicated in +
    +To apply this algorithm select the edge to be meshed (indicated in the field \b Geometry of Create mesh dialog box), -Use existing 1D elements in the list of 1D algorithms and click the -"Add Hypothesis" button. +Import 1D Elements from Another Mesh in the list of 1D +algorithms and click the "Add Hypothesis" button. The following dialog box will appear: \image html hyp_source_edges.png @@ -38,16 +40,16 @@ mesh. In this case To copy groups checkbox allows to create the same groups as in the imported source mesh. -Use Existing 2D Elements algorithm allows to define the mesh of -a geometrical face (or group of faces) +Import 2D Elements from Another Mesh algorithm allows to define +the mesh of a geometrical face (or group of faces) by importing mesh faces contained in a group (or groups) from another (or this) mesh. 1D elements on the boundary of the geometrical face (if not yet present) are also created by the algorithm in conformity -with the created 2D elements. -\n To apply this algorithm select the geometrical face to be meshed (indicated in +with the created 2D elements.
    +To apply this algorithm select the geometrical face to be meshed (indicated in the field \b Geometry of Create mesh dialog box), -Use existing 2D elements in the list of 2D algorithms and click the -"Add Hypothesis" button. +Import 2D Elements from Another Mesh in the list of 2D +algorithms and click the "Add Hypothesis" button. The following dialog box will appear: \image html hyp_source_faces.png @@ -63,7 +65,7 @@ the same groups as in the imported source mesh.
    See Also a sample TUI Script of a -\ref tui_import "Use Existing Elements Algorithms". +\ref tui_import "Import 2D Elements from Another Mesh". */ diff --git a/resources/StdMeshers.xml.in b/resources/StdMeshers.xml.in index 68b0b8c22..b505c44f4 100644 --- a/resources/StdMeshers.xml.in +++ b/resources/StdMeshers.xml.in @@ -379,7 +379,7 @@