X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fsalome%2Fgui%2FSMESH%2Finput%2Fpattern_mapping.doc;h=ef7f8ba66a704be2910dfba199764ad1a3e4665f;hb=d8f644ca3d4ce62f2ef41d4aacb52f5bb1221df3;hp=1a48a4644bd640170c6d49e32cdd5a6f7e6960e5;hpb=b178526bb0aa12bfca34690cb0df0084fd58b9c6;p=modules%2Fsmesh.git diff --git a/doc/salome/gui/SMESH/input/pattern_mapping.doc b/doc/salome/gui/SMESH/input/pattern_mapping.doc index 1a48a4644..ef7f8ba66 100644 --- a/doc/salome/gui/SMESH/input/pattern_mapping.doc +++ b/doc/salome/gui/SMESH/input/pattern_mapping.doc @@ -5,33 +5,31 @@

About patterns

The pattern describes a mesh to generate: positions of nodes within a -geometrical domain and nodal connectivity of elements. As well, a -pattern specifies the so-called key-points, i.e. nodes that will be -located at geometrical vertices. Pattern description is stored in +geometrical domain and nodal connectivity of elements. A +pattern also specifies the so-called key-points, i.e. the nodes that will be +located at geometrical vertices. The pattern description is stored in \.smp file. The smp file contains 4 sections: --# The first line holds the total number of the pattern nodes (N). --# The next N lines describe nodes coordinates. Each line holds 2 -coordinates of a node for 2D pattern or 3 cordinates for 3D pattern. -Note, that for 3D pattern only relateive values in range [0;1] are -valid for coordinates of the nodes. --# A key-points line: indices of nodes to be mapped on geometrical -vertices (for 2D pattern only). An index n refers to a node described -on an n-th line of section 2. The first node index is zero. For 3D -pattern key points are not specified. --# The rest lines describe nodal connectivity of elements, one line -for an element. A line holds indices of nodes forming an element. An -index n refers to a node described on an n-th line of the section -2. The first node index is zero. There must be 3 or 4 indices on a -line for 2D pattern (only 2d elements are allowed) and 4, 5, 6 or 8 -indices for 3D pattern (only 3d elements are allowed). - -The 2D pattern must contain at least one element and at least one -key-point. All key-points must lay on boundaries. - -The 3D pattern must contain at least one element. +-# The first line indicates the total number of pattern nodes (N). +-# The next N lines describe nodes coordinates. Each line contains 2 +node coordinates for a 2D pattern or 3 node cordinates for a 3D pattern. +Note, that node coordinates of a 3D pattern can be defined only by relative values in range [0;1]. +-# The key-points line contains the indices of the nodes to be mapped on geometrical +vertices (for a 2D pattern only). Index n refers to the node described +on the n-th line of section 2. The index of the first node zero. For a 3D pattern the key points are not specified. +-# The remaining lines describe nodal connectivity of elements, one line +for each element. Each line holds indices of nodes forming an element. +Index n refers to the node described on the n-th line of section 2. +The first node index is zero. There must be 3 or 4 indices on each +line for a 2D pattern (only 2d elements are allowed) and 4, 5, 6 or 8 +indices for a 3D pattern (only 3d elements are allowed). + +A 2D pattern must contain at least one element and at least one +key-point. All key-points must lie on boundaries. + +A 3D pattern must contain at least one element. An example of a simple 2D pattern smp file: @@ -60,7 +58,7 @@ An example of a simple 2D pattern smp file: 8 1 2 \endcode -The image below provides a preview of above described pattern: +The image below provides a preview of the above pattern: \image html pattern2d.png @@ -99,91 +97,120 @@ From the \b Modification menu choose the Pattern Mapping item or click \image html image98.png
"Pattern mapping" button
-The following dialog box shall appear: +The following dialog box will appear: + +\n For a 2D pattern \image html patternmapping1.png -
2D Pattern Mapping dialog box
+In this dialog you should specify: + + + +\n For a 3D pattern \image html patternmapping2.png -
3D Pattern Mapping dialog box
+In this dialog you should specify: + + +\n Automatic Generation + +To generate a pattern automatically from an existing mesh or submesh, +click \b New button. + +The following dialog box will appear: -To apply a pattern to a geometrical object, you should specify: +\image html a-patterntype1.png --# For 2D pattern - - A face having the number of vertices equal to the number of - key-points in the pattern; the number of key-points on internal - boundaries of a pattern must also be equal to the number of vertices - on internal boundaries of a face; - - A vertex to which the first key-point should be mapped; - - Reverse or not the order of key-points. (The order of vertices of - a face is counterclockwise looking from outside). --# For 3D pattern - - 3D block (Solid) object; - - Two vertices that specify the order of nodes in the resulting - mesh. - -Then you either load a .smp pattern file previously created manually -by clicking on the "Load pattern" button, or click on the \b -New button for automatic generation of the pattern. - -For an automatic generation you just specify a geometrical face (for -2D) or solid (for 3d) having a mesh built on it. Mesh nodes lying on -face vertices become key-points of 2D pattern. Additionally, for 2D -pattern you may choose the way of getting nodes coordinates by -projecting nodes on the face instead of using -"positions on face" generated by mesher (if there is any). Faces -having a seam edge can't be used for automatic pattern creation. - -When creating a pattern from an existing mesh, there are two possible -cases: - -- A sub-mesh on face/solid is selected. A pattern is created from the 2d/3d -elements bound to a face/solid by mesher. For 2D pattern, node coordinates are either -"positions on face" computed by mesher, or coordinates got by node -projection on a geometrical surface, according to the user choice. For -3D pattern, nodes coordinates correspond to the nodes computed by mesher. -- A mesh where the main shape is a face/solid, is selected. A pattern is -created from all the 2d/3d elements in a mesh. In addition, for 2D -pattern, if all mesh elements are build by mesher, the user can select -the way of getting nodes coordinates, else all nodes are projected on -a face surface. +In this dialog you should specify: -\image html a-patterntype.png + -
2D Pattern Creation dialog box
+When a pattern is created from an existing mesh, two cases are possible: -\image html a-patterntype1.png +- A sub-mesh on a face/solid is selected. The pattern is created from the 2d/3d +elements bound to the face/solid by the mesher. For a 2D pattern, the node coordinates are either +"positions on face" computed by the mesher, or coordinates got by node +projection on a geometrical surface, according to the user choice. For +a 3D pattern, the node coordinates correspond to the nodes computed by +the mesher. +- A mesh, where the main shape is a face/solid, is selected. The pattern is +created from all 2d/3d elements in a mesh. In addition, if all mesh +elements of a 2D pattern are built by the mesher, the user can select +how to get node coordinates, otherwise all nodes are projected on +a face surface. -
3D Pattern Creation dialog box

Mapping algorithm

-The mapping algorithm for 2D case is as follows: - -- Key-points are set in the order that they are encountered when - walking along a pattern boundary so that elements are on the left. The - first key-point is preserved. -- Find geometrical vertices corresponding to key-points by vertices - order in a face boundary; here, "Reverse order of key-points" flag is - taken into account. \image html image95.gif -- Boundary nodes of a pattern are mapped onto edges of a face: a - node located between certain key-points on a pattern boundary is - mapped on a geometrical edge limited by corresponding geometrical - vertices. Node position on an edge reflects its distance from two - key-points. \image html image96.gif -- Coordinates of a non-boundary node in a parametric space of a face - are defined as following. In a parametric space of a pattern, a node - lays at the intersection of two iso-lines, each of which intersects a - pattern boundary at least at two points. Knowing mapped positions of - boundary nodes, we find where isoline-boundary intersection points are - mapped to, and hence we can find mapped isolines direction and then, - two node positions on two mapped isolines. The eventual mapped - position of a node is found as an average of positions on mapped - isolines. \image html image97.gif - -For 3D case the algorithm is similar. +The mapping algorithm for a 2D case is as follows: + +- The key-points are set counterclockwise in the order corresponding + to their location on the pattern boundary. The first key-point is preserved. +- The geometrical vertices corresponding to the key-points are found + on face boundary. Here, "Reverse order of key-points" flag is set. +\image html image95.gif +- The boundary nodes of the pattern are mapped onto the edges of the face: a + node located between two key-points on the pattern boundary is + mapped on the geometrical edge limited by the corresponding geometrical + vertices. The node position on the edge depends on its distance from the + key-points. +\image html image96.gif +- The cordinates of a non-boundary node in the parametric space of the face + are defined in the following way. In the parametric space of the + pattern, the node lies at the intersection of two iso-lines. Both + of them intersect the pattern boundary at two + points at least. If the mapped positions of boundary nodes are known, it is + possible to find, where the points at the intersection of isolines + and boundaries are mapped. Then it is possible to find + the direction of mapped isolinesection and, filally, the poitions of + two nodes on two mapped isolines. The eventual mapped + position of the node is found as an average of the positions on mapped + isolines. +\image html image97.gif + +The 3D algorithm is similar. See Also a sample TUI Script of a \ref tui_pattern_mapping "Pattern Mapping" operation.