Salome HOME
Redesign SALOME documentation
[modules/smesh.git] / doc / salome / gui / SMESH / input / extrusion_along_path.rst
1 .. _extrusion_along_path_page:
2
3 ********************
4 Extrusion along Path
5 ********************
6
7 In principle, **Extrusion along Path** works in the same way as :ref:`extrusion_page`, the main difference is that we define not a vector, but a path of extrusion which must be an 1D mesh or 1D sub-mesh.
8 To get an idea of how this algorithm works, examine several examples, starting from the most simple case of extrusion along a straight edge.
9 In the examples the sample mesh will be extruded along different paths and with different parameters.
10 This 2D mesh has two quadrangle faces and seven edges. Look at the picture, where white digits are the node numbers and green are the element numbers:
11
12 .. image:: ../images/mesh_for_extr_along_path.png
13         :align: center
14
15 Extrusion along a straight edge
16 *******************************
17 (not using base point or angles)
18
19 .. image:: ../images/straight_before.png
20         :align: center
21
22 .. centered::
23         The image shows a 1D path mesh, built on a linear edge, and the initial 2D mesh.
24
25 .. image:: ../images/straight_after.png
26         :align: center
27
28 .. centered::
29         The image shows the result of extrusion of two edges (#1 and #2) of the initial mesh along the path. 
30
31 .. note:: Node #1 of path mesh has been selected as Start node.
32
33 Extrusion along a curvilinear edge
34 ##################################
35 (with and without angles)
36
37 .. image:: ../images/curvi_simple_before.png
38         :align: center
39
40 .. centered::
41         The image shows a 1D path mesh, built on curvilinear edge, and the initial  2D mesh.
42
43 .. image:: ../images/curvi_simple_after.png
44         :align: center
45
46 .. centered::
47         The central image shows the result of extrusion of one edge (#2) of the initial mesh along the path. 
48
49 .. note:: Node #1 of path mesh has been selected as **Start node**.
50
51 .. image:: ../images/curvi_angles_after.png
52         :align: center
53
54 .. centered::
55         The same, but using angles {45, 45, 45, 0, -45, -45, -45}
56
57 Extrusion of a 2D face along a mesh built on a wire
58 ###################################################
59
60 In this example the path mesh has been built on a wire containing 3 edges. Node 1 is a start node. Linear angle variation by 180 degrees has also been applied.
61
62 .. image:: ../images/extr_along_wire_before.png
63         :align: center
64
65 .. centered::
66         **Meshed wire**
67
68 .. image:: ../images/extr_along_wire_after.png
69         :align: center
70
71 .. centered::
72         **The resulting extrusion**
73
74 Extrusion of 2d elements along a closed path
75 ############################################
76
77 .. image:: ../images/circle_simple_before.png
78         :align: center
79
80 .. centered::
81         The image shows a path mesh built on a closed edge (circle).
82
83 .. image:: ../images/circle_simple_after.png
84         :align: center
85
86 .. centered::
87         The central image shows the result of extrusion of both faces of the initial mesh. 
88
89 .. note:: Note, that no sewing has been done, so, there are six coincident nodes and two coincident faces in the resulting mesh.
90
91 .. image:: ../images/circle_angles_after.png
92         :align: center
93
94 .. centered::
95         The same, but using angles {45, -45, 45, -45, 45, -45, 45, -45}
96
97
98 **To use Extrusion along Path:**
99
100 #. From the **Modification** menu choose the **Extrusion along a path** item or click **"Extrusion along a path"** button in the toolbar.
101
102         .. image:: ../images/image101.png
103                 :align: center
104
105         .. centered::
106                 **"Extrusion along a path" button**
107
108         The following dialog will appear:
109
110         .. image:: ../images/extrusion_along_path_dlg.png
111
112
113 #. In this dialog:
114
115         * Use *Selection* button to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**.
116
117         .. image:: ../images/image120.png
118                 :align: center
119
120         .. centered::
121                 **"Selection" button**
122     
123         * Specify **Nodes**, **Edges** and **Faces**, which will be extruded, by one of following means:
124       
125                 * **Select the whole mesh, sub-mesh or group** activating this check-box.
126                 * Choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame.
127                 * Input the element IDs directly in **Node IDs**, **Edge IDs** and **Face IDs** fields. The selected elements will be highlighted in the viewer, if the mesh is shown there.
128                 * Apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`filtering_elements` page.
129     
130         * Define the **Path** along which the elements will be extruded.Path definition consists of several elements:
131       
132                 * **Mesh or sub-mesh** - 1D mesh or sub-mesh, along which proceeds the extrusion.
133                 * **Start node** - the start node of the Path. It is used to define the direction of extrusion. 
134       
135     
136         * If you activate **Generate Groups** check-box, the **result elements** created from **selected elements** contained in groups will be included into new groups named by pattern "<old group name>_extruded" and "<old group name>_top". For example if a  selected quadrangle is included in *g_Faces* group (see figures below) then result hexahedra will be included in *g_Faces_extruded* group and a quadrangle created at the "top" of extruded mesh will be included in *g_Faces_top group*.  
137
138         .. image:: ../images/extrusion_groups.png
139                 :align: center
140
141         .. image:: ../images/extrusion_groups_res.png
142                 :align: center
143
144         This check-box is active only if there are some groups in the mesh.
145   
146
147
148
149 #. There are two optional parameters, which can be very useful:
150
151 #. If the path of extrusion is curvilinear, at each iteration the extruded elements are rotated to keep its initial angularity to the curve. By default, the **Base Point** around which the elements are rotated is the mass center of the elements (note that it can differ from the gravity center computed by *Geometry* module for the  underlying shape), however, you can specify any point as the **Base Point** and the elements will be rotated with respect to this point. Note that only the displacement of the **Base Point** exactly equals to the path, and all other extruded elements simply keep their position relatively to the **Base Point** at each iteration.
152
153 #. The elements can also be rotated around the path to get the resulting mesh in a helical fashion. You can set the values of angles at the right, add them to the list of angles at the left by pressing the **"Add"** button and remove them from the list by pressing the **"Remove"** button.
154
155         .. image:: ../images/add.png
156                 :align: center
157
158         .. centered::
159                 **"Add" button**
160
161         .. image:: ../images/remove.png
162                 :align: center
163
164         .. centered::
165                 **"Remove" button**
166
167         **Linear variation of the angles** option allows defining the angle of gradual rotation for the whole path. At each step the elements will be rotated by *( angle / nb. of steps )*.
168
169
170
171 #. Click **Apply** or **Apply and Close**  button to confirm the operation. Mesh edges will be extruded into faces, faces into volumes. The external surface of the resulting 3d mesh (if faces have been extruded) is covered with faces, and corners with edges. If the path is closed, the resulting mesh can contain duplicated nodes and faces, because no sewing is done.
172
173
174 **See Also** a sample TUI Script of an :ref:`tui_extrusion_along_path` operation.  
175
176