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