]> SALOME platform Git repositories - modules/hexablock.git/blob - doc/test_doc/pipe/pipe.py
Salome HOME
ParaView 4.1 / VTK 6.1 porting
[modules/hexablock.git] / doc / test_doc / pipe / pipe.py
1 # -*- coding: utf-8 -*-
2 ####### Make Pipe Test ########## 
3
4 import hexablock
5         
6 doc  = hexablock.addDocument ("Make Pipe Test")
7
8 # Simple Pipe -----
9
10 nbR = 8
11 nbA = 10
12 nbH = 8
13
14 pipe0 = doc.makePipeTop (nbR, nbA, nbH)
15 pipe0.saveVtk ("makePipeTop.vtk")
16
17 # Uniform Pipe -----
18
19 orig = doc.addVertex (0, 0, 0)
20 vx   = doc.addVector (1, 0, 0)
21 vz   = doc.addVector (0, 0, 1)
22 rint = 1
23 rext = 3
24 angle = 360
25 hauteur = 2
26
27 pipe1 = doc.makePipeUni (orig, vx, vz, rint, rext, angle, hauteur, nbR, nbA, nbH)
28 pipe1.saveVtk ("makePipeUni.vtk");
29    
30
31 # Custom Pipe -----
32
33 origin = doc.addVertex (0, 5, 0)
34 tr = [10, 20, 30, 40]
35 ta = [45, 90, 135, 180, 225]
36 th = [5, 30, 40, 60]
37
38 pipe2 = doc.makePipe(origin, vx, vz, tr, ta, th)
39 pipe2.saveVtk("makePipe.vtk")