Salome HOME
8b7bb76c4848d79807fc7b993fe88b10fd4cfadb
[modules/smesh.git] / doc / salome / gui / SMESH / input / sewing_meshes.doc
1 /*!
2
3 \page sewing_meshes_page Sewing meshes
4
5 \n In SMESH you can sew elements of a mesh. The current
6 functionality allows you to sew:
7 <ul>
8 <li>\ref free_borders_anchor "Free borders"</li>
9 <li>\ref conform_free_borders_anchor "Conform free borders"</li>
10 <li>\ref border_to_side_anchor "Border to side"</li>
11 <li>\ref side_elements_anchor "Side elements"</li>
12 </ul>
13
14 \image html sewing.png "Sewing button"
15
16 <em>To sew elements of a mesh:</em>
17 <ol>
18 <li>From the \b Modification menu choose the \b Transformation item
19 and from its sub-menu select the \b Sewing item.</li>
20 <li>Check in the dialog box one of the radio buttons corresponding to
21 the type of sewing operation you would like to perform.</li>
22 <li>Fill the other fields available in the dialog box.</li>
23 <li>Click the \b Apply or <b>Apply and Close</b> button to perform the operation of sewing.</li>
24 </ol>
25
26 <br>
27 \anchor free_borders_anchor
28 <h2>Sew free borders</h2>
29
30 This functionality allows you to unite free borders of a 2D mesh.
31
32 There are two working modes: \a Automatic and \a Manual. In the \b
33 Automatic mode, the program finds free borders coincident within a
34 certain tolerance and sew them. Optionally it is possible to adjust
35 the found free borders before sewing. In the \b Manual mode you are to
36 define borders to sew by picking three nodes of each border.
37
38 \image html sewing1.png
39
40 For sewing free borders you should define three points on each border:
41 first, second and the last node:
42 <ul>
43 <li>the first node specifies beginning of the border;</li>
44 <li>the second node specifies the part of the border which should be
45 considered (as far as the free border usually forms a closed
46 contour);</li>
47 <li>the last node specifies the end of the border.</li>
48 </ul>
49
50 You can select these nodes in the 3D viewer or define by its id.
51
52 The first and the second nodes should belong to the same link of a
53 face. The second and the last nodes of a border can be the same. The
54 first and the last nodes of two borders can be the same. The
55 corresponding end nodes of two borders will be merged. Intermediate
56 nodes of two borders will be either merged or inserted into faces of
57 the opposite border.
58
59 In practice the borders to sew often coincide and in this case it is
60 difficult to specify the first and the last nodes of a border since
61 they coincide with the first and the last nodes of the other
62 border. To cope with this,
63 \ref merging_nodes_page "merge" coincident nodes into one
64 beforehand. Two figures below illustrate this approach.
65 \image html sew_using_merge.png "Merge coincident nodes which are difficult to distinguish"
66 <br>
67 \image html sew_after_merge.png "After merging nodes it is easy to specify border nodes"
68
69 The sewing algorithm is as follows:
70 <ol>
71 <li>The parameter (U) of each node within a border is computed. So
72 that the first node has U=0.0, the last node has U=1.0, for the rest
73 nodes 0.0 < U < 1.0;</li>
74 <li>Compare node parameters of the two borders. If two nodes of the
75 opposite borders have close parameters, they are merged, i.e. a node
76 of the first border is replaced in all elements by a node of the
77 second border. If a node has no node with a close parameter in the
78 opposite border, it is inserted into an edge of element of the
79 opposite border, an element is split. Two nodes are considered close
80 enough to merge, if difference of their parameters is less than one
81 fifth of minimum length of adjacent face edges on the borders.</li>
82 </ol>
83
84 \image html image22.jpg "Sewing free borders"
85
86 <b>See Also</b> a sample TUI Script of a 
87 \ref tui_sew_free_borders "Sew Free Borders" operation.
88
89 <br>
90 \anchor conform_free_borders_anchor
91 <h2>Sew conform free borders</h2>
92
93 This functionality can be used to unite two free borders of a 2D mesh.
94
95 \image html sewing2.png
96
97 The borders of meshes for sewing are defined as for "Sew free borders"
98 except that the second free border is not limited and can be defined
99 by the first and the second nodes only. The first nodes of two borders
100 can be the same.
101
102 The algorithm is following: counting nodes starting at the first ones,
103 the n-th node of the first border is merged with the n-th node of the
104 other border, until the end of either of borders. Nodes of the first
105 border are replaced in all elements with corresponding nodes of the
106 second border.
107 \n For sewing conform free borders you should define three points on
108 the first border and two points on the second one. User can select
109 these nodes in 3D viewer or define node by its id.
110
111 \image html image23.jpg "Sewing conform free borders"
112
113 <b>See Also</b> a sample TUI Script of a 
114 \ref tui_sew_conform_free_borders "Sew Conform Free Borders"
115 operation.
116
117 <br>
118 \anchor border_to_side_anchor
119 <h2>Sew border to side</h2>
120
121 "Sew border to side" is intended to sew a free border to a mesh
122 surface.
123 \n The free border is defined as for "Sewing of free borders". The
124 place where to sew the border is defined by two nodes, between which
125 the border faces are placed, so that the first border node is merged
126 with the first node on the side and the last node of the border is
127 merged with the second specified node on the side.
128
129 \image html sewing3.png
130
131 The algorithm is following.
132 <ol>
133 <li>Find a sequence of linked nodes on the side such that the found
134 links to be most co-directed with the links of the free border.</li>
135 <li>Sew two sequences of nodes using algorithm of "Sewing of free berders".
136 \n For sewing border to side you should define three points on the
137 border and two points on the side. User can select these nodes in 3D
138 viewer or define node by its id.</li>
139 </ol>
140
141 \image html image30.jpg "Sewing border to side"
142
143 <b>See Also</b> a sample TUI Script of a 
144 \ref tui_sew_meshes_border_to_side "Sew Border to Side" operation.  
145
146 <br>
147 \anchor side_elements_anchor
148 <h2>Sew side elements</h2>
149
150 This operation is intended to unite two mesh surfaces.
151
152 \image html sewing4.png 
153
154 Surfaces may be defined by either 2d or 3d elements. The number of
155 given elements of the sides must be the same. The sets of given
156 elements must be topologically equal, i.e. each node of one element
157 set must have a corresponding node in the other element set and
158 corresponding nodes must be equally linked. If there are 3d elements
159 in a set, only their free faces must obey to that rule.
160 \n Two corresponding nodes on each side must be specified. They must
161 belong to one element and must be located on an element set boundary.
162
163 Sewing algorithm finds and merges the corresponding nodes starting
164 from the specified ones.
165
166 \image html image31.jpg "Step-by-step sewing process"
167
168 \image html image32.jpg "The result of side elements sewing"
169
170 For sewing side elements you should define elements for sewing and two
171 nodes for merging on the each side. User can select these elements and
172 nodes in 3D viewer or define them by its id.
173
174 <b>See Also</b> a sample TUI Script of a 
175 \ref tui_sew_side_elements "Sew Side Elements" operation.  
176
177 */