Committing in .
Modified Files:
Tag: V7_main
creategrids.rst gui_association.rst
gui_blocks_for_cyl_pipe.rst gui_cut_hexa.rst
gui_hemisphere.rst gui_prism_join_quad.rst
gui_quad_revolution.rst interactive.rst python.rst
tui_blocks_for_cyl_pipe.rst tui_cartgrid.rst tui_cut_hexa.rst
tui_hemisphere_rind.rst tui_prism_join_quad.rst
tui_quad_revolution.rst _static/gui_vertex.png
Added Files:
Tag: V7_main
_static/cartgridcustom.png _static/cartgridsimple.png
_static/cartgriduniform.png _static/concentriccustom.png
_static/concentricsimple.png _static/concentricuniform.png
_static/cylindercustom.png _static/cylinders.png
_static/cylindersimple.png _static/cylinderuniform.png
_static/gui_concentriccustom.png
_static/gui_concentricsimple.png
_static/gui_concentricuniform.png
_static/gui_cuthexacustom.png _static/gui_cuthexauniform.png
_static/gui_cylindercustom.png _static/gui_cylinders.png
_static/gui_cylindersimple.png _static/gui_cylinderuniform.png
_static/gui_extrudequadscustom.png
_static/gui_extrudequadssimple.png
_static/gui_extrudequadsuniform.png
_static/gui_joinquadscustom.png
_static/gui_joinquadsuniform.png
_static/gui_make_cart_grid_custom.png
_static/gui_make_cart_grid_simple.png
_static/gui_make_cart_grid_uniform.png
_static/gui_pipecustom.png _static/gui_pipes.png
_static/gui_pipesimple.png _static/gui_pipeuniform.png
_static/gui_quadsrevolutioncustom.png
_static/gui_quadsrevolutionuniform.png
_static/gui_rindcustom.png _static/gui_rinduniform.png
_static/gui_spherecustom.png _static/gui_spheresimple.png
_static/gui_sphereuniform.png _static/rindcustom.png
_static/rindsimple.png _static/rinduniform.png
_static/spherecustom.png _static/spheresimple.png
_static/sphereuniform.png
test_doc/cartesian_grid/cartesian_grid.py
test_doc/cutHexa/cut_hexa.py test_doc/cylinder/cylinder.py
test_doc/cylinder/cylinders.py
test_doc/extrudeQuad/extrude_quad.py
test_doc/hemisphere/concentric.py test_doc/hemisphere/rind.py
test_doc/hemisphere/sphere.py test_doc/joinQuad/join_quad.py
test_doc/pipe/pipe.py test_doc/pipe/pipes.py
test_doc/quadRevolution/revolution_quad.py
Removed Files:
Tag: V7_main
_static/cartgrid3.png _static/cylgrid1.png
_static/gui_hemispherical.png _static/gui_make_cart_grid.png
_static/gui_make_cyl_grid.png _static/gui_make_spher_grid.png
_static/sph_grid.png
----------------------------------------------------------------------
.. _creategrids:
-============
-Create grids
-============
+======================
+Create cartesian grids
+======================
-To create a **Grid** in the **Main Menu** select **Model -> Construction -> Make Grid**.
+To create a **Cartesian Grid** in the **Main Menu** select **Model -> Construction -> Make Grid**.
Three kinds of grid can be created:
-- cartesian grid (see :ref:`guicartgrid`),
-- cylindrical grid (see :ref:`guicylgrid`),
-- spherical grid (see :ref:`guisphergrid`).
+- simple cartesian grid (see :ref:`guicartgridsimple`),
+- uniform cartesian grid (see :ref:`guicartgriduniform`),
+- custom cartesian grid (see :ref:`guicartgridcustom`).
-.. _guicartgrid:
+.. _guicartgridsimple:
-Cartesian grid
-==============
+Simple cartesian grid
+=====================
-To create a cartesian grid, select radio button **Cartesian**:
+To create a simple cartesian grid, select radio button **Simple**:
-.. image:: _static/gui_make_cart_grid.png
+.. image:: _static/gui_make_cart_grid_simple.png
:align: center
.. centered::
- Dialogue Box for a Cartesian grid
+ Dialogue Box for a Simple cartesian grid
The following data are required:
-- the vertex of the initial hexahedron,
-- the vector corresponding to the diametrically opposite vertex to the initial vertex,
-- the number of repetition of this hexahedra along the three axes
- (n(x), n(y) and n(z)).
-
+- *nb X*: The number of hexahedra along the X axis
+- *nb Y*: The number of hexahedra along the Y axis
+- *nb Z*: The number of hexahedra along the Z axis
The result of this action is:
-.. image:: _static/cartgrid3.png
+.. image:: _static/cartgridsimple.png
:align: center
.. centered::
- Result Cartesian Grid
+ Simple Cartesian Grid
-TUI command: :ref:`tuicartgrid`
+TUI command: :ref:`tuicartgridsimple`
-.. _guicylgrid:
+.. _guicartgriduniform:
-Cylindrical grid
-================
+Uniform cartesian grid
+======================
-To create a cylindrical grid, select radio button **Cylindrical**:
+To create an uniform cartesian grid, select radio button **Uniform**:
-.. image:: _static/gui_make_cyl_grid.png
+.. image:: _static/gui_make_cart_grid_uniform.png
:align: center
.. centered::
- Dialogue Box for a Cylindrical grid (regular size)
+ Dialogue Box for an Uniform cartesian grid
The following data are required:
-- Cylinder
- - center: coordinates of the cylinder base center (select a vertex).
- - axis: direction vector of the cylinder (select a vector).
- - base: base vector of the cylinder (select a vector).
-
-- Grid
- - radius: size and number of elements from the center.
- - angle: size and number of elements around the center.
- - height: size and number of elements on height.
- - fill: choose this option to fill the central part of the hexhahedra.
-
-
-Elements size of the grid can be irregular (differents sizes). Select the adequate radio button:
-
-.. image:: _static/gui_make_cyl_grid_irregular.png
- :align: center
-
-.. centered::
- Dialogue Box for a Cylindrical grid (irregular size)
-
+- *origin*: The vertex of the origin
+- *vec X* : The X vector
+- *vec Y* : The Y vector
+- *vec Z* : The Z vector
+- *len X* : The length of an hexahedra on the X axis
+- *len Y* : The length of an hexahedra on the Y axis
+- *len Z* : The length of an hexahedra on the Z axis
+- *nb X* : The number of hexahedra on the X axis
+- *nb Y* : The number of hexahedra on the Y axis
+- *nb Z* : The number of hexahedra on the Z axis
-The result:
-
-.. image:: _static/cylgrid1.png
- :align: center
+Clicking on "Apply" on the previous dialog box will produce the following grid (Uniform hexahedra, different sizes on the three axis):
-.. image:: _static/cylgrid2.png
+.. image:: _static/cartgriduniform.png
:align: center
-.. image:: _static/cylgrid3.png
- :align: center
-
-.. image:: _static/cylgrid4.png
- :align: center
-
-.. image:: _static/cylgrid5.png
- :align: center
-
-.. image:: _static/cylgrid6.png
- :align: center
-
-
.. centered::
- Cylindrical grids with different filling cases
+ Unfiorm cartesian grid
-TUI command: :ref:`tuicylgrid`
+TUI command: :ref:`tuicartgriduniform`
-.. _guisphergrid:
+.. _guicartgridcustom:
-Spherical grid
-===============
+Custom cartesian grid
+=====================
-To create a spherical grid, select radio button **Spherical**:
+To create a Custom cartesian grid, select radio button **Custom**:
-.. image:: _static/gui_make_spher_grid.png
+.. image:: _static/gui_make_cart_grid_custom.png
:align: center
.. centered::
- Dialogue Box for a Spherical grid
+ Dialogue Box for a Custom cartesian grid
The following data are required:
-- the center (vertex) of the central hexahedron,
-- the radius of the internal hexahedron
-- the number of embedded hexahedra (nb),
-- the coefficient of growth (k).
+- *origin*: The vertex of the origin
+- *vec X* : The X vector
+- *vec Y* : The Y vector
+- *vec Z* : The Z vector
+- *X* : A list of x values in ascendant order
+- *Y* : A list of y values in ascendant order
+- *Z* : A list of z values in ascendant order
+A value on each axis gives the length of an hexahedra on that axis from the origin of the grid.
+For example the first value in the list of x values is the length on X axis of the first hexahedra from the origin.
-The result is an array of hexahedra starting with the central and
-other hexahedral are arranged layer by layer from the center. Each
-layer contains six hexahedral always in the following order: two along
-the X axis, then two for the Y axis and two for the Z axis.
The result of this action is:
-.. image:: _static/sph_grid.png
+.. image:: _static/cartgridcustom.png
:align: center
.. centered::
- Resulting Spherical grid
+ Custom cartesian grid
-TUI command: :ref:`tuisphergrid`
+TUI command: :ref:`tuicartgridcustom`
Show associations
=================
-To show all associations of a given type (only vertex, edge and hexahedron can be associated),
+To show all associations of a given type (only vertex, edge and quad can be associated),
right click on the tree of the type in the data tree and click on the menu "Show associations".
The contextual menu shown when you right-click looks like this:
.. centered::
Show associations
+When you select an element (an edge for instance) in the data tree or in a graphic view (vtk/occ), all elements associated to it will be highlighted in the data tree and the graphic views.
+
.. _guiremoveassocs:
Remove all associations
.. _guiblockscylinderpipe:
-=====================================
-Make blocks for a cylinder and a pipe
-=====================================
+================================
+Cylinders and Pipes Construction
+================================
-.. _makecylinder:
+.. _guicylinder:
-Make Cylinder
-=============
+Cylinder
+========
To make a **Cylinder** in the **Main Menu** select **Model -> Construction -> Make Cylinder**.
-To make a cylinder, the following data are required:
-- Cylinder: a cylinder.
-- Vector: a vector on the base of the cylinder to start hexahedra.
-- n (radial) : the number of blocks on radial.
-- n (angular): the number of angular section.
-- n (length) : the number of blocks along the axis of the cylinder.
+.. _guicylindersimple:
-The dialogue box to make a cylinder is:
+Simple Cylinder
+---------------
-.. image:: _static/gui_make_cylinder.png
+.. image:: _static/gui_cylindersimple.png
:align: center
.. centered::
- Make a Cylinder
+ Dialog Box to make a Simple Cylinder
+
+
+The following data are required:
+
+- *nb Radial* : number of hexahedra on radial.
+- *nb Angular* : number of hexahedra along the perimeter of the cylinder.
+- *nb Height* : number of hexahedra along the axis of the cylinder.
+
+Clicking on "Apply" on the previous dialog box will produce the following result:
+
+.. image:: _static/cylindersimple.png
+ :align: center
+
+.. centered::
+ Simple Cylinder
The result is an array of hexahedral ranked first by following the
radial direction and the angular direction, then according to the
layers in the cylinder axis.
-The result of this action is:
-.. image:: _static/cylinder.png
+TUI command: :ref:`tuicylindersimple`
+
+
+.. _guicylinderuniform:
+
+Uniform Cylinder
+----------------
+
+.. image:: _static/gui_cylinderuniform.png
:align: center
.. centered::
- Cylinder
+ Dialog Box to make a Uniform Cylinder
-TUI command: :ref:`tuimakecylinder`
+The following data are required:
-.. _makecylinders:
+- *origin* : origin's coordinates of the cylinder (select a vertex).
+- *axis* : the axis of the cylinder (select a vector).
+- *base* : the base of the cylinder (select a vector).
+- *radius* : the radius of the cylinder.
+- *hole radius*: the radius of the hole in the cylinder .
+- *slice angle*: angle of the cylinder around the Z axis.
+- *height* : the height of the cylinder.
+- *nb Radial* : number of hexahedra on radial.
+- *nb Angular* : number of hexahedra along the perimeter of the cylinder.
+- *nb Height* : number of hexahedra along the axis of the cylinder.
-Make Cylinders
-==============
+Clicking on "Apply" on the previous dialog box will produce the following result:
+
+.. image:: _static/cylinderuniform.png
+ :align: center
+
+.. centered::
+ Uniform Cylinder
+
+
+TUI command: :ref:`tuicylinderuniform`
-To make **two cylinders in T shape** in the **Main Menu** select **Model -> Construction -> Make Cylinders**
-You can make **Cylinders** through **Cylinder1** and **Cylinder2**.
+.. _guicylindercustom:
-**Arguments:** 2 cylinders.
+Custom Cylinder
+---------------
+
+.. image:: _static/gui_cylindercustom.png
+ :align: center
+
+.. centered::
+ Dialog Box to make a Custom Cylinder
+
+
+The following data are required:
+
+- *origin* : origin's coordinates of the cylinder (select a vertex).
+- *axis* : the axis of the cylinder (select a vector).
+- *base* : the base of the cylinder (select a vector).
+- *radius* : a list of radiuses in ascendant order.
+- *angle* : a list of angles in ascendant order.
+- *height* : a list of heights in ascendant order.
+
+Clicking on "Apply" on the previous dialog box will produce the following result:
+
+.. image:: _static/cylindercustom.png
+ :align: center
+
+.. centered::
+ Custom Cylinder
+
+
+TUI command: :ref:`tuicylindercustom`
+
+
+.. _guicylinders:
+
+Cylinders
+=========
+
+To make **two cylinders in T shape** in the **Main Menu** select **Model -> Construction -> Make Cylinders**
The dialogue box to make cylinders is:
-.. image:: _static/gui_make_cylinders.png
+.. image:: _static/gui_cylinders.png
:align: center
.. centered::
Make Cylinders
-The result is an array of hexahedral.
-TUI command: :ref:`tuimakecylinders`
+The following data are required:
+- *origin* : the origin of the cylinder (select a vertex).
+- *axis* : the axis of the cylinder (select a vector).
+- *radius* : the radius of the cylinder.
+- *height* : the height of the cylinder.
+
+Those arguments must be filled for the **Big Cylinder** and the **Small Cylinder**.
+
+Clicking on "Apply" on the previous dialog box will produce the following result:
+
+.. image:: _static/cylinders.png
+ :align: center
+
+.. centered::
+ Make Cylinders (T Shape)
+
+
+TUI command: :ref:`tuicylinders`
-.. _makepipe:
-Make Pipe
-=========
+
+.. _guipipe:
+
+Pipe
+====
To make a **Pipe** in the **Main Menu** select **Model -> Construction -> Make Pipe**.
-To make a pipe, the following data are required:
-- Pipe: a pipe.
-- Vector: a vector on the base of the pipe to start hexahedra.
-- n (radial) : the number of blocks on radial.
-- n (angular): the number of angular section.
-- n (length) : the number of blocks along the axis of the pipe.
+.. _guipipesimple:
-The dialogue box to make a pipe is:
+Simple Pipe
+-----------
-.. image:: _static/gui_make_pipe.png
+.. image:: _static/gui_pipesimple.png
:align: center
.. centered::
- Make a Pipe
+ Dialog Box to make a Simple Pipe
+
+
+The following data are required:
+
+- *nb Radial* : number of hexahedra on radial.
+- *nb Angular* : number of hexahedra along the perimeter of the pipe.
+- *nb Height* : number of hexahedra along the axis of the pipe.
-The result is an array of hexahedral arranged in layers following the
-first radial and angular layers, and finally the axial layers.
-The result of this action is:
+TUI command: :ref:`tuipipesimple`
-.. image:: _static/pipe.png
+
+.. _guipipeuniform:
+
+Uniform Pipe
+------------
+
+.. image:: _static/gui_pipeuniform.png
:align: center
.. centered::
- Pipe
+ Dialog Box to make a Uniform Pipe
-TUI command: :ref:`tuimakepipe`
+The following data are required:
-.. _makepipes:
+- *origin* : origin's coordinates of the pipe (select a vertex).
+- *axis* : the axis of the pipe (select a vector).
+- *base* : the base of the pipe (select a vector).
+- *radius* : the radius of the pipe.
+- *hole radius*: the radius of the hole in the pipe.
+- *slice angle*: angle of the pipe around the Z axis.
+- *height* : the height of the pipe.
+- *nb Radial* : number of hexahedra on radial.
+- *nb Angular* : number of hexahedra along the perimeter of the pipe.
+- *nb Height* : number of hexahedra along the axis of the pipe.
-Make Pipes
-==========
-To make **two intersect pipes** in the **Main Menu** select **Model -> Construction -> Make Pipes**.
+TUI command: :ref:`tuipipeuniform`
-You can make **Pipes** through **Pipe1** and **Pipe2**.
-**Arguments:** 2 pipes.
+.. _guipipecustom:
+
+Custom Pipe
+-----------
+
+.. image:: _static/gui_pipecustom.png
+ :align: center
+
+.. centered::
+ Dialog Box to make a Custom Pipe
+
+
+The following data are required:
+
+- *origin* : origin's coordinates of the pipe (select a vertex).
+- *axis* : the axis of the pipe (select a vector).
+- *base* : the base of the pipe (select a vector).
+- *radius* : a list of radiuses in ascendant order.
+- *angle* : a list of angles in ascendant order.
+- *height* : a list of heights in ascendant order.
+
+
+TUI command: :ref:`tuipipecustom`
+
+
+.. _guipipes:
+
+Pipes
+=====
+
+To make **two intersect pipes** in the **Main Menu** select **Model -> Construction -> Make Pipes**.
+
The dialogue box to make pipes is:
-.. image:: _static/gui_make_pipes.png
+.. image:: _static/gui_pipes.png
:align: center
.. centered::
Make Pipes
-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.
+You can make **Pipes** (T Shape) through a **Big Pipe** and a **Small Pipe**.
+
+The following data are required:
+
+- *origin* : the origin of the pipe (select a vertex).
+- *axis* : the axis of the pipe (select a vector).
+- *radius* : the radius of the pipe.
+- *hole radius*: the radius of the hole in the pipe.
+- *height* : the height of the pipe.
-TUI command: :ref:`tuimakepipes`
+Those arguments must be filled for the **Big Pipe** and the **Small Pipe**.
+TUI command: :ref:`tuipipes`
This method allows to cut in two (or more) a series of hexahedra
using a series of edges propagation.
-To cut an hexahedra in the **Main Menu** select **Model -> Operation -> Cut Hexahedra**.
+To cut an hexahedra in the **Main Menu** select **Model -> Operation -> Cut Edge**.
-**Arguments:** an edge and the number of cuts (nb).
+.. _guicuthexauniform:
-The dialogue box for the cut of an hexahedra is:
+Uniform Cut
+===========
-.. image:: _static/gui_cut_hexa.png
+The dialogue box to make a uniform cut of an hexahedra is:
+
+.. image:: _static/gui_cuthexauniform.png
:align: center
.. centered::
- Cut Hexahedra
+ Uniform Cut
-Example:
+**Arguments:**
-.. image:: _static/no_cut.png
- :align: center
+- *Edge* : an edge on the hexahedra to cut.
+- *Nb layers*: the number of cuts.
+
+TUI command: :ref:`tuicuthexauniform`
-.. centered::
- no cut
+.. _guicuthexacustom:
-.. image:: _static/cut.png
+Custom Cut
+==========
+
+The dialogue box to make a custom cut of an hexahedra is:
+
+.. image:: _static/gui_cuthexacustom.png
:align: center
.. centered::
- cut
+ Custom Cut
+
+**Arguments:**
+- *Edge* : an edge on the hexahedra to cut.
+- *length* : the list of the lengths of the layers in ascendant order.
-TUI command: :ref:`tuicuthexa`
+TUI command: :ref:`tuicuthexacustom`
.. _guihemisphere:
=========================
-Create HemiSpherical Grid
+Create Hemispherical Grid
=========================
+To create an **Hemispherical Grid** in the **Main Menu** select **Model -> Construction -> Make Hemisphere**.
-To create an **HemiSpherical Grid** in the **Main Menu** select **Model -> Construction -> Make Hemisphere**.
+.. _guisphereandrindsimple:
-.. image:: _static/gui_hemispherical.png
+Simple Sphere and Simple Rind
+=============================
+
+.. image:: _static/gui_spheresimple.png
+ :align: center
+
+.. centered::
+ Parameters for a Simple Sphere or Rind
+
+
+The following data are required:
+
+- *nb Radial* : number of hexahedra on radial.
+- *nb Angular* : number of hexahedra along the perimeter of the sphere.
+- *nb Height* : number of hexahedra along the axis of the sphere.
+
+The result of this action is:
+
+.. image:: _static/spheresimple.png
+ :align: center
+
+.. centered::
+ Simple Sphere
+
+
+.. image:: _static/rindsimple.png
+ :align: center
+
+.. centered::
+ Simple Rind
+
+TUI command: :ref:`tuispheresimple`
+
+TUI command: :ref:`tuirindsimple`
+
+
+.. _guisphereuniform:
+
+Uniform Sphere
+==============
+
+.. image:: _static/gui_sphereuniform.png
+ :align: center
+
+.. centered::
+ Parameters for an Uniform Sphere
+
+
+The following data are required:
+
+- *center* : center coordinates of the sphere (select a vertex).
+- *axis* : the axis of the hole (select a vector).
+- *base* : the base of the sphere (select a vector).
+- *external radius*: the radius of the sphere.
+- *hole radius*: the radius of the hole in the sphere .
+- *slice angle*: angle of the sphere around the Z axis.
+- *vertex for cut plan*: the vertex along the vertical axis where the rind will be cut.
+- *nb Radial* : number of hexahedra on radial.
+- *nb Angular* : number of hexahedra along the perimeter of the sphere.
+- *nb Height* : number of hexahedra along the axis of the sphere.
+
+The result of this action is:
+
+.. image:: _static/sphereuniform.png
+ :align: center
+
+.. centered::
+ Uniform Sphere
+
+TUI command: :ref:`tuisphereuniform`
+
+
+.. _guispherecustom:
+
+Custom Sphere
+=============
+
+.. image:: _static/gui_spherecustom.png
:align: center
.. centered::
- Dialog Box for an hemispherical grid
+ Parameters for a Custom Sphere
The following data are required:
-- Sphere
- - center: center coordinates of the sphere (select a vertex).
- - external radius: radius size of the sphere.
- - internal radius: fill this field to create rind (**optional**).
+- *center*: center coordinates of the sphere (select a vertex).
+- *axis* : the axis of the hole (select a vector).
+- *base* : the base of the sphere (select a vector).
+- *radius*: a list of radiuses in ascendant order.
+- *angle* : a list of angles in ascendant order.
+- *height*: a list of heights in ascendant order.
+
+The result of this action is:
+
+.. image:: _static/spherecustom.png
+ :align: center
+
+.. centered::
+ Custom Sphere
+
+TUI command: :ref:`tuispherecustom`
-- Hole
- - axis(z): axes of the hole (select a vector).
- - radius: radius size of the hole.
-- Cross section
- - point: coordinates of a point on the surface of the cross section (select a vertex).
- - vector: normal vector to the surface of the cross section (select a vector).
+.. _guirinduniform:
-- Radial section
- - start : a vector defining the start of the radial section (select a vector).
- - angle : fill this field to customize the section (value in degree, **optional**).
+Uniform Rind
+============
-- Grid
- - n (radial) : number of hexahedra from the center of the sphere.
- - n (anglular): number of hexahedra along the perimeter of the sphere.
- - n (height) : number of hexahedra on the height of the sphere.
+.. image:: _static/gui_rinduniform.png
+ :align: center
-From this dialog box, four kinds of grid can be created:
+.. centered::
+ Parameters for a Uniform Rind
+
+The following data are required:
-- hemispherical grid (see :ref:`guihemisphericalgrid`),
-- partial hemisphericalgrid (see :ref:`guiparthemisphericalgrid`),
-- rind grid (see :ref:`guirindgrid`),
-- partial rind grid (see :ref:`guipartrindgrid`).
+- *center* : center coordinates of the rind (select a vertex).
+- *axis* : the vertical axis of the rind (select a vector).
+- *base* : the base of the rind (select a vector).
+- *external radius*: the radius of the rind.
+- *internal radius*: the internal radius.
+- *hole radius*: the radius of the hole.
+- *slice angle*: angle of the rind around the Z axis.
+- *vertex for cut plan*: the vertex along the vertical axis where the rind will be cut.
+- *nb Radial* : number of hexahedra on radial.
+- *nb Angular* : number of hexahedra along the perimeter.
+- *nb Height* : number of hexahedra along the axis of the rind.
+
+The result of this action is:
+
+.. image:: _static/rinduniform.png
+ :align: center
+.. centered::
+ Uniform Rind
+TUI command: :ref:`tuirinduniform`
-.. _guihemisphericalgrid:
-HemiSpherical Grid
-==================
+.. _guirindcustom:
-This is the default kind of grid when no optional values are filled.
+Custom Rind
+===========
-.. image:: _static/hemisphericalgrid.png
+.. image:: _static/gui_rindcustom.png
:align: center
.. centered::
- An hemispherical grid
+ Parameters for a Custom Rind
+
+The following data are required:
+
+- *center*: center coordinates of the rind (select a vertex).
+- *axis* : the vertical axis (select a vector).
+- *base* : the base of the rind (select a vector).
+- *radius*: a list of radiuses in ascendant order.
+- *angle* : a list of angles in ascendant order.
+- *height*: a list of heights in ascendant order.
-TUI command: :ref:`tuihemisphericalgrid`
+
+The result of this action is:
+
+.. image:: _static/rindcustom.png
+ :align: center
+.. centered::
+ Custom Rind
-.. _guiparthemisphericalgrid:
+TUI command: :ref:`tuirindcustom`
-Partial HemiSpherical Grid
-==========================
-To create a partial hemispherical grid: On *Radial section* check the *partial* check box and fill in the *angle* parameter.
+.. _guiconcentricsimple:
+Simple Concentric (Spherical)
+=============================
-.. image:: _static/parthemisphericalgrid.png
+.. image:: _static/gui_concentricsimple.png
:align: center
.. centered::
- A partial hemispherical grid
+ Parameters for a Simple Concentric
+
+
+The following data are required:
-TUI command: :ref:`tuiparthemisphericalgrid`
+- *nb Layers*: the number of nested hexahedra.
+- *Criteria*
+
+The result of this action is:
+.. image:: _static/concentricsimple.png
+ :align: center
+.. centered::
+ Simple Concentric
-.. _guirindgrid:
+TUI command: :ref:`tuiconcentricsimple`
-Rind Grid
-==========
-To create a rind grid: On *Sphere* check the *rind* check box and fill in the *internal radius* parameter.
+.. _guiconcentricuniform:
+Uniform Concentric (Spherical)
+==============================
-.. image:: _static/rindgrid.png
+.. image:: _static/gui_concentricuniform.png
:align: center
.. centered::
- A rind grid
+ Parameters for a Uniform Concentric
-TUI command: :ref:`tuirindgrid`
+The following data are required:
+- *center*: the center's coordinates (select a vertex).
+- *axis* : the vertical axis (select a vector).
+- *base* : the base of the concentric (select a vector).
+- *external radius*: the radius of the concentric.
+- *nb Layers*: the number of nested hexahedra in the concentric.
+- *Criteria*.
-.. _guipartrindgrid:
+TUI command: :ref:`tuiconcentricuniform`
-Partial Rind Grid
-=================
-To create a partial rind grid: in addition to the *internal radius* parameter
-(see :ref:`guirindgrid`), on *Radial section* check the *partial* check box and fill
-in the *angle* parameter.
+.. _guiconcentriccustom:
+Custom Concentric (Spherical)
+=============================
-.. image:: _static/partrindgrid.png
+.. image:: _static/gui_concentriccustom.png
:align: center
.. centered::
- A partial rind grid
+ Parameters for a Custom Concentric
+
+The following data are required:
-TUI command: :ref:`tuipartrindgrid`
+- *center*: the center's coordinates (select a vertex).
+- *axis* : the vertical axis (select a vector).
+- *base* : the base of the concentric (select a vector).
+- *criteria*.
+- *radius*: a list of radiuses in ascendant order.
+
+The result of this action is:
+
+.. image:: _static/concentriccustom.png
+ :align: center
+
+.. centered::
+ Custom Concentric
+TUI command: :ref:`tuiconcentriccustom`
:tocdepth: 3
-.. _guiprismjoinquad:
+.. _guiextrudejoinquads:
-==========================
-Prism and join quadrangles
-==========================
+============================
+Extrude and join quadrangles
+============================
-.. _prismquad:
+.. _guiextrudequads:
-Prism Quadrangles
-=================
+Extrude Quadrangles
+===================
-To prism from quadrangles in the **Main Menu** select **Model -> Operation -> Prism Quadrangles**.
+To extrude from quadrangles in the **Main Menu** select **Model -> Operation -> Extrude Quadrangles**.
From a list of quadrangles, a set of hexahedra is created.
-Regular
--------
+.. _guiextrudequadssimple:
-**Arguments:**
-
-- a list of quadrangles
-- a vector (direction)
-- the number of layers
+Simple Extrude
+--------------
-The dialogue box to prism from quadrangles is:
+The dialogue box to make a simple extrude of quadrangles is:
-.. image:: _static/gui_prism_quads.png
+.. image:: _static/gui_extrudequadssimple.png
:align: center
.. centered::
- Prism From Quadrangles
+ Simple Extrude From Quadrangles
+**Arguments:**
+- *Quad(s)* : the list of quadrangles to be extruded.
+- *Nb layers* : the number of layers of hexahedra resulting from the extrusion.
-Example:
+The direction of the extrusion is the vertical axis (Z axis).
-.. image:: _static/prisme_gui.png
- :align: center
+TUI command: :ref:`tuiextrudequadssimple`
-.. centered::
- Prism Quads
-
-Irregular
----------
+.. _guiextrudequadsuniform:
-**Arguments:**
-
-- a list of quadrangles
-- a vector (direction)
-- a list of heights (a height for each layer - ascending)
+Uniform Extrude
+---------------
-The dialogue box to prism from quadrangles irregular mode is:
+The dialogue box to make a uniform extrude of quadrangles is:
-.. image:: _static/gui_prism_quads_irregular.png
+.. image:: _static/gui_extrudequadsuniform.png
:align: center
.. centered::
- Prism From Quadrangles (Irregular mode)
+ Uniform Extrude From Quadrangles
+
+**Arguments:**
+- *Quad(s)* : the list of quadrangles to be extruded.
+- *dircection*: the direction of the extrusion.
+- *length* : the length of hexahedra resulting from the extrusion.
+- *Nb layers* : the number of layers of hexahedra resulting from the extrusion.
+TUI command: :ref:`tuiextrudequadsuniform`
-Example:
-.. image:: _static/prisme_gui2.png
+.. _guiextrudequadscustom:
+
+Custom Extrude
+--------------
+
+The dialogue box to make a custom extrude of quadrangles is:
+
+
+.. image:: _static/gui_extrudequadscustom.png
:align: center
.. centered::
- Irregular Prism Quads
-
-TUI command: :ref:`tuiprismquad`
+ Custom Extrude From Quadrangles
+
+**Arguments:**
+
+- *Quad(s)* : the list of quadrangles to be extruded.
+- *direction* : the direction of the extrusion.
+- *height* : a list of heights (in ascendant order because the size is computed from the origin) to specify the size of each layer of extrusion.
+
+TUI command: :ref:`tuiextrudequadscustom`
-.. _joinquad:
+
+.. _guijoinquads:
Join Quadrangles
================
To join quadrangles in the **Main Menu** select **Model -> Operation -> Join Quadrangles**.
-.. image:: _static/gui_join_quads.png
+.. _guijoinquadsuniform:
+
+Uniform Join Quadrangles
+------------------------
+
+.. image:: _static/gui_joinquadsuniform.png
:align: center
.. centered::
- Join Quadrangles Dialog Box
+ Uniform Join Quadrangles Dialog Box
+
+
+**Arguments:**
+
+- *Quad(s)* : the set of quadrangles to be joined and from which hexahedra will be created.
+- *From point a*: a vertex belonging to the first quadrangle of the set of quadrangles.
+- *From point b*: a vertex, consecutive to previous Point a, belonging to the first quadrangle.
+
+- *Quadrangle* : a quadrangle from the set of targeted quadrangles.
+- *To point a* : the target vertex (in the target quadrangle) for *From point a*.
+- *To point b* : the target vertex (in the target quadrangle) for *From point b*.
+
+- *Nb layers* : number of layers of hexahedra issued from the operation.
-The following data are required:
+TUI command: :ref:`tuijoinquadsuniform`
-- From
- - Quadrangles: the set of quadrangles to be joined and from which hexahedra will be created.
- - Point a: a vertex belonging to the first quadrangle of the set of quadrangles.
- - Point b: a vertex, consecutive to previous Point a, belonging to the first quadrangle.
-- To
- - Quadrangle: a quadrangle from the set of targeted quadrangles.
- - Point a: the target vertex (in the target quadrangle) for *From.Point a*.
- - Point b: the target vertex (in the target quadrangle) for *From.Point b*.
+.. _guijoinquadscustom:
+
+Custom Join Quadrangles
+-----------------------
+
+.. image:: _static/gui_joinquadscustom.png
+ :align: center
+
+.. centered::
+ Custom Join Quadrangles Dialog Box
+
+**Arguments:**
+
+- *Quad(s)* : the set of quadrangles to be joined and from which hexahedra will be created.
+- *From point a*: a vertex belonging to the first quadrangle of the set of quadrangles.
+- *From point b*: a vertex, consecutive to previous Point a, belonging to the first quadrangle.
+
+- *Quadrangle* : a quadrangle from the set of targeted quadrangles.
+- *To point a* : the target vertex (in the target quadrangle) for *From point a*.
+- *To point b* : the target vertex (in the target quadrangle) for *From point b*.
-- Grid
- - size: number of layers of hexahedra issued from the operation.
+- *height* : a list of heights to specify the size of each layer of hexahedra issued from the operation.
-TUI command: :ref:`tuijoinquad`
+TUI command: :ref:`tuijoinquadscustom`
:tocdepth: 3
-.. _guiquadrevolution:
+.. _guiquadsrevolution:
===============
Quad revolution
To make a **Quad revolution** in the **Main Menu** select **Model -> Operation -> Quad Revolution**.
-.. image:: _static/gui_quadrevolution.png
+.. _guiquadsrevolutionuniform:
+
+Uniform Quad Revolution
+=======================
+
+.. image:: _static/gui_quadsrevolutionuniform.png
:align: center
.. centered::
- Dialog Box to make a quadrangle revolution
+ Dialog Box to make a uniform quadrangle revolution
+
+**Arguments:**
+- *Quad(s)* : a set of quadrangles from which hexahedrons will be created (select quads).
+- *center* : center of rotation (select a vertex).
+- *axis* : axis of rotation (select a vector).
+- *angle* : Specify the rotation's angle at each step.
+- *Nb layers*: the number of steps.
-The following data are required:
- - Quads: a set of quadrangles from which hexahedrons will be created (select quads).
- - Center: center of rotation (select a vertex).
- - Axis: axis of rotation (select a vector).
- - Angles: a set of angle (in degrees). Specify the rotation's angle at each step of it.
+TUI command: :ref:`tuiquadsrevolutionuniform`
-Here is an example where the selected quadrangles are highlighted:
+.. _guiquadsrevolutioncustom:
-.. image:: _static/before_quadrevolution.png
+Custom Quad Revolution
+======================
+
+.. image:: _static/gui_quadsrevolutioncustom.png
:align: center
.. centered::
- Quad selection
-
+ Dialog Box to make a custom quadrangle revolution
-The result:
-.. image:: _static/quadrevolution.png
- :align: center
+**Arguments:**
-.. centered::
- Quadrangle revolution
+- Quad(s): a set of quadrangles from which hexahedrons will be created (select quads).
+- center: center of rotation (select a vertex).
+- axis: axis of rotation (select a vector).
+- angle: a set of angle (in degrees). Specify the rotation's angle at each step.
-TUI command: :ref:`tuiquadrevolution`
+TUI command: :ref:`tuiquadsrevolutioncustom`
gui_quadrangle.rst
gui_hexahedron.rst
gui_vector.rst
- gui_cyl.rst
- gui_pipe.rst
gui_blocks_for_cyl_pipe.rst
creategrids.rst
gui_hemisphere.rst
tui_quadrangle.rst
tui_hexahedron.rst
tui_vector.rst
- tui_cyl.rst
- tui_pipe.rst
tui_blocks_for_cyl_pipe.rst
tui_cartgrid.rst
- tui_cylgrid.rst
- tui_sphergrid.rst
tui_hemisphere_rind.rst
tui_remove.rst
tui_cut_hexa.rst
--- /dev/null
+# -*- coding: utf-8 -*-
+####### Test Cartesian Grid #################
+
+import hexablock
+
+
+doc = hexablock.addDocument ("Cartesian Grid Test")
+
+# Simple Cartesian Grid
+
+nbX = 3
+nbY = 4
+nbZ = 5
+
+grid0 = doc.makeCartesianTop(nbX, nbY, nbZ)
+grid0.saveVtk("makeCartesianTop.vtk")
+
+# Uniform Cartesian Grid
+
+orig1 = doc.addVertex(10, 0, 0)
+
+vecX = doc.addVector(1, 0, 0)
+vecY = doc.addVector(0, 1, 0)
+vecZ = doc.addVector(0, 0, 1)
+
+lenX = 5
+lenY = 3.5
+lenZ = 2
+
+grid1 = doc.makeCartesianUni(orig1, vecX, vecY, vecZ, lenX, lenY, lenZ, nbX, nbY, nbZ)
+grid1.saveVtk("makeCartesianUni.vtk")
+
+# Custom Cartesian Grid
+
+orig2 = doc.addVertex(20, 0, 0)
+
+tx = [] # a list of x coordinates
+ty = [] # a list of y coordinates
+tz = [] # a list of z coordinates
+for i in range(6):
+ tx.append(i+1)
+ ty.append(i+1)
+ tz.append(i+1)
+# tx=ty=tz=[1,2,3,4,5,6]
+
+grid2 = doc.makeCartesian(orig2, vecX, vecY, vecZ, tx, ty, tz)
+grid2.saveVtk("makeCartesian.vtk")
--- /dev/null
+# -*- coding: utf-8 -*-
+####### Test for Cut Hexa ###############
+
+import hexablock
+
+
+doc = hexablock.addDocument("Cut Hexa Test")
+
+size_x = 2
+size_y = 1
+size_z = 1
+
+grid = doc.makeCartesianTop (size_x,size_y,size_z)
+arete = grid.getEdgeK (0, 0, 0)
+
+doc.saveVtk ("decoupe1.vtk")
+nbCuts = 2
+grid2 = doc.cutUni (arete, nbCuts)
+doc.saveVtk ("decoupe2.vtk")
+
+#tablen = []
+#reste = 1
+#abscisse = 0
+#for nl in range(5):
+# reste /= 2
+# abscisse += reste
+# tablen.append (abscisse)
+tablen = [2, 3, 8, 14, 18]
+arete = grid2.getEdge(0)
+grid3 = doc.cut(arete, tablen)
+doc.saveVtk ("decoupe3.vtk")
--- /dev/null
+# -*- coding: utf-8 -*-
+####### Make Cylinder Test ##########
+
+import hexablock
+
+
+# Simple Cylinder -----
+
+doc = hexablock.addDocument ("Make Cylinder Test")
+
+nbR = 8
+nbA = 10
+nbH = 8
+
+cylinder0 = doc.makeCylinderTop (nbR, nbA, nbH)
+cylinder0.saveVtk ("makeCylinderTop.vtk")
+
+# Uniform Cylinder -----
+
+origin = doc.addVertex (0, 0, 5)
+vx = doc.addVector (1, 0, 0)
+vz = doc.addVector (0, 0, 1)
+rint = 2
+rext = 4
+angle = 300
+hauteur = 1
+
+
+cylinder1 = doc.makeCylinderUni (origin, vx, vz, rint, rext, angle, hauteur, nbR, nbA, nbH)
+cylinder1.saveVtk ("makeCylinderUni.vtk")
+
+# Custom Cylinder
+
+origin = doc.addVertex (5, 0, 0)
+tr = [10, 20, 30, 40]
+ta = [45, 90, 135, 180, 225]
+th = [5, 30, 40, 60]
+
+cylinder2 = doc.makeCylinder(origin, vx, vz, tr, ta, th)
+cylinder2.saveVtk("makeCylinder.vtk")
--- /dev/null
+# -*- coding: utf-8 -*-
+####### Make Cylinders Test ##########
+
+import hexablock
+import math
+
+
+doc = hexablock.addDocument ("Make Cylinders Test")
+
+rext1 = 2*math.sqrt (2.0)
+rext2 = 3*math.sqrt (2.0)
+h1 = 16
+h2 = 16
+xl1 = -8
+
+orig1 = doc.addVertex ( 0, 0, xl1)
+orig2 = doc.addVertex (-8, 0, 0)
+vz1 = doc.addVector ( 0, 0, 1)
+vz2 = doc.addVector ( 1, 0, 0)
+
+cylinders = doc.makeCylinders (orig1, vz1, rext1, h1, orig2, vz2, rext2, h2)
+cylinders.saveVtk("makeCylinders.vtk")
--- /dev/null
+# -*- coding: utf-8 -*-
+####### Test for Extrude Quad ###############
+
+import hexablock
+
+
+doc = hexablock.addDocument("Extrude Quad Test")
+
+dimx = 11
+dimy = 11
+dimz = 2
+
+orig1 = doc.addVertex ( 0,0,0)
+vx = doc.addVector ( 1,0,0)
+vy = doc.addVector ( 0,1,0)
+vz = doc.addVector ( 0,0,1)
+dir1 = doc.addVector ( 1,1,1)
+dir2 = doc.addVector ( 1,1,-1)
+
+dx =1
+dy=1
+dz=1
+
+grid1 = doc.makeCartesianUni (orig1, vx,vy,vz, dx,dy,dz, dimx,dimy,dimz)
+
+mx = dimx/2
+my = dimy/2
+liste1 = []
+liste2 = []
+
+liste1.append(grid1.getQuadIJ (mx, my, dimz))
+liste2.append(grid1.getQuadIJ (mx, my, 0))
+for nx in range(dimx):
+ if nx!=mx:
+ liste1.append(grid1.getQuadIJ (nx, my, dimz))
+ liste2.append(grid1.getQuadIJ (nx, my, 0))
+
+for ny in range(dimy):
+ if ny!=my:
+ liste1.append(grid1.getQuadIJ (mx, ny, dimz))
+ liste2.append(grid1.getQuadIJ (mx, ny, 0))
+
+tlen = []
+dh0 = 1
+dh = 0.02
+lh = 0
+for nro in range(5):
+ dh = 1.5*dh + 1
+ lh += dh
+ tlen.append(lh)
+
+nbiter = 5
+doc.saveVtk ("prisme1.vtk")
+prisme2 = doc.extrudeQuadsUni (liste2, dir2, dh0, nbiter)
+doc.saveVtk ("prisme2.vtk")
+
+prisme1 = doc.extrudeQuads (liste1, dir1, tlen)
+
+doc.saveVtk ("prisme3.vtk")
--- /dev/null
+# -*- coding: utf-8 -*-
+####### Concentric (Spherical) Grid Test ##########
+
+import hexablock
+
+
+doc = hexablock.addDocument ("Spherical Grid Test")
+
+# Simple Spherical Grid -----
+
+nbLayers = 3
+crit = 0
+
+grid0 = doc.makeSphericalTop(nbLayers, crit)
+grid0.saveVtk("makeSphericalTop.vtk")
+
+# Uniform Spherical Grid -----
+
+center = doc.addVertex (0, 0, 10)
+vx = doc.addVector (1, 0, 0)
+vz = doc.addVector (0, 1, 1)
+rayon = 1
+
+grid1 = doc.makeSphericalUni(center, vx, vz, rayon, nbLayers, crit);
+grid1.saveVtk("makeSphericalUni.vtk")
+
+# Custom Spherical Grid-----
+
+tr = [10, 20, 30, 40] # a list of radiuses (one radius for each layer)
+
+grid2 = doc.makeSpherical (center, vx, vz, tr, crit)
+grid2.saveVtk("makeSpherical.vtk")
--- /dev/null
+# -*- coding: utf-8 -*-
+####### Rind Grid Test ##########
+
+import hexablock
+
+
+doc = hexablock.addDocument ("Rind Grid Test")
+
+
+# Simple Rind -----
+
+
+nr = 4
+na = 8
+nh = 12
+
+rind0 = doc.makeRindTop(nr, na, nh)
+rind0.saveVtk("makeRindTop.vtk")
+
+# Uniform Rind -----
+
+center = doc.addVertex (0, 0, 0)
+vplan = doc.addVertex (0, 0, -0.5)
+vx = doc.addVector (1, 0, 0)
+vz = doc.addVector (0, 0, 1)
+rtrou = 1
+rint = 8
+rext = 10
+angle = 180
+
+rind1 = doc.makeRindUni(center, vx, vz, rtrou, rint, rext, angle, vplan, nr, na, nh)
+rind1.saveVtk("makeRindUni.vtk")
+
+# Custom Rind -----
+
+dr = (rext-rtrou)/nr
+dtheta = angle/na
+dphi = 180.0/nh
+trad = []
+tang = []
+tphi = []
+
+trad.append(rtrou)
+for nro in range(nr+1):
+ trad.append(rint + nro*dr)
+
+for nro in range(na+1):
+ tang.append(nro*dtheta)
+
+for nro in range(nh+1):
+ tphi.append(-90 + nro*dphi)
+
+rind2 = doc.makeRind(center, vx, vz, trad, tang, tphi)
+rind2.saveVtk("makeRind.vtk")
--- /dev/null
+# -*- coding: utf-8 -*-
+####### Sphere Grid Test ##########
+
+import hexablock
+
+
+doc = hexablock.addDocument ("Sphere Grid Test")
+
+# Simple Sphere -----
+
+nr = 4
+na = 8
+nh = 12
+
+sphere0 = doc.makeSphereTop(nr, na, nh)
+sphere0.saveVtk("makeSphereTop.vtk")
+
+# Uniform Sphere -----
+
+center = doc.addVertex (0, 0, 0)
+vplan = doc.addVertex (0, 0, -0.5)
+vx = doc.addVector (1, 0, 0)
+vz = doc.addVector (0, 0, 1)
+rtrou = 1
+rext = 10
+angle = 180
+
+sphere1 = doc.makeSphereUni (center, vx, vz, rtrou, rext, angle, vplan, nr, na, nh)
+sphere1.saveVtk("makeSphereUni.vtk")
+
+# Custom Sphere -----
+
+dr = (rext-rtrou)/nr
+dtheta = angle/na
+dphi = 180.0/nh
+trad = []
+tang = []
+tphi = []
+
+for nro in range(nr+1):
+ trad.append(rtrou + nro*dr)
+
+for nro in range(na+1):
+ tang.append(nro*dtheta)
+
+for nro in range(nh+1):
+ tphi.append(-90 + nro*dphi)
+
+sphere2 = doc.makeSphere (center, vx, vz, trad, tang, tphi)
+sphere2.saveVtk("makeSphere.vtk")
--- /dev/null
+# -*- coding: utf-8 -*-
+####### Test for Join Quad ###############
+
+import hexablock
+
+
+
+doc = hexablock.addDocument("Join Quad Test")
+
+dimx = 11
+dimy = 11
+dimz = 2
+
+grid1 = doc.makeCartesianTop (dimx,dimy,dimz)
+
+orig2 = doc.addVertex(dimx/2.0,0,8)
+vectj = doc.addVector (0,1,0);
+vecti = doc.addVector (1,0,0);
+grid2 = doc.makeCylinderUni (orig2, vecti, vectj, 1.0, 2.0, 180.0, 11.0, dimz,dimy,dimx)
+
+mx = dimx/2
+my = dimy/2
+prems = grid1.getQuadIJ (mx, my, dimz)
+cible = grid2.getQuadJK (dimz, mx, my)
+
+va1 = prems.getVertex (0)
+va2 = prems.getVertex (1)
+
+vb1 = cible.getVertex (1)
+vb2 = cible.getVertex (2)
+
+hauteur = 5
+
+liste = []
+
+liste.append(prems)
+for nx in range(mx):
+ if nx!=mx:
+ liste.append(grid1.getQuadIJ(nx, my, dimz))
+
+for ny in range(dimy):
+ if (ny!=my):
+ liste.append(grid1.getQuadIJ (mx, ny, dimz))
+
+doc.saveVtk ("jointQuad1.vtk")
+joint = doc.joinQuadsUni (liste, cible, va1,vb1,va2,vb2, hauteur)
+doc.saveVtk ("jointQuad2.vtk")
--- /dev/null
+# -*- coding: utf-8 -*-
+####### Make Pipe Test ##########
+
+import hexablock
+
+doc = hexablock.addDocument ("Make Pipe Test")
+
+# Simple Pipe -----
+
+nbR = 8
+nbA = 10
+nbH = 8
+
+pipe0 = doc.makePipeTop (nbR, nbA, nbH)
+pipe0.saveVtk ("makePipeTop.vtk")
+
+# Uniform Pipe -----
+
+orig = doc.addVertex (0, 0, 0)
+vx = doc.addVector (1, 0, 0)
+vz = doc.addVector (0, 0, 1)
+rint = 1
+rext = 3
+angle = 360
+hauteur = 2
+
+pipe1 = doc.makePipeUni (orig, vx, vz, rint, rext, angle, hauteur, nbR, nbA, nbH)
+pipe1.saveVtk ("makePipeUni.vtk");
+
+
+# Custom Pipe -----
+
+origin = doc.addVertex (0, 5, 0)
+tr = [10, 20, 30, 40]
+ta = [45, 90, 135, 180, 225]
+th = [5, 30, 40, 60]
+
+pipe2 = doc.makePipe(origin, vx, vz, tr, ta, th)
+pipe2.saveVtk("makePipe.vtk")
--- /dev/null
+# -*- coding: utf-8 -*-
+####### Make Pipes Test ##########
+
+import hexablock
+import math
+
+
+doc = hexablock.addDocument ("Make Pipes Test")
+
+rext1 = 2*math.sqrt (2.0)
+rext2 = 3*math.sqrt (2.0)
+rint1 = rext1/2
+rint2 = rext1
+h1 = 16
+h2 = 16
+xl1 = -8
+
+orig1 = doc.addVertex ( 0, 0, xl1)
+orig2 = doc.addVertex (-8, 0, 0)
+vz1 = doc.addVector ( 0, 0, 1)
+vz2 = doc.addVector ( 1, 0, 0)
+
+pipes = doc.makePipes (orig1, vz1, rint1, rext1, h1, orig2, vz2, rint2, rext2, h2);
+pipes.saveVtk("makePipes.vtk")
--- /dev/null
+# -*- coding: utf-8 -*-
+#### Quad Revolution Test #####
+
+import hexablock
+
+
+doc = hexablock.addDocument("Quad Revolution Test")
+
+center = doc.addVertex(0, 0, 0)
+vz = doc.addVector(0, 0, 1)
+
+v1 = doc.addVertex (10, 0, 0)
+v2 = doc.addVertex (11, 0, 0)
+v3 = doc.addVertex (11, 0, 2)
+v4 = doc.addVertex (10, 0, 2)
+quad = doc.addQuadVertices (v1, v2, v3, v4)
+doc.saveVtk("revolution1.vtk")
+
+angle = 180
+nbLayers = 8
+grid0 = doc.revolutionQuadUni (quad, center, vz, angle, nbLayers)
+doc.saveVtk ("revolution2.vtk")
+
+nr = 1
+na = 6
+nl = 1
+
+grid = doc.makeCylinderTop (nr,na,nl)
+
+liste = []
+for nx in range(nr):
+ for ny in range(na):
+ cell = grid.getQuadIJ (nx, ny, nl)
+ liste.append(cell)
+
+center = doc.addVertex(0, -10, 0)
+axis = doc.addVector (1, 0, 0)
+angle = 180
+nbLayers = 9
+grid1 = doc.revolutionQuadsUni (liste, center, axis, angle, nbLayers)
+if grid1.isValid():
+ doc.saveVtk ("revolution3.vtk")
.. _tuiblockscylinderpipe:
-=====================================
-Make blocks for a cylinder and a pipe
-=====================================
+================================
+Cylinders and Pipes Construction
+================================
-.. _tuimakecylinder:
+.. _tuicylinder:
-Make blocks for a cylinder
-==========================
+Cylinder
+========
-.. code-block:: python
+.. _tuicylindersimple:
- elts = doc.makeCylinder(cyl, vb, nr, na, nl)
+Simple Cylinder
+---------------
-cyl: cylinder built using *addCylinder()* function (:ref:`tuicylinder`)
+To make a simple cylinder grid in python mode, the following data are required:
-vb: vector on the base of the cylinder to start hexahedra.
+- *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.
-nr: number of blocks on radial.
+Use the function **makeCyinderTop**::
-na: number of angular section.
+ elts = doc.makeCylinderTop(nbR, nbA, nbH)
-nl: number of blocks along the axis of the cylinder.
+GUI command: :ref:`guicylindersimple`
-Operations on *elts*: :ref:`tuielements2`
-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.
+.. _tuicylinderuniform:
+Uniform Cylinder
+----------------
-Example of cylinder construction
---------------------------------
+The following data are required:
-.. literalinclude:: test_doc/cylinder_pipe/make_cylinder.py
- :linenos:
+- *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)
-.. image:: _static/make_cylinder.png
- :align: center
+GUI command: :ref:`guicylinderuniform`
-.. centered::
- Cylinder
+.. _tuicylindercustom:
-.. _tuimakecylinders:
+Custom Cylinder
+---------------
-Make blocks for cylinders
-=========================
+The following data are required:
-.. code-block:: python
+- *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.
- elts = doc.makeCylinders (cylinder1, cylinder2)
+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`
-Construction of an element from 2 cylinders:
-.. literalinclude:: test_doc/cylinder_pipe/make_cylinders.py
+Example
+-------
+
+.. literalinclude:: test_doc/cylinder/cylinder.py
:linenos:
-.. image:: _static/make_cylinders.png
- :align: center
+.. _tuicylinders:
-.. centered::
- Element from 2 cylinders
-
-The result is an array of hexahedral.
+Make Cylinders
+==============
+
+To make **two cylinders in T shape** the following data are required for each cylinder:
+
+- *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.
+*One of the two cylinders must be bigger than the other.*
-.. _tuimakepipe:
+Use the function **makeCylinders**::
-Make blocks for a pipe
-======================
+ elts = doc.makeCylinders (orig1, vz1, rext1, h1, orig2, vz2, rext2, h2)
-.. code-block:: python
+GUI command: :ref:`guicylinders`
- elts = doc.makePipe(pi, vb, nr, na, nl)
+Operations on *elts*: :ref:`tuielements2`
-pi: pipe built using *addPipe()* function (:ref:`tuipipe`)
-vb: vector on the base of the pipe to start hexahedra.
+Example
+-------
-nr: number of blocks on radial.
+.. literalinclude:: test_doc/cylinder/cylinders.py
+ :linenos:
+
-na: number of angular section.
+.. _tuipipe:
-nl: number of blocks along the axis of the pipe.
+Pipe
+====
-Operations on *elts*: :ref:`tuielements2`
+.. _tuipipesimple:
-The result is an array of hexahedral arranged in layers following the
-first radial and angular layers, and finally the axial layers.
+Simple Pipe
+-----------
+To make a simple pipe grid in python mode, the following data are required:
-Example of pipe construction
-----------------------------
+- *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.
-.. literalinclude:: test_doc/cylinder_pipe/make_pipe.py
- :linenos:
+Use the function **makePipeTop**::
+
+ elts = doc.makePipeTop(nbR, nbA, nbH)
+
+GUI command: :ref:`guipipesimple`
+
+
+.. _tuipipeuniform:
+Uniform Pipe
+------------
-.. image:: _static/make_pipe.png
- :align: center
+The following data are required:
-.. centered::
- Pipe
-.. _tuimakepipes:
+- *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.
-Make blocks for pipes
-=====================
+Use the function **makePipeUni** to make a uniform pipe::
-.. code-block:: python
+ elts = doc.makePipeUni(origin, vx, vz, rint, rext, angle, hauteur, nbR, nbA, nbH)
- elts = doc.makePipes (pipe1, pipe2)
+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`
-Construction of an element from 2 pipes:
+Example
+-------
-.. literalinclude:: test_doc/cylinder_pipe/make_pipes.py
+.. literalinclude:: test_doc/pipe/pipe.py
:linenos:
+
-.. image:: _static/make_pipes.png
- :align: center
+.. _tuipipes:
-.. centered::
- Element from 2 pipes
+Make Pipes
+==========
-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.
+To make **two pipes in T shape** the following data are required for each pipe:
+
+- *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.
+
+*One of the two pipes must be bigger than the other.*
+
+Use the function **makepipes**::
+
+ elts = doc.makePipes(orig1, vz1, rint1, rext1, h1, orig2, vz2, rint2, rext2, h2)
+
+GUI command: :ref:`guipipes`
Operations on *elts*: :ref:`tuielements2`
-GUI command: :ref:`guiblockscylinderpipe`
+
+Example
+-------
+
+.. literalinclude:: test_doc/pipe/pipes.py
+ :linenos:
Make cartesian grids
====================
-To add a cartesian grid to the model, the following data are required:
+.. _tuicartgridsimple:
-- the vertex of the initial hexahedron: *pt*
-- the vector corresponding to the diametrically opposite vertex to the initial vertex: *vx, vy, vz*
-- the number of repetition of this hexahedra along the three axes: *ni, nj, nk*
+Simple Cartesian Grid
+=====================
-Make a Cartesian grid::
+To add a simple cartesian grid to the model, the following data are required:
- elts = doc.makeCartesian(pt, vx, vy, vz, ni, nj, nk)
+- *nb X*: The number of hexahedra along the X axis
+- *nb Y*: The number of hexahedra along the Y axis
+- *nb Z*: The number of hexahedra along the Z axis
-or:
- - the vertex of the initial hexahedron: *pt*
- - the vector corresponding to the diametrically opposite vertex to the initial vertex
- - the coordinates of the vector *vec1* on x, y and z: *px, py, pz*
- - the number of repetition of this hexahedra along the three axes: *mx, my, mz*
-.. code-block:: python
+Make a Simple Cartesian Grid::
- elts = doc.makeCartesian1(pt, vec1, px, py, pz, mx, my, mz)
+ elts = doc.makeCartesianTop(nbX, nbY, nbZ)
-Operations on *elts*: :ref:`tuielements2`
+GUI command: :ref:`guicartgridsimple`
-Example
--------
+.. _tuicartgriduniform:
+Uniform Cartesian Grid
+======================
-.. literalinclude:: test_doc/grid/cartesian_grid.py
- :linenos:
+To add a uniform cartesian grid to the model, the following data are required:
+
+- *origin*: The vertex of the origin
+- *vec X* : The X vector
+- *vec Y* : The Y vector
+- *vec Z* : The Z vector
+- *len X* : The length of an hexahedra on the X axis
+- *len Y* : The length of an hexahedra on the Y axis
+- *len Z* : The length of an hexahedra on the Z axis
+- *nb X* : The number of hexahedra on the X axis
+- *nb Y* : The number of hexahedra on the Y axis
+- *nb Z* : The number of hexahedra on the Z axis
+
+Make a Uniform Cartesian Grid::
+
+ elts = doc.makeCartesianUni(orig, vecX, vecY, vecZ, lenX, lenY, lenZ, nbX, nbY, nbZ)
+
+GUI command: :ref:`guicartgriduniform`
+
+
+.. _tuicartgridcustom:
+Custom Cartesian Grid
+=====================
-.. image:: _static/cartesian_grid.png
- :align: center
+To add a custom cartesian grid to the model, the following data are required:
-.. centered::
- Cartesian Grid
+- *origin*: The vertex of the origin
+- *vec X* : The X vector
+- *vec Y* : The Y vector
+- *vec Z* : The Z vector
+- *tx* : A list of x coordinates in ascendant order
+- *ty* : A list of y coordinates in ascendant order
+- *tz* : A list of z coordinates in ascendant order
+Make a Custom Cartesian Grid::
-GUI command: :ref:`guicartgrid`
+ elts = doc.makeCartesian(orig, vecX, vecY, vecZ, tx, ty, tz)
+
+GUI command: :ref:`guicartgridcustom`
+
+
+Operations on *elts*: :ref:`tuielements2`
+
+
+Example
+=======
+
+.. literalinclude:: test_doc/cartesian_grid/cartesian_grid.py
+ :linenos:
Cut hexahedra
=============
-Cut hexahedra from the model of blocks::
+.. _tuicuthexauniform:
- elts = doc.cut(an_edge, nb_of_cuts)
+Uniform Cut
+===========
-Operations on *elts*: :ref:`tuielements2`
+To make a uniform cut of an hexahedra in python mode, you need the following arguments:
-This method enables to cut in two (or more) a series of hexahedra using a series of edges propagation.
+- *edge* : an edge on the hexahedra to cut.
+- *nbCuts*: the number of cuts.
+Use the function **cutUni**::
-Example
--------
+ elts = doc.cutUni(edge, nbCuts)
+
-.. literalinclude:: test_doc/cut_hexa/cut_hexa.py
- :linenos:
+GUI command: :ref:`guicuthexauniform`
+
+
+.. _tuicuthexacustom:
+
+Custom Cut
+==========
+
+To make a custom cut of an hexahedra you need the following arguments:
+- *edge*: an edge on the hexahedra to cut.
+- *tl* : the list of the lengths of the layers in ascendant order.
-.. image:: _static/non_cut_hexa.png
- :align: center
+Use the funtion **cut**::
-.. centered::
- Initial hexa
-
-
-.. image:: _static/cut_hexa.png
- :align: center
+ elts = doc.cut(edge, tl)
+
+GUI command: :ref:`guicuthexacustom`
-.. centered::
- Cut hexa
-
+Operations on *elts*: :ref:`tuielements2`
+
+
+Example
+=======
+
+.. literalinclude:: test_doc/cutHexa/cut_hexa.py
+ :linenos:
-GUI command: :ref:`guicuthexa`
+
\ No newline at end of file
.. _tuihemisphere:
-=======================
-Hemisphere Construction
-=======================
+============================
+Hemisphere Grid Construction
+============================
-.. _tuihemisphericalgrid:
+.. _tuisphere:
-Hemispherical Grid
-==================
+Sphere
+======
-To create an hemispherical grid in textual mode, you need the following arguments:
+.. _tuispheresimple:
+
+Simple Sphere
+-------------
+
+To create a Simple Sphere Grid in python mode, you need the following arguments:
+
+- *nbR* : number of hexahedra on radial.
+- *nbA* : number of hexahedra along the perimeter of the sphere.
+- *nbH* : number of hexahedra along the axis of the sphere.
+
+Use the function **makeSphereTop**::
-- center : center coordinates of the sphere
-- vx : normal vector to the surface of the cross section
-- vz : axes of the hole
-- radius : radius size of the sphere
-- radhole: radius size of the hole
-- orig : coordinates of a point on the surface of the cross section
-- nrad : number of hexahedra from the center of the sphere
-- nang : number of hexahedra along the perimeter of the sphere
-- nhaut : number of hexahedra on the height of the sphere
-
-::
-
- elts = doc.makeSphere (center, vx, vz, radius, radhole, orig, nrad, nang, nhaut)
+ elts = doc.makeSphereTop(nbR, nbA, nbH)
+
+GUI command: :ref:`guisphereandrindsimple`
+
+
+.. _tuisphereuniform:
+
+Uniform Sphere
+--------------
+
+The following data are required:
+
+- *center*: center coordinates of the sphere (a vertex).
+- *vx* : the base of the sphere (a vector).
+- *vz* : the axis of the hole (a vector).
+- *rtrou* : the radius of the hole in the sphere.
+- *rext* : the radius of the sphere.
+- *angle* : angle of the sphere around the Z axis.
+- *vplan* : the vertex along the vertical axis where the rind will be cut.
+- *nr* : number of hexahedra on radial.
+- *na* : number of hexahedra along the perimeter of the sphere.
+- *nh* : number of hexahedra along the axis of the sphere.
+
+Use the function **makeSphereUni** to make a uniform sphere grid::
+
+ elts = doc.makeSphereUni (center, vx, vz, rtrou, rext, angle, vplan, nr, na, nh)
+
+GUI command: :ref:`guisphereuniform`
+
+.. _tuispherecustom:
+
+Custom Sphere
+-------------
+
+The following data are required:
+
+- *center*: center coordinates of the sphere (a vertex).
+- *vx* : the base of the sphere (a vector).
+- *vz* : the axis of the sphere (a vector).
+- *trad* : a list of radiuses in ascendant order.
+- *tang* : a list of angles in ascendant order.
+- *tphi* : a list of heights in ascendant order.
+
+Use the function **makeSphere** to make a custom sphere::
+
+ elts = doc.makeSphere(center, vx, vz, trad, tang, tphi)
+
+GUI command: :ref:`guispherecustom`
Operations on *elts*: :ref:`tuielements2`
-
-Code Sample
------------
-.. literalinclude:: test_doc/hemispherical_rind/hemispherical_grid.py
- :emphasize-lines: 22
+Example
+-------
+
+.. literalinclude:: test_doc/hemisphere/sphere.py
:linenos:
-Result
-------
-.. image:: _static/hemispherical_grid.png
- :align: center
+.. _tuirind:
-.. _tuiparthemisphericalgrid:
+Rind
+====
-Partial Hemispherical Grid
-==========================
+.. _tuirindsimple:
-To create a partial hemispherical grid in textual mode, you need the following parameters:
+Simple Rind
+-----------
-- center : center coordinates of the sphere
-- vx : normal vector to the surface of the cross section
-- vz : axes of the hole
-- radius : radius size of the sphere
-- radhole: radius size of the hole
-- orig : coordinates of a point on the surface of the cross section
-- angle : fill this field to customize the section (value in degree)
-- nrad : number of hexahedra from the center of the sphere
-- nang : number of hexahedra along the perimeter of the sphere
-- nhaut : number of hexahedra on the height of the sphere
+To create a Simple Rind Grid in python mode, you need the following arguments:
-::
+- *nbR* : number of hexahedra on radial.
+- *nbA* : number of hexahedra along the perimeter of the rind.
+- *nbH* : number of hexahedra along the axis of the rind.
+
+Use the function **makeRindTop**::
+
+ elts = doc.makeRindTop(nbR, nbA, nbH)
- elts = doc.makePartSphere (center, vx, vz, radius, radhole, orig, angle, nrad, nang, nhaut)
+GUI command: :ref:`guisphereandrindsimple`
-Operations on *elts*: :ref:`tuielements2`
-
-Code Sample
------------
+.. _tuirinduniform:
-.. literalinclude:: test_doc/hemispherical_rind/partial_hemispherical_grid.py
- :emphasize-lines: 23,24
- :linenos:
+Uniform Rind
+------------
-Result
-------
+The following data are required:
-.. image:: _static/partial_hemispherical_grid.png
- :align: center
+- *center*: center coordinates of the rind (a vertex).
+- *vx* : the base of the rind (a vector).
+- *vz* : the axis of the hole (a vector).
+- *rtrou* : the radius of the hole in the rind.
+- *rint* : the internal radius.
+- *rext* : the radius of the rind.
+- *angle* : angle of the rind around the Z axis.
+- *vplan* : the vertex along the vertical axis where the rind will be cut.
+- *nr* : number of hexahedra on radial.
+- *na* : number of hexahedra along the perimeter of the rind.
+- *nh* : number of hexahedra along the axis of the rind.
+Use the function **makeRindUni** to make a uniform rind grid::
-.. _tuirindgrid:
+ elts = doc.makeRindUni(center, vx, vz, rtrou, rint, rext, angle, vplan, nr, na, nh)
+
+GUI command: :ref:`guirinduniform`
+
+.. _tuirindcustom:
-Rind Grid
-=========
+Custom Rind
+-----------
-To create a rind grid in textual mode, you need the following arguments:
+The following data are required:
-- center : center coordinates of the sphere
-- vx : normal vector to the surface of the cross section
-- vz : axes of the hole
-- radius : radius size of the sphere
-- internal radius: fill this field to create rind
-- radhole: radius size of the hole
-- orig : coordinates of a point on the surface of the cross section
-- nrad : number of hexahedra from the center of the sphere
-- nang : number of hexahedra along the perimeter of the sphere
-- nhaut : number of hexahedra on the height of the sphere
+- *center*: center coordinates of the rind grid (a vertex).
+- *vx* : the base of the rind grid (a vector).
+- *vz* : the axis of the rind (a vector).
+- *trad* : a list of radiuses in ascendant order.
+- *tang* : a list of angles in ascendant order.
+- *tphi* : a list of heights in ascendant order.
-::
+Use the function **makeRind** to make a custom rind grid::
- elts = doc.makeRind (center, vx, vz, radius, radint, radhole, orig, nrad, nang, nhaut)
-
+ elts = doc.makeRind(center, vx, vz, trad, tang, tphi)
+
+GUI command: :ref:`guirindcustom`
+
Operations on *elts*: :ref:`tuielements2`
-
-Code Sample
------------
-.. literalinclude:: test_doc/hemispherical_rind/rind_grid.py
- :emphasize-lines: 23,24
+Example
+-------
+
+.. literalinclude:: test_doc/hemisphere/rind.py
:linenos:
-Result
-------
-.. image:: _static/rind_grid.png
- :align: center
+.. _tuiconcentric:
-.. _tuipartrindgrid:
+Concentric (Spherical) Grid
+===========================
-Partial Rind Grid
-=================
+.. _tuiconcentricsimple:
-To create a partial rind grid in textual mode, you need the following arguments:
+Simple Concentric
+-----------------
-- center : center coordinates of the sphere
-- vx : normal vector to the surface of the cross section
-- vz : axes of the hole
-- radius : radius size of the sphere
-- radint : fill this field to create rind
-- radhole: radius size of the hole
-- orig : coordinates of a point on the surface of the cross section
-- angle : fill this field to customize the section (value in degree)
-- nrad : number of hexahedra from the center of the sphere
-- nang : number of hexahedra along the perimeter of the sphere
-- nhaut : number of hexahedra on the height of the sphere
+To create a Simple Concentric Grid in python mode, you need the following arguments:
-::
+- *nbLayers*: the number of nested hexahedra.
+- *crit* : the criteria.
- elts = doc.makePartRind (center, vx, vz, radius, radint, radhole, orig, angle, nrad, nang, nhaut)
+Use the function **makeSphericalTop**::
+
+ elts = doc.makeSphericalTop(nbLayers, crit)
-Operations on *elts*: :ref:`tuielements2`
+GUI command: :ref:`guiconcentricsimple`
-
-Code Sample
------------
-.. literalinclude:: test_doc/hemispherical_rind/partial_rind_grid.py
- :emphasize-lines: 24,25
- :linenos:
+.. _tuiconcentricuniform:
+
+Uniform Concentric
+------------------
-Result
-------
+The following data are required:
-.. image:: _static/partial_rind_grid.png
- :align: center
+- *center* : center coordinates of the concentric.
+- *vx* : the base of the concentric (a vector).
+- *vz* : the axis of the concentric (a vector).
+- *rayon* : the radius.
+- *nbLayers*: the number of nested hexahedra.
+- *crit* : the criteria.
+Use the function **makeSphericalUni** to make a uniform concentric::
-GUI command: :ref:`guihemisphere`
+ elts = doc.makeSphericalUni(center, vx, vz, rayon, nbLayers, crit)
+
+GUI command: :ref:`guiconcentricuniform`
+
+.. _tuiconcentriccustom:
+
+Custom Concentric
+-----------------
+
+The following data are required:
+
+- *center* : center coordinates of the concentric.
+- *vx* : the base of the concentric (a vector).
+- *vz* : the axis of the concentric (a vector).
+- *tr* : a list of radiuses in ascendant order.
+- *crit* : the criteria.
+
+Use the function **makeSpherical** to make a custom concentric grid::
+
+ elts = doc.makeSpherical (center, vx, vz, tr, crit)
+
+GUI command: :ref:`guiconcentriccustom`
+
+Operations on *elts*: :ref:`tuielements2`
+
+
+Example
+-------
+
+.. literalinclude:: test_doc/hemisphere/concentric.py
+ :linenos:
.. _tuiprismjoinquad:
-
-==========================
-Prism and join quadrangles
-==========================
+============================
+Extrude and Join Quadrangles
+============================
There are two different methods to build hexahedra from quadrangles:
-- prism from quadrangles
-- join two sets of quadrangles
+- Extrusion of quadrangles
+- Join two sets of quadrangles
+.. _tuiextrudequad:
-.. _tuiprismquad:
+Extrude a quadrangle or quadrangles
+===================================
-Prism from a quadrangle or quadrangles
-======================================
+.. _tuiextrudequadssimple:
-Make a regular prism::
+Simple Extrude
+--------------
- elts = doc.prismQuad(quad, vec, nb)
+To extrude one quad or a set of quads the following data are required:
- elts = doc.prismQuads(quads_list, vec, nb)
-
-
-Make an irregular prism::
+- *quad* : the quad to be extruded (for one quad extrusion).
+- *quads* : the list of quadrangles to be extruded (for multiple quads extrusion).
+- *nbLayers*: the number of layers of hexahedra resulting from the extrusion.
- elts = doc.prismQuadsVec (quads_list, axis, heights, opt)
+One quad extrusion::
-Operations on *elts*: :ref:`tuielements2`
+ elts = doc.extrudeQuadTop(quad, nbLayers)
+Extrusion of a set of quads::
-From a list of quadrangles, a set of hexahedra is created. Given the
-arbitrary nature of the start list, we can not provide additional
-information on the order of the intermediate elements (vertices,
-edges, quads) that contains the container-like Elements.
+ elts = doc.extrudeQuadsTop(quads, nbLayers)
-Example (regular mode)
-----------------------
+GUI command: :ref:`guiextrudequadssimple`
-.. literalinclude:: test_doc/prism_quad_join/prism_quads.py
- :linenos:
-.. image:: _static/prisme.png
- :align: center
+.. _tuiextrudequadsuniform:
-.. centered::
- Regular Prism Quads
+Uniform Extrude
+---------------
+The following data are required:
-Example (regular mode)
-----------------------
+- *quad* : the quad to be extruded (for one quad extrusion).
+- *quads* : the list of quadrangles to be extruded (for multiple quads extrusion).
+- *dir* : the direction of the extrusion.
+- *length* : the length of hexahedra resulting from the extrusion.
+- *nbLayers*: the number of layers of hexahedra resulting from the extrusion.
-.. literalinclude:: test_doc/prism_quad_join/prism_quads_vec.py
- :linenos:
+One quad extrusion::
-.. image:: _static/irregular_prism.png
- :align: center
+ elts = doc.extrudeQuadUni(quad, dir, length, nbLayers)
+
+Extrusion of a set of quads::
-.. centered::
- Irregular Prism Quads
+ elts = doc.extrudeQuadsUni(quads, dir, length, nbLayers)
+GUI command: :ref:`guiextrudequadsuniform`
-.. _tuijoinquad:
-Join 2 sets of quadrangles
-==========================
+.. _tuiextrudequadscustom:
+
+Custom Extrude
+--------------
+
+The following data are required:
+
+- *quad* : the quad to be extruded (for one quad extrusion).
+- *quads*: the list of quadrangles to be extruded (for multiple quads extrusion).
+- *dir* : the direction of the extrusion.
+- *th* : a list of heights (in ascendant order because the size is computed from the origin) to specify the size of each layer of extrusion.
+
+One quad extrusion::
-::
+ elts = doc.extrudeQuad(quad, dir, th)
+
+Extrusion of a set of quads::
- elts = doc.joinQuad(qa, qb, va1, vb1, va2, vb2, nb)
+ elts = doc.extrudeQuads(quads, dir, th)
+
- elts = doc.joinQuads([ qa1, qa2 ], qb, va1, vb1, va2, vb2, nb)
+GUI command: :ref:`guiextrudequadscustom`
Operations on *elts*: :ref:`tuielements2`
Example
-------
-.. literalinclude:: test_doc/prism_quad_join/join_quads.py
+.. literalinclude:: test_doc/extrudeQuad/extrude_quad.py
:linenos:
-.. image:: _static/join.png
- :align: center
-.. centered::
- Join Quads
+.. _tuijoinquad:
+
+Join quadrangle or quadrangles
+==============================
+
+.. _tuijoinquadsuniform:
+
+Uniform Join
+------------
+
+The following data are required:
+
+- *quad* : the quad to be joined and from which hexahedra will be created (one quad case).
+- *quads* : the set of quadrangles to be joined and from which hexahedra will be created (multiple quad case).
+- *fromPointA*: a vertex belonging to the first quadrangle of the set of quadrangles.
+- *fromPointB*: a vertex, consecutive to previous Point a, belonging to the first quadrangle.
+
+- *quadDest* : a quadrangle from the set of targeted quadrangles.
+- *toPointA* : the target vertex (in the target quadrangle) for *fromPointA*.
+- *toPointB* : the target vertex (in the target quadrangle) for *fromPointB*.
+
+- *nbLayers* : number of layers of hexahedra issued from the operation.
+
+To join one quad to an other use the function **joinQuadUni**::
+
+ elts = doc.joinQuadUni(quad, quadDest, fromPointA, fromPointB, toPointA, toPointB, nbLayers)
+To join a set of quads to another quad use the function **joinQuadsUni**::
-GUI command: :ref:`guiprismjoinquad`
+ elts = doc.joinQuadsUni(quads, quadDest, fromPointA, fromPointB, toPointA, toPointB, nbLayers)
+
+GUI command: :ref:`guijoinquadsuniform`
+
+
+.. _tuijoinquadscustom:
+
+Custom Join
+-----------
+
+The following data are required:
+
+- *quad* : the quad to be joined and from which hexahedra will be created (one quad case).
+- *quads* : the set of quadrangles to be joined and from which hexahedra will be created (multiple quads case).
+- *fromPointA*: a vertex belonging to the first quadrangle of the set of quadrangles.
+- *fromPointB*: a vertex, consecutive to previous Point a, belonging to the first quadrangle.
+
+- *quadDest* : a quadrangle from the set of targeted quadrangles.
+- *toPointA* : the target vertex (in the target quadrangle) for *fromPointA*.
+- *toPointB* : the target vertex (in the target quadrangle) for *fromPointB*.
+
+- *th* : a list of heights to specify the size of each layer of hexahedra issued from the operation.
+
+To make a custom join of one quad to another use the function **joinQuad**::
+
+ elts = doc.joinQuad(quad, quadDest, fromPointA, fromPointB, toPointA, toPointB, th)
+
+To make a custom join of a set of quads to another quad use the function **joinQuads**::
+
+ elts = doc.joinQuads(quads, quadDest, fromPointA, fromPointB, toPointA, toPointB, th)
+
+GUI command: :ref:`guijoinquadscustom`
+
+Operations on *elts*: :ref:`tuielements2`
+
+
+Example
+-------
+
+.. literalinclude:: test_doc/joinQuad/join_quad.py
+ :linenos:
.. _tuiquadrevolution:
-
===============
Quad Revolution
===============
-To make quad revolution you need:
+.. _tuiquadsrevolutionuniform:
-- a set of quadrangles you want to make a revolution on
+Uniform Quad Revolution
+=======================
-.. literalinclude:: test_doc/quad_revolution/make_grid.py
- :lines: 3-
- :linenos:
+To make a uniform quad revolution you need:
-- center of rotation::
+- *quad* : the quadrangle from which hexahedrons will be created (only for one quad revolution).
+- *quads* : a set of quadrangles from which hexahedrons will be created (only for multiple quads revolution).
+- *center* : center of rotation (a vertex).
+- *axis* : axis of rotation (a vector).
+- *angle* : Specify the rotation's angle at each step.
+- *nbLayers*: the number of steps.
- center = doc.addVertex (0, -10, 0)
-
-- axis of rotation (a vector)::
+One quad revolution::
- axis = doc.addVector (1, 0, 0)
-
-- Specify the rotation’s angle at each step (a list of angles in degrees)::
+ elts = doc.revolutionQuadUni(quad, center, axis, angle, nbLayers)
- angles = [5, 10, 15, 20, 30, 20, 15, 10, 5 ]
+Revolution of a set of quads::
-Then you can make you can make your quad revolution this way::
+ elts = doc.revolutionQuadsUni(quads, center, axis, angle, nbLayers)
+
- elts = doc.revolutionQuads (liste, center, axis, angles)
+GUI command: :ref:`guiquadsrevolutionuniform`
-Operations on *elts*: :ref:`tuielements2`
+.. _tuiquadsrevolutioncustom:
-Complete Example
-================
+Custom Quad Revolution
+======================
+To make a custom quad revolution you need:
-Snippet Code
-------------
+- *quad* : the quadrangle from which hexahedrons will be created (only for one quad revolution).
+- *quads* : a set of quadrangles from which hexahedrons will be created (only for multiple quads revolution).
+- *center* : center of rotation (a vertex).
+- *axis* : axis of rotation (a vector).
+- *angles* : a set of angles (in degrees). Specify the rotation's angle at each step.
-.. literalinclude:: test_doc/quad_revolution/revolution.py
- :emphasize-lines: 59
- :linenos:
+One quad revolution::
+ elts = doc.revolutionQuad(quad, center, axis, angles)
+
+Revolution of a set of quads::
-The result
-----------
+ elts = doc.revolutionQuads(quads, center, axis, angles)
+
+
+GUI command: :ref:`guiquadsrevolutioncustom`
-.. image:: _static/grid_for_revolution.png
- :align: center
-
-.. centered::
- Initial
+Operations on *elts*: :ref:`tuielements2`
-.. image:: _static/quad_revolution.png
- :align: center
+Example
+=======
-.. centered::
- Quad Revolution
+.. literalinclude:: test_doc/quadRevolution/revolution_quad.py
+ :linenos:
-
-GUI command: :ref:`guiquadrevolution`
+
\ No newline at end of file