Salome HOME
Switch development flag to 1
[modules/hexablock.git] / doc / tui_vector.rst
1 :tocdepth: 3
2
3 .. _tuivector:
4
5 ======
6 Vector
7 ======
8
9 Add a vector in the document::
10
11      vector_1 = doc.addVector(dx, dy, dz)
12      vector_2 = doc.addVectorVertices(vertex_1, vertex_2)
13
14 Get the values of a vector::
15
16     dx = vector_1.getDX()
17     dy = vector_1.getDY()
18     dz = vector_1.getDZ()
19
20 Get the number of vector in the document::
21
22      sum = doc.countVector()
23
24 Get a vector of the document::
25
26      vector_i = doc.getVector(i)
27      
28 Get the norm of a vector::
29
30         norm = vector_i.getNorm()
31         
32 Get the angle on X::
33
34         angle = vector_i.getAngleX()
35         
36 More operations: *Vector* inherits :ref:`Element <tuielement>`.
37
38 GUI command: :ref:`guivector`