3 \page pattern_mapping_page Pattern mapping
5 <br><h2>About patterns</h2>
7 The pattern describes a mesh to generate: positions of nodes within a
8 geometrical domain and nodal connectivity of elements. As well, a
9 pattern specifies the so-called key-points, i.e. nodes that will be
10 located at geometrical vertices. Pattern description is stored in
11 \<pattern_name\>.smp file.
13 The smp file contains 4 sections:
15 <li>The first line holds the number of nodes (N).</li>
17 <li>The next N lines describe nodes coordinates. Each line holds 2
18 coordinates of a node.</li>
20 <li>A key-points line: indices of nodes to be mapped on geometrical
21 vertices. An index n refers to a node described on an n-th line of
22 section 2. The first node index is zero.</li>
24 <li>The rest lines describe nodal connectivity of elements, one line
25 for an element. A line holds indices of nodes forming an element. An
26 index n refers to a node described on an n-th line of the section
27 2. The first node index is zero. There must be 3 or 4 indices on a
28 line: only 2d elements are allowed.</li>
31 The 2D pattern must contain at least one element and at least one
32 key-point. All key-points must lay on boundaries.
34 An example of a simple smp file and a preview of a pattern described
37 \image html image94.gif
39 <br><h2>Application of pattern mapping</h2>
41 <em>To apply pattern mapping to a geometrical object:</em>
43 From the \b Modification menu choose the <b>Pattern Mapping</b> item or click
44 <em>"Pattern mapping"</em> button in the toolbar.
46 \image html image98.gif
47 <center><em>"Pattern mapping" button</em></center>
49 The following dialog box shall appear:
51 \image html patternmapping1.png
53 \image html patternmapping2.png
55 To apply a pattern to a geometrical object, you should specify:
57 <li>a face having the number of vertices equal to the number of
58 key-points in the pattern; the number of key-points on internal
59 boundaries of a pattern must also be equal to the number of vertices
60 on internal boundaries of a face;</li>
61 <li>a vertex to which the first key-point should be mapped;</li>
62 <li>reverse or not the order of key-points. (The order of vertices of
63 a face is counterclockwise looking from outside).</li>
66 Then you either load a .smp pattern file previously created manually
67 by clicking on the <em>"Load pattern"</em> button, or click on the \b
68 New button for automatic generation.
69 \n For an automatic generation you just specify a geometrical face
70 having a mesh built on it. Mesh nodes lying on face vertices become
71 key-points. Additionally, you may choose the way of getting nodes
72 coordinates by <b>projecting nodes on the face</b> instead of using
73 "positions on face" generated by mesher (if there is any). Faces
74 having a seam edge can?t be used for automatic pattern creation.
76 When creating a pattern from an existing mesh, there are two possible
79 <li>A sub-mesh on face is selected. A pattern is created from the 2d
80 elements bound to a face by mesher. Node coordinates are either
81 "positions on face" computed by mesher, or coordinates got by node
82 projection on a geometrical surface, according to your choice.</li>
83 <li>A mesh where the main shape is a face, is selected. A pattern is
84 created from all the 2d elements in a mesh. If all mesh elements are
85 build by mesher, the user can select the way of getting nodes
86 coordinates, else all nodes are projected on a face surface.</li>
89 \image html a-patterntype.png
91 \image html a-patterntype1.png
93 <br><h2>Mapping algorithm</h2>
95 The mapping algorithm is as follows:
97 <li>Key-points are set in the order that they are encountered when
98 walking along a pattern boundary so that elements are on the left. The
99 first key-point is preserved.
102 <li>Find geometrical vertices corresponding to key-points by vertices
103 order in a face boundary; here, "Reverse order of key-points" flag is
106 \image html image95.gif
109 <li>Boundary nodes of a pattern are mapped onto edges of a face: a
110 node located between certain key-points on a pattern boundary is
111 mapped on a geometrical edge limited by corresponding geometrical
112 vertices. Node position on an edge reflects its distance from two
115 \image html image96.gif
118 <li>Coordinates of a non-boundary node in a parametric space of a face
119 are defined as following. In a parametric space of a pattern, a node
120 lays at the intersection of two iso-lines, each of which intersects a
121 pattern boundary at least at two points. Knowing mapped positions of
122 boundary nodes, we find where isoline-boundary intersection points are
123 mapped to, and hence we can find mapped isolines direction and then,
124 two node positions on two mapped isolines. The eventual mapped
125 position of a node is found as an average of positions on mapped
128 \image html image97.gif
132 <br><b>See Also</b> a sample TUI Script of a
133 \ref tui_pattern_mapping "Pattern Mapping" operation.