Salome HOME
Porting GUI documentation on Doxygen tool.
[modules/smesh.git] / doc / salome / gui / SMESH / pattern_mapping.htm
1 <!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
2
3 <html>
4
5 <head>
6 <title>Pattern mapping</title>
7 <meta http-equiv="content-type" content="text/html; charset=windows-1252">
8 <meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">
9 <link rel="stylesheet" href="default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">
10 <!--
11 if (navigator.appName !="Netscape")
12 {   document.write("<link rel='stylesheet' href='default.css'>");}
13 //-->
14 </script>
15 <style type="text/css">
16 <!--
17 img_whs1 { border:none; width:30px; height:30px; float:none; border-style:none; }
18 p.whs2 { margin-left:40px; }
19 img_whs3 { border:none; width:626px; height:471px; border-style:none; }
20 img_whs4 { border:none; width:22px; height:28px; border-style:none; }
21 table.whs5 { x-cell-content-align:top; width:64.066%; border-spacing:0px; }
22 col.whs6 { width:56.089%; }
23 col.whs7 { width:43.911%; }
24 tr.whs8 { x-cell-content-align:top; }
25 td.whs9 { width:56.089%; padding-right:10px; padding-left:10px; border-right-style:none; border-left-style:none; border-top-style:none; border-bottom-style:none; }
26 p.whs10 { margin-right:0px; }
27 img_whs11 { border:none; width:306px; height:632px; float:none; border-style:none; }
28 td.whs12 { width:43.911%; padding-right:10px; padding-left:10px; border-top-style:none; border-bottom-style:none; border-right-style:none; }
29 img_whs13 { border:none; width:306px; height:670px; float:none; border-style:none; }
30 img_whs14 { border:none; width:34px; height:34px; border-style:none; }
31 table.whs15 { x-cell-content-align:top; width:68.686%; border-spacing:0px; }
32 col.whs16 { width:50.224%; }
33 col.whs17 { width:49.776%; }
34 td.whs18 { width:50.224%; padding-right:10px; padding-left:10px; border-right-style:none; border-left-style:none; border-top-style:none; border-bottom-style:none; }
35 img_whs19 { border:none; width:306px; height:428px; float:none; border-style:none; }
36 td.whs20 { width:49.776%; padding-right:10px; padding-left:10px; border-top-style:none; border-bottom-style:none; border-right-style:none; }
37 img_whs21 { border:none; width:306px; height:248px; float:none; border-style:none; }
38 p.whs22 { margin-left:0px; }
39 img_whs23 { border:none; width:554px; height:279px; border-style:none; }
40 img_whs24 { border:none; width:572px; height:233px; border-style:none; }
41 img_whs25 { border:none; width:606px; height:249px; border-style:none; }
42 -->
43 </style><script type="text/javascript" language="JavaScript">
44 <!--
45 if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
46 {
47   var strNSS = "<style type='text/css'>";
48   strNSS += "p.whs10 {margin-right:1pt; }";
49   strNSS += "p.whs22 {margin-left:1pt; }";
50   strNSS +="</style>";
51   document.write(strNSS);
52 }
53 //-->
54 </script>
55 <script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
56 <!--
57 function reDo() {
58   if (innerWidth != origWidth || innerHeight != origHeight)
59      location.reload();
60 }
61 if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
62         origWidth = innerWidth;
63         origHeight = innerHeight;
64         onresize = reDo;
65 }
66 onerror = null; 
67 //-->
68 </script>
69 <style type="text/css">
70 <!--
71 div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
72 p.WebHelpNavBar { text-align:right; }
73 -->
74 </style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
75 <script type="text/javascript" language="javascript" src="whver.js"></script>
76 <script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
77 <script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
78 <script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
79 <script type="text/javascript" language="javascript1.2">
80 <!--
81 if (window.gbWhTopic)
82 {
83         if (window.setRelStartPage)
84         {
85         addTocInfo("MESH module\nModifying meshes\nPattern mapping");
86 addButton("show",BTN_IMG,"Show","","","","",0,0,"whd_show0.gif","whd_show2.gif","whd_show1.gif");
87 addButton("hide",BTN_IMG,"Hide","","","","",0,0,"whd_hide0.gif","whd_hide2.gif","whd_hide1.gif");
88
89         }
90
91
92         if (window.setRelStartPage)
93         {
94         setRelStartPage("index.htm");
95
96                 autoSync(1);
97                 sendSyncInfo();
98                 sendAveInfoOut();
99         }
100
101 }
102 else
103         if (window.gbIE4)
104                 document.location.reload();
105 //-->
106 </script>
107 </head>
108 <body><script type="text/javascript" language="javascript1.2">
109 <!--
110 if (window.writeIntopicBar)
111         writeIntopicBar(4);
112 //-->
113 </script>
114 <h1>Pattern mapping</h1>
115
116 <h3>About patterns</h3>
117
118 <p><img src="i_blue.jpg" x-maintain-ratio="TRUE" width="30px" height="30px" border="0" class="img_whs1"> The pattern describes a mesh to generate: positions of 
119  nodes within a geometrical domain and nodal connectivity of elements. 
120  As well, a pattern specifies the so-called key-points, i.e. nodes that 
121  will be located at geometrical vertices. Pattern description is stored 
122  in &lt;pattern_name&gt;.smp file.</p>
123
124 <p>&nbsp;</p>
125
126 <p>The smp file contains 4 sections:</p>
127
128 <p>&nbsp;</p>
129
130 <p class="whs2">1. The first line holds the number of nodes 
131  (N).</p>
132
133 <p class="whs2">&nbsp;</p>
134
135 <p class="whs2">2. The next N lines describe nodes coordinates. 
136  Each line holds 2 coordinates of a node.</p>
137
138 <p class="whs2">&nbsp;</p>
139
140 <p class="whs2">3. A key-points line: indices of nodes to 
141  be mapped on geometrical vertices. An index n refers to a node described 
142  on an n-th line of section 2. The first node index is zero.</p>
143
144 <p class="whs2">&nbsp;</p>
145
146 <p class="whs2">4. The rest lines describe nodal connectivity 
147  of elements, one line for an element. A line holds indices of nodes forming 
148  an element. An index n refers to a node described on an n-th line of the 
149  section 2. The first node index is zero. There must be 3 or 4 indices 
150  on a line: only 2d elements are allowed.</p>
151
152 <p class="whs2">&nbsp;</p>
153
154 <p>The 2D pattern must contain at least one element and at least one key-point. 
155  All key-points must lay on boundaries.</p>
156
157 <p>&nbsp;</p>
158
159 <p>An example of a simple smp file and a preview of a pattern described 
160  in this file:</p>
161
162 <p>&nbsp;</p>
163
164 <p><img src="image94.gif" width="626px" height="471px" border="0" class="img_whs3"></p>
165
166 <p>&nbsp;</p>
167
168 <p>&nbsp;</p>
169
170 <h3>Application of pattern mapping</h3>
171
172 <p class=TODO>To apply pattern mapping to a geometrical object:</p>
173
174 <p class=TODO>&nbsp;</p>
175
176 <p class="whs2">1. From the <span style="font-weight: bold;"><B>Modification 
177  </B></span>menu choose the <span style="font-weight: bold;"><B>Pattern Mapping 
178  </B></span>item or click <img src="image98.gif" width="22px" height="28px" border="0" class="img_whs4"> button in the toolbar. The following 
179  dialog box shall appear:</p>
180
181 <p class="whs2">&nbsp;</p>
182
183 <table x-use-null-cells cellspacing="0" width="64.066%" class="whs5">
184 <col class="whs6">
185 <col class="whs7">
186
187 <tr valign="top" class="whs8">
188 <td width="56.089%" class="whs9">
189 <p class="whs10"><img src="pics/patternmapping1.png" x-maintain-ratio="TRUE" width="306px" height="632px" border="0" class="img_whs11"></td>
190 <td width="43.911%" class="whs12">
191 <p><img src="pics/patternmapping2.png" x-maintain-ratio="TRUE" width="306px" height="670px" border="0" class="img_whs13"></td></tr>
192 </table>
193
194 <p class="whs2">&nbsp;</p>
195
196 <p>To apply a pattern to a geometrical object, you should specify:</p>
197
198 <p class="whs2">- a face having the number of vertices equal 
199  to the number of key-points in the pattern; the number of key-points on 
200  internal boundaries of a pattern must also be equal to the number of vertices 
201  on internal boundaries of a face;</p>
202
203 <p class="whs2">- a vertex to which the first key-point should 
204  be mapped,</p>
205
206 <p class="whs2">- reverse or not the order of key-points. 
207  (The order of vertices of a face is counterclockwise looking from outside).</p>
208
209 <p>&nbsp;</p>
210
211 <p>Then you either load a .smp pattern file previously created manually 
212  by clicking on the <img src="image108.gif" width="34px" height="34px" border="0" class="img_whs14"> button, or click on the <span style="font-weight: bold;"><B>New</B></span> 
213  button for automatic generation.</p>
214
215 <p>For an automatic generation you just specify a geometrical face having 
216  a mesh built on it. Mesh nodes lying on face vertices become key-points. 
217  Additionally, you may choose the way of getting nodes coordinates by <span 
218  style="font-weight: bold;"><B>projecting nodes on the face</B></span> instead 
219  of using &quot;positions on face&quot; generated by mesher (if there is 
220  any). Faces having a seam edge can\92t be used for automatic pattern creation.</p>
221
222 <p>&nbsp;</p>
223
224 <p>When creating a pattern from an existing mesh, there are two possible 
225  cases:</p>
226
227 <p>&nbsp;</p>
228
229 <p>1. A sub-mesh on face is selected. A pattern is created from the 2d 
230  elements bound to a face by mesher. Node coordinates are either &quot;positions 
231  on face&quot; computed by mesher, or coordinates got by node projection 
232  on a geometrical surface, according to your choice.</p>
233
234 <p>2. A mesh where the main shape is a face, is selected. A pattern is 
235  created from all the 2d elements in a mesh. If all mesh elements are build 
236  by mesher, the user can select the way of getting nodes coordinates, else 
237  all nodes are projected on a face surface.</p>
238
239 <table x-use-null-cells cellspacing="0" width="68.686%" class="whs15">
240 <col class="whs16">
241 <col class="whs17">
242
243 <tr valign="top" class="whs8">
244 <td width="50.224%" class="whs18">
245 <p><img src="pics/a-patterntype.png" x-maintain-ratio="TRUE" width="306px" height="428px" border="0" class="img_whs19"></td>
246 <td width="49.776%" class="whs20">
247 <p><img src="pics/a-patterntype1.png" x-maintain-ratio="TRUE" width="306px" height="248px" border="0" class="img_whs21"></td></tr>
248 </table>
249
250 <p>&nbsp;</p>
251
252 <h3>Mapping algorithm:</h3>
253
254 <p class="whs22">The mapping algorithm is as follows:</p>
255
256 <p class="whs22">&nbsp;</p>
257
258 <p class="whs2">1. Key-points are set in the order that they 
259  are encountered when walking along a pattern boundary so that elements 
260  are on the left. The first key-point is preserved.</p>
261
262 <p class="whs2">2. Find geometrical vertices corresponding 
263  to key-points by vertices order in a face boundary; here, &quot;Reverse 
264  order of key-points&quot; flag is taken into account.</p>
265
266 <p class="whs2">&nbsp;</p>
267
268 <p class="whs2"><img src="image95.gif" width="554px" height="279px" border="0" class="img_whs23"></p>
269
270 <p class="whs2">&nbsp;</p>
271
272 <p class="whs2">3. Boundary nodes of a pattern are mapped 
273  onto edges of a face: a node located between certain key-points on a pattern 
274  boundary is mapped on a geometrical edge limited by corresponding geometrical 
275  vertices. Node position on an edge reflects its distance from two key-points.</p>
276
277 <p class="whs2">&nbsp;</p>
278
279 <p class="whs2"><img src="image96.gif" width="572px" height="233px" border="0" class="img_whs24"></p>
280
281 <p class="whs2">&nbsp;</p>
282
283 <p class="whs2">4. Coordinates of a non-boundary node in 
284  a parametric space of a face are defined as following. In a parametric 
285  space of a pattern, a node lays at the intersection of two iso-lines, 
286  each of which intersects a pattern boundary at least at two points. Knowing 
287  mapped positions of boundary nodes, we find where isoline-boundary intersection 
288  points are mapped to, and hence we can find mapped isolines direction 
289  and then, two node positions on two mapped isolines. The eventual mapped 
290  position of a node is found as an average of positions on mapped isolines.</p>
291
292 <p class="whs2">&nbsp;</p>
293
294 <p class="whs2"><img src="image97.gif" width="606px" height="249px" border="0" class="img_whs25"></p>
295
296 <p class="whs2">&nbsp;</p>
297
298 <p>&nbsp;<span style="font-weight: bold;"><B>See 
299  Also</B></span> a sample TUI Script of a <a href="modifying_meshes.htm#bookmark13">Pattern 
300  Mapping</a><a href="modifying_meshes.htm#bookmark11"> </a>operation. &nbsp;</p>
301
302 <p>&nbsp;</p>
303
304 <script type="text/javascript" language="javascript1.2">
305 <!--
306 if (window.writeIntopicBar)
307         writeIntopicBar(0);
308 //-->
309 </script>
310 </body>
311 </html>