Salome HOME
Merge from V6_main 13/12/2012
[modules/hexablock.git] / doc / tui_blocks_for_cyl_pipe.rst
1 :tocdepth: 3
2
3
4 .. _tuiblockscylinderpipe:
5
6 =====================================
7 Make blocks for a cylinder and a pipe
8 =====================================
9
10 .. _tuimakecylinder:
11
12 Make blocks for a cylinder
13 ==========================
14
15 .. code-block:: python
16
17         elts = doc.makeCylinder(cyl, vb, nr, na, nl)
18
19 cyl: cylinder built using *addCylinder()* function (:ref:`tuicylinder`)
20
21 vb: vector on the base of the cylinder to start hexahedra.
22
23 nr: number of blocks on radial.
24
25 na: number of angular section.
26
27 nl: number of blocks along the axis of the cylinder.
28
29 Operations on *elts*: :ref:`tuielements2`
30
31 The result is an array of hexahedra ranked first by following the
32 radial direction and the angular direction, then according to the
33 layers in the cylinder axis.
34
35
36 Example of cylinder construction
37 --------------------------------
38
39 .. literalinclude:: test_doc/cylinder_pipe/make_cylinder.py
40    :linenos:
41
42
43 .. image:: _static/make_cylinder.png
44    :align: center
45
46 .. centered::
47    Cylinder
48
49
50 .. _tuimakecylinders:
51
52 Make blocks for cylinders
53 =========================
54
55 .. code-block:: python
56
57         elts = doc.makeCylinders (cylinder1, cylinder2)
58         
59 Operations on *elts*: :ref:`tuielements2`
60
61 Construction of an element from 2 cylinders:
62
63 .. literalinclude:: test_doc/cylinder_pipe/make_cylinders.py
64    :linenos:
65
66
67 .. image:: _static/make_cylinders.png
68    :align: center
69
70 .. centered::
71    Element from 2 cylinders
72    
73 The result is an array of hexahedral.
74
75
76 .. _tuimakepipe:
77
78 Make blocks for a pipe
79 ======================
80
81 .. code-block:: python
82
83     elts = doc.makePipe(pi, vb, nr, na, nl)
84
85 pi: pipe built using *addPipe()* function (:ref:`tuipipe`)
86
87 vb: vector on the base of the pipe to start hexahedra.
88
89 nr: number of blocks on radial.
90
91 na: number of angular section.
92
93 nl: number of blocks along the axis of the pipe.
94
95 Operations on *elts*: :ref:`tuielements2`
96
97 The result is an array of hexahedral arranged in layers following the
98 first radial and angular layers, and finally the axial layers.
99
100
101 Example of pipe construction
102 ----------------------------
103
104 .. literalinclude:: test_doc/cylinder_pipe/make_pipe.py
105    :linenos:
106
107
108 .. image:: _static/make_pipe.png
109    :align: center
110
111 .. centered::
112    Pipe
113
114 .. _tuimakepipes:
115
116 Make blocks for pipes
117 =====================
118
119 .. code-block:: python
120
121         elts  = doc.makePipes (pipe1, pipe2)
122
123 Operations on *elts*: :ref:`tuielements2`
124
125 Construction of an element from 2 pipes:
126
127
128 .. literalinclude:: test_doc/cylinder_pipe/make_pipes.py
129    :linenos:
130
131
132 .. image:: _static/make_pipes.png
133    :align: center
134
135 .. centered::
136    Element from 2 pipes
137
138 The result is an array of hexahedra where we first find hexahedra of
139 the first pipe and the second pipe. Each pipe range hexahedra following
140 first radial layers and angular layers, and finally the axial layers.
141
142 Operations on *elts*: :ref:`tuielements2`
143
144 GUI command: :ref:`guiblockscylinderpipe`