From: jrt Date: Tue, 16 Mar 2004 09:19:42 +0000 (+0000) Subject: Add a small tutorial. X-Git-Tag: V1_5_0~9 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=81b204aced7ac400c92cafd7de9b45fd2820fbd8 Add a small tutorial. --- diff --git a/doc/html/SMESHTutorial_1/ControlFeature.png b/doc/html/SMESHTutorial_1/ControlFeature.png new file mode 100644 index 000000000..82222c47c Binary files /dev/null and b/doc/html/SMESHTutorial_1/ControlFeature.png differ diff --git a/doc/html/SMESHTutorial_1/ImportResult.png b/doc/html/SMESHTutorial_1/ImportResult.png new file mode 100644 index 000000000..55c5a2b31 Binary files /dev/null and b/doc/html/SMESHTutorial_1/ImportResult.png differ diff --git a/doc/html/SMESHTutorial_1/MeshInit.png b/doc/html/SMESHTutorial_1/MeshInit.png new file mode 100644 index 000000000..c9c4c1603 Binary files /dev/null and b/doc/html/SMESHTutorial_1/MeshInit.png differ diff --git a/doc/html/SMESHTutorial_1/MeshResult.png b/doc/html/SMESHTutorial_1/MeshResult.png new file mode 100644 index 000000000..4072ea8f3 Binary files /dev/null and b/doc/html/SMESHTutorial_1/MeshResult.png differ diff --git a/doc/html/SMESHTutorial_1/MeshResult2.png b/doc/html/SMESHTutorial_1/MeshResult2.png new file mode 100644 index 000000000..c7e9e37c2 Binary files /dev/null and b/doc/html/SMESHTutorial_1/MeshResult2.png differ diff --git a/doc/html/SMESHTutorial_1/SMESHOverview.png b/doc/html/SMESHTutorial_1/SMESHOverview.png new file mode 100644 index 000000000..2e61dd3ec Binary files /dev/null and b/doc/html/SMESHTutorial_1/SMESHOverview.png differ diff --git a/doc/html/SMESHTutorial_1/SMESHTutorial_1.html b/doc/html/SMESHTutorial_1/SMESHTutorial_1.html new file mode 100644 index 000000000..bac9ce618 --- /dev/null +++ b/doc/html/SMESHTutorial_1/SMESHTutorial_1.html @@ -0,0 +1,230 @@ + + + + + Geometry module in SALOME environnement + + + +

SMESH starting tutorial

+ +

2D meshing with MEFISTO

+ +

Overview

+ +

Before following this tutorial you need to create or import a geometry. +Please refere to the GEOM module documentation to do so.

+ +

Now we have to load SMESH component. To do so :

+ + +

SMESH is used to mesh edges, faces and volums each one thanks to a +specialised algorithm. To mesh an entity which degree is n, one must have all +its lower degree entities meshed. For instance, to mesh a face requires a +previous meshing of all its edges. In the example MEFISTO meshes faces, and +Regular_1D meshes edges. MEFISTO doesn't check how edges are meshed. The only +test it does is to verify that edges are meshed before starting its work. +MEFISTO requires an hypothesis : maximum area of triangles. Regular_1D +requires one hypothesis among two: number of segments per edge or +length of segment. 

+ +

The entire operation is done by :

+
    +
  1. init a mesh object associated to a geometrical object
  2. +
  3. choosing an algorithm for meshing faces, here MEFISTO is + choosen
  4. +
  5. choosing an algorithm for meshing edges, here Regular1d is + choosen
  6. +
  7. creating hypothesis of calculation. We need to inform : +
      +
    • the number of segments per edge
    • +
    • the maximum area per triangle of meshing
    • +
    +
  8. +
  9. setting or attaching algorithm and hypothesis to the object loaded
  10. +
  11. launching computation
  12. +
  13. displaying the result in the best mode.
  14. +
+ + +

Details

+ +

Below are explained those 6 steps precisely :

+
    +
  1. init a mesh object associated to a geometrical object :

    +

    +
      +
    • In the menu bar on the top, find the Mesh menu and click on + Init.
    • +
    • Then in the dialog box select the topology into Geometry field of + ObjectBrowser or Viewer, give a name an click on Ok.
    • +
    • The topology is now known inside SMESH component.
    • +
    +
  2. +
  3. define algorithms for meshing :

    +

    +
      +
    • In the menu bar, find Hypothesis, Algorithm then + click on Mefisto.
    • +
    • Do the same to load 'Regular1D'.
    • +
    • Remember, Regular1D is needed for edge meshing.
    • +
    +
  4. +
  5. define hypothesis of calculation :
    + In the menu bar, find Hypothesis then Hypothesis and click on + Segments. Then in the dialog box give a name for hypothesis and a + value that is the number of segments per edge. Enter 7 segments for + example.
    + Do the same for 'Max. Element Area' argument that is the maximum surface + of triangles builded during meshing. Enter 2500 here.

    +
  6. +
  7. Attach previous arguments (hypothesis) and algorithm to the + topology :
    + Select the object in the Object Browser then using pop up menu (right + click on object),
    + 'Set algorithm' and 'Set Hypothesis' into specialized dialog boxes.
    + You can also find these methods in the menu 'Hypothesis'.

    +
  8. +
  9. Selecting the mesh object before, start computation in the pop up + menu; click on 'Compute'.

    +
  10. +
  11. Update the display using 'Update' if necessary.
    + Note : in Preferencies / Mesh menu there is an + option to have an automatic update of the display after operations that + modify it such as Compute, adding nodes… If this option is not + setted user must make an update of the display manually.
    +
    + You may also adjust the display 'Properties' / 'Display Mode' has + you prefer ; shading, wireframe or shrink,
    + and adjust color and size attributs in a specific dialog box shown + below.

    +

    +
  12. +
+ +

Final result of meshing

+ +

At this final step you can observe the result of 2D meshing of faces by +MEFISTO.

+ +

Note : it is possible to change an hypothesis by mean the pop up then +Edit and finally compute again.

+ +

+ +

Meshing with global and local hypothesis

+ +

details

+ +

We would now make a mesh as before but with a local modification of +parameter (hypothesis) on an edge. We first have to explode the initial +topology in GEOMETRY component. This operation will give us access to sub +shapes edges of geom.brep.

+
    +
  1. import or create a geometry as before

    +
  2. +
  3. call 'Explode' method found in 'New Entity' on the menu bar ; + (remember the tip about Automatic/Store !)

    +

    +
  4. +
  5. select the main object, choose 'Edge' in the combo box and click on + Ok.
    + Note : do not click on 'select sub shape' at anytime. This + function is used with OCC viewer for individual sub shape selection not + yet available with VTK.
    +
    + Now the object browser contents all edges as sub shapes of the main + topology. Select the first edge Edge_ 1 and display only it. + Use the pop up 'Display only' mode for this.
    + You may also rename the edge to remember it for future meshing.
    + Our scope : apply a local hypothesis on this edge.
    +

    +
  6. +
  7. The job is now finished for GEOMETRY component.

    +
  8. +
  9. Load SMESH component and use menus 'Mesh' and 'Init' to load the + topology into SMESH as before.
    + (Already defined if you have kept the previous study.)

    +
  10. +
  11. Define algorithms Regular_1D and Mefisto using menus 'Hypothesis' + and 'Algorithm'.

    +
  12. +
  13. Define hypothesis 'Segments' = 7 and 'Max. Element Area' = 2500. + (Already defined if…)

    +
  14. +
  15. Define another hypothesis 'Local length' = 100 to be used only as + local parameter for the edge.

    +
  16. +
  17. Now we have to attach algorithms and hypothesis to topologies, the + global and the sub shape edge.
    + For the main topology, select it and use 'Set algorithms' and 'Set + Hypothesis' and attach :
    + hypothesis 'Segments' = 7 and 'Max. Element Area' = 2500.

    +
  18. +
  19. To set a local parameter of meshing on the edge we do :
    + click on 'Mesh' menu then 'Add Sub Mesh'. On the dialog box select the + main object then sub object edge from Object Browser and GEOMETRY field. + Give it a local name; for example myEdge or anyone.

    +

    +
  20. +
  21. Set the algorithm used for edge meshing. Here use Regular_ 1D. +

    +
  22. +
  23. Set a local hypothesis to the edge. Use 'Local length' = 100.

    +
  24. +
  25. 'Compute' (and 'Update' display if necessary see + before) the main mesh object. This will compute also the edge sub + shape.
    + Do not forget to activate the display mode Wireframe, + Shading or Shrink; see in pop up menu 'Properties', + 'Display mode'…

    +
  26. +
  27. Move the point of view to watch the edge meshed with a local + hypothesis 'Local length' = 100.

    +
  28. +
+ +

The result of second meshing

+ +

As we see below, the effect produced by setting a local hypothesis setted +on the edge Edge_ 1.

+ +

Compare to another edge that have the same physical +length.

+ +

+ +

Using PYTHON interpretor to import an example script

+It is easy to import an example of meshing procedure using PYTHON interpretor +: + +This imported example is very similar to the last exercice. It uses a local +hypothesis on an edge too. + +

+ +

Control features

+ +

Test now a control function of area for mesh resulting triangles.

+ +

Find Control on the menu bar then Cells and Area. The +image below displays areas with a color depending on its value in the scalar +bar shown on the left.
+Scalar bar general parameters are setted in Preferencies / +Mesh / Scalar Bar.

+ +

Specific range parameters are changed with the pop up menu.

+ +

+ + diff --git a/doc/html/SMESHTutorial_1/SelectAlgorithms.png b/doc/html/SMESHTutorial_1/SelectAlgorithms.png new file mode 100644 index 000000000..c69f3e4ba Binary files /dev/null and b/doc/html/SMESHTutorial_1/SelectAlgorithms.png differ diff --git a/doc/html/SMESHTutorial_1/SetColor.png b/doc/html/SMESHTutorial_1/SetColor.png new file mode 100644 index 000000000..bda5fd568 Binary files /dev/null and b/doc/html/SMESHTutorial_1/SetColor.png differ diff --git a/doc/html/SMESHTutorial_1/SubMeshContruction.png b/doc/html/SMESHTutorial_1/SubMeshContruction.png new file mode 100644 index 000000000..1080f08fe Binary files /dev/null and b/doc/html/SMESHTutorial_1/SubMeshContruction.png differ diff --git a/doc/html/SMESHTutorial_1/SubShapesSelection.png b/doc/html/SMESHTutorial_1/SubShapesSelection.png new file mode 100644 index 000000000..c5df40b20 Binary files /dev/null and b/doc/html/SMESHTutorial_1/SubShapesSelection.png differ