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