]> SALOME platform Git repositories - modules/hexablock.git/blob - doc/test_doc/hemisphere/concentric.py
Salome HOME
ParaView 4.1 / VTK 6.1 porting
[modules/hexablock.git] / doc / test_doc / hemisphere / concentric.py
1 # -*- coding: utf-8 -*-
2 ####### Concentric (Spherical) Grid Test ##########
3
4 import hexablock
5
6
7 doc  = hexablock.addDocument ("Spherical Grid Test")
8
9 # Simple Spherical Grid -----
10
11 nbLayers = 3
12 crit = 0
13
14 grid0 = doc.makeSphericalTop(nbLayers, crit)
15 grid0.saveVtk("makeSphericalTop.vtk")
16
17 # Uniform Spherical Grid -----
18
19 center = doc.addVertex (0, 0, 10)
20 vx     = doc.addVector (1, 0, 0)
21 vz     = doc.addVector (0, 1, 1)
22 rayon  = 1
23
24 grid1 = doc.makeSphericalUni(center, vx, vz, rayon, nbLayers, crit);
25 grid1.saveVtk("makeSphericalUni.vtk")
26
27 # Custom Spherical Grid-----
28
29 tr = [10, 20, 30, 40] # a list of radiuses (one radius for each layer)
30
31 grid2 = doc.makeSpherical (center, vx, vz, tr, crit)
32 grid2.saveVtk("makeSpherical.vtk")