* Specify the mesh you want to sew by selecting it or any its part (group or sub-mesh) in the Object Browser or in the VTK Viewer.
* Specify the **Tolerance**, within which free borders are considered coincident. At the default zero **Tolerance**, the tolerance used by he search algorithm is defined as one tenth of an average size of elements adjacent to compared free borders.
* To visually check the coincident free borders found by the algorithm, switch off **Auto Sewing** check-box. The controls to adjust groups of coincident free borders will become available in the dialog.
.. image:: ../images/sewing_auto.png
:align: center
.. centered::
Controls to adjust groups of coincident free borders
***Detect** button launches the algorithm of search of coincident free borders.
* The found groups of **Coincident Free Borders** are shown in the list, one group per line. Each group has its own color, which is used to display the group borders in the VTK Viewer. A free border within a group is designated by the IDs of its first, second and last nodes within parenthesis. All borders present in the list will be sewn upon **Apply**.
***Remove** button removes the selected groups from the list.
***Select All** check-box selects all groups in the list.
* When a group is selected, its borders appear in **Edit Selected Group** list that allows you to change this group.
***Set First** button moves the selected border to the first position in the group, as a result other borders will be moved to this border during sewing.
For sewing free borders manually you should switch the **Mode** to **Manual** and define three points on each border: the first, the second and the last node:
#. The parameter (U) of each node within a border is computed. So that the first node has U=0.0, the last node has U=1.0, for the rest nodes 0.0 < U < 1.0;
#. Compare node parameters of the two borders. If two nodes of the opposite borders have close parameters, they are merged, i.e. a node of the first border is replaced in all elements by a node of the second border. If a node has no node with a close parameter in the opposite border, it is inserted into an edge of element of the opposite border, an element is split. Two nodes are considered close enough to merge, if difference of their parameters is less than one fifth of minimum length of adjacent face edges on the borders.
except that the second free border is not limited and can be defined
by the first and the second nodes only. The first nodes of two borders
can be the same.
The algorithm is following: counting nodes starting at the first ones,
the n-th node of the first border is merged with the n-th node of the
other border, until the end of either of borders. Nodes of the first
border are replaced in all elements with corresponding nodes of the
second border.
..note::
For sewing conform free borders you should define three points on the first border and two points on the second one. User can select these nodes in 3D viewer or define node by its id.
The free border is defined as for :ref:`free_borders_anchor`. The place where to sew the border is defined by two nodes, between which the border faces are placed, so that the first border node is merged with the first node on the side and the last node of the border is merged with the second specified node on the side.
For sewing border to side you should define three points on the border and two points on the side. User can select these nodes in 3D viewer or define node by its id.