]> SALOME platform Git repositories - modules/hexablock.git/blobdiff - doc/tui_sphergrid.rst
Salome HOME
updated copyright message
[modules/hexablock.git] / doc / tui_sphergrid.rst
index 93b02f69ce49ada0490efa55bcf37c28510d1771..5d32b15e967b27bf74c4abfd610edf0c4246b788 100644 (file)
@@ -10,16 +10,18 @@ Make spherical grids
 
 To add a spherical grid, the following data are required:
 
-- the center (vertex) of the central hexahedron: *pt*
-- the vector corresponding to the diametrically opposite vertex to the
-  initial vertex: *dv*
+- the center (vertex) of the central hexahedron: *c*
+- the radius of the internal hexahedron: *r*
 - the number of embedded hexahedra: *n*
 - the coefficient of growth:*k*
 
 
 Make a spherical grid::
 
-    elts = doc.makeSpherical(pt, dv, n, k)
+    elts = doc.makeSpherical(c, r, n, k)
+
+Operations on *elts*: :ref:`tuielements2`
+
 
 The result is an array of hexahedra starting with the central and
 other hexahedral are arranged layer by layer from the center. Each
@@ -30,23 +32,8 @@ the X axis, then 2 for the Y axis and 2 for the Z axis.
 Example
 -------
 
-::
-
- import hexablock
- doc = hexablock.addDocument()
-
- orig = doc.addVertex(0, 0, 0)
-
- direction = doc.addVector(1, 1, 1)
-
- dx = doc.addVector(1, 0, 0)
- dy = doc.addVector(0, 1, 0)
- dz = doc.addVector(0, 0, 1)
-
- n = 2
- k = 0.8
-
- grid = doc.makeSpherical(orig, direction, n, k)
+.. literalinclude:: test_doc/grid/spherical_grid.py
+   :linenos:
 
 
 GUI command: :ref:`guisphergrid`