Salome HOME
updated copyright message
[modules/hexablock.git] / doc / tui_quadrangle.rst
1 :tocdepth: 3
2
3
4 .. _tuiquadrangles:
5
6 ===========
7 Quadrangles
8 ===========
9
10 Manage the quadrangles of the document.
11
12 Add a quadrangle in the document::
13
14     quad_1 = doc.addQuad(edge_1, edge_2, edge_3, edge_4)
15     quad_2 = doc.addQuadVertices(vertex_1, vertex_2, vertex_3, vertex_4)
16
17 Notice: the vertices and edges follow the outline of the quadrangle.
18
19 Get the number of all quadrangles of the document::
20
21     sum_a = doc.countQuad()
22
23 Get the number of used quadrangles in the model of blocks::
24
25     sum_u = doc.countUsedQuad()
26     
27 Get the quads used by the model of blocks
28
29 .. literalinclude:: test_doc/quad/quad.py
30
31
32 Get a quadrangle of the document::
33
34     quad_i = doc.getQuad(i)
35
36 Get an edge of a quadrangle::
37
38     edge_e = quad_i.getEdge(0 or 1 or 2 or 3)
39
40 Get a vertex of a quadrangle::
41  
42     vertex_v = quad_i.getVertex(0 or 1 or 2 or 3)
43  
44 Find a quadrangle in the document::
45  
46     quad_f = doc.findQuad(vertex_1, vertex_2)
47
48 More operations: *Quad* inherits :ref:`Element <tuielement>`.
49
50 GUI command: :ref:`guiquadrangles`