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