10 Manage the quadrangles of the document.
12 Add a quadrangle in the document::
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)
17 Notice: the vertices and edges follow the outline of the quadrangle.
19 Get the number of all quadrangles of the document::
21 sum_a = doc.countQuad()
23 Get the number of used quadrangles in the model of blocks::
25 sum_u = doc.countUsedQuad()
27 Get the quads used by the model of blocks
29 .. literalinclude:: test_doc/quad/quad.py
32 Get a quadrangle of the document::
34 quad_i = doc.getQuad(i)
36 Get an edge of a quadrangle::
38 edge_e = quad_i.getEdge(0 or 1 or 2 or 3)
40 Get a vertex of a quadrangle::
42 vertex_v = quad_i.getVertex(0 or 1 or 2 or 3)
44 Find a quadrangle in the document::
46 quad_f = doc.findQuad(vertex_1, vertex_2)
48 More operations: *Quad* inherits :ref:`Element <tuielement>`.
50 GUI command: :ref:`guiquadrangles`