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