Salome HOME
Do not disallow edition, otherwise we can't expand group items (e.g. vertices) when...
[modules/hexablock.git] / doc / tui_vertex.rst
1 :tocdepth: 3
2
3 .. _tuivertex:
4
5 ========
6 Vertices
7 ========
8
9 Manage the vertices of the model of blocks of a document.
10
11
12 Add a new vertex of the model of blocks in the document::
13
14     vertex_1 = doc.addVertex(x, y, z)
15
16 Get the number of all vertices of the document::
17
18     sum_a = doc.countVertex()
19
20 Get the number of vertices used only by the model of blocks::
21
22     sum_u = doc.countUsedVertex()
23     
24 Get the vertices used by the model of blocks
25
26 .. literalinclude:: test_doc/vertex/vertex.py
27
28 Get a vertex of the document::
29
30     vertex_i = doc.getVertex(i)
31
32 Get the coordinates of a vertex::
33
34     x = vertex_i.getX()
35     y = vertex_i.getY()
36     z = vertex_i.getZ()
37
38 Set the coordinates of a vertex::
39
40     vertex_i.setX(x1)
41     vertex_i.setY(y1)
42     vertex_i.setZ(z1)
43
44 Find a vertex in the document (with a tolerance)::
45
46     vertex_f = doc.findVertex(x, y, z)
47
48 More operations: *Vertex* inherits :ref:`Element <tuielement>`.
49
50 GUI command: :ref:`guivertex`