.. _tuiblockscylinderpipe:
-=====================================
-Make blocks for a cylinder and a pipe
-=====================================
+================================
+Cylinders and Pipes Construction
+================================
-Make blocks for a cylinder
-==========================
+.. _tuicylinder:
-::
+Cylinder
+========
- elts = doc.makeCylinder(cyl, vb, nr, na, nl)
+.. _tuicylindersimple:
-cyl: cylinder
+Simple Cylinder
+---------------
-vb: vector on the base of the cylinder to start hexahedra.
+To make a simple cylinder grid in python mode, the following data are required:
-nr: number of blocks on radial.
+- *nbR* : number of hexahedra on radial.
+- *nbA* : number of hexahedra along the perimeter of the cylinder.
+- *nbH* : number of hexahedra along the axis of the cylinder.
-na: number of angular section.
+Use the function **makeCyinderTop**::
-nl: number of blocks along the axis of the cylinder.
+ elts = doc.makeCylinderTop(nbR, nbA, nbH)
-The result is an array of hexahedra ranked first by following the
-radial direction and the angular direction, then according to the
-layers in the cylinder axis.
+GUI command: :ref:`guicylindersimple`
+
+
+.. _tuicylinderuniform:
+
+Uniform Cylinder
+----------------
+
+The following data are required:
+
+- *origin* : origin's coordinates of the cylinder (select a vertex).
+- *vx* : the base of the cylinder (select a vector).
+- *vz* : the axis of the cylinder (select a vector).
+- *rint* : the radius of the hole in the cylinder .
+- *rext* : the radius of the cylinder.
+- *angle* : angle of the cylinder around the Z axis.
+- *hauteur*: the height of the cylinder.
+- *nbR* : number of hexahedra on radial.
+- *nbA* : number of hexahedra along the perimeter of the cylinder.
+- *nbH* : number of hexahedra along the axis of the cylinder.
+
+Use the function **makeCylinderUni** to make a uniform cylinder::
+
+ elts = doc.makeCylinderUni(origin, vx, vz, rint, rext, angle, hauteur, nbR, nbA, nbH)
+
+GUI command: :ref:`guicylinderuniform`
+
+
+.. _tuicylindercustom:
+
+Custom Cylinder
+---------------
+
+The following data are required:
+
+- *origin* : origin's coordinates of the cylinder (select a vertex).
+- *vx* : the base of the cylinder (select a vector).
+- *vz* : the axis of the cylinder (select a vector).
+- *tr* : a list of radiuses in ascendant order.
+- *ta* : a list of angles in ascendant order.
+- *th* : a list of heights in ascendant order.
+
+Use the function **makeCylinder** to make a custom cylinder::
+
+ elts = doc.makeCylinder(origin, vx, vz, tr, ta, th)
+
+GUI command: :ref:`guicylindercustom`
+
+Operations on *elts*: :ref:`tuielements2`
Example
-------
-::
+.. literalinclude:: test_doc/cylinder/cylinder.py
+ :linenos:
+
+
+.. _tuicylinders:
- import hexablock
- doc = hexablock.addDocument()
+Make Cylinders
+==============
- base = doc.addVertex(0, 0, 0)
- direction = doc.addVector(0, 0, 1)
- radius = 4
- height = 5
+To make **two cylinders in T shape** the following data are required for each cylinder:
- cyl = doc.addCylinder(base, direction, radius, height)
+- *orig* : the origin of the cylinder (select a vertex).
+- *vz* : the axis of the cylinder (select a vector).
+- *rext* : the radius of the cylinder.
+- *h* : the height of the cylinder.
- vb = doc.addVector(1, 0, 0)
- nr = radius
- na = 9
- nl = height
- elts = doc.makeCylinder(cyl, vb, nr, na, nl)
+*One of the two cylinders must be bigger than the other.*
-.. image:: _static/cylinder.png
- :align: center
+Use the function **makeCylinders**::
-.. centered::
- Cylinder
+ elts = doc.makeCylinders (orig1, vz1, rext1, h1, orig2, vz2, rext2, h2)
+
+GUI command: :ref:`guicylinders`
+
+Operations on *elts*: :ref:`tuielements2`
+
+
+Example
+-------
-Make blocks for cylinders
-=========================
+.. literalinclude:: test_doc/cylinder/cylinders.py
+ :linenos:
+
-::
+.. _tuipipe:
- elts = doc.makeCylinders(cyl1, cyl2)
+Pipe
+====
-The result is an array of hexahedral.
+.. _tuipipesimple:
+Simple Pipe
+-----------
-Make blocks for a pipe
-======================
+To make a simple pipe grid in python mode, the following data are required:
-::
+- *nbR* : number of hexahedra on radial.
+- *nbA* : number of hexahedra along the perimeter of the pipe.
+- *nbH* : number of hexahedra along the axis of the pipe.
- elts = doc.makePipe(pi, vb, nr, na, nl)
+Use the function **makePipeTop**::
+
+ elts = doc.makePipeTop(nbR, nbA, nbH)
+
+GUI command: :ref:`guipipesimple`
+
+
+.. _tuipipeuniform:
+
+Uniform Pipe
+------------
+
+The following data are required:
+
+
+- *origin* : the origin's coordinates of the pipe (select a vertex).
+- *vx* : the base of the pipe (select a vector).
+- *vz* : the axis of the pipe (select a vector).
+- *rint* : the radius of the hole in the pipe .
+- *rext* : the radius of the pipe.
+- *angle* : angle of the pipe around the Z axis.
+- *hauteur*: the height of the pipe.
+- *nbR* : number of hexahedra on radial.
+- *nbA* : number of hexahedra along the perimeter of the pipe.
+- *nbH* : number of hexahedra along the axis of the pipe.
+
+Use the function **makePipeUni** to make a uniform pipe::
+
+ elts = doc.makePipeUni(origin, vx, vz, rint, rext, angle, hauteur, nbR, nbA, nbH)
+
+GUI command: :ref:`guipipeuniform`
+
+
+.. _tuipipecustom:
+
+Custom Pipe
+-----------
+
+The following data are required:
+
+- *origin* : origin's coordinates of the pipe (select a vertex).
+- *vx* : the base of the pipe (select a vector).
+- *vz* : the axis of the pipe (select a vector).
+- *tr* : a list of radiuses in ascendant order.
+- *ta* : a list of angles in ascendant order.
+- *th* : a list of heights in ascendant order.
+
+Use the function **makePipe** to make a custom pipe::
+
+ elts = doc.makePipe(origin, vx, vz, tr, ta, th)
+
+GUI command: :ref:`guipipecustom`
+
+Operations on *elts*: :ref:`tuielements2`
-The result is an array of hexahedral arranged in layers following the
-first radial and angular layers, and finally the axial layers.
Example
-------
-::
+.. literalinclude:: test_doc/pipe/pipe.py
+ :linenos:
+
+
+
+.. _tuipipes:
- import hexablock
- doc = hexablock.addDocument()
+Make Pipes
+==========
- orig = doc.addVertex(50, 0, 0)
- vz = doc.addVector(0, 0, 1)
- int_radius = 3
- ext_radius = 4
- height = 5
- pi = doc.addPipe(orig, vz, int_radius, ext_radius, height)
+To make **two pipes in T shape** the following data are required for each pipe:
- vb = doc.addVector(1, 0, 0)
- nr = 4
- na = 9
- nl = 5
- elts = doc.makePipe(pi, vb, nr, na, nl)
+- *orig* : the origin of the pipe (select a vertex).
+- *vz* : the axis of the pipe (select a vector).
+- *rint* : the internal radius of the pipe.
+- *rext* : the radius of the pipe.
+- *h* : the height of the pipe.
-.. image:: _static/pipe.png
- :align: center
+*One of the two pipes must be bigger than the other.*
-.. centered::
- Pipe
+Use the function **makepipes**::
-Make blocks for pipes
-=====================
+ elts = doc.makePipes(orig1, vz1, rint1, rext1, h1, orig2, vz2, rint2, rext2, h2)
-::
+GUI command: :ref:`guipipes`
- elts = doc.makePipes(p1, p2)
+Operations on *elts*: :ref:`tuielements2`
-The result is an array of hexahedra where we first find hexahedra of
-the first pipe and the second pipe. Each pipe range hexahedra following
-first radial layers and angular layers, and finally the axial layers.
+Example
+-------
-GUI command: :ref:`guiblockscylinderpipe`
+.. literalinclude:: test_doc/pipe/pipes.py
+ :linenos: