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