Salome HOME
optparse => argparse
[modules/hexablock.git] / doc / tui_hexahedron.rst
1 :tocdepth: 3
2
3 .. _tuihexahedron:
4
5 ==========
6 Hexahedron
7 ==========
8
9 Manage the hexahedral of the document.
10
11
12 Add an hexahedron in the document::
13
14     hexa_1 = doc.addHexa(q_A, q_B, q_C, q_D, q_E, q_F)
15
16     hexa_2 = doc.addHexaVertices(ACE, ACF, ADE, ADF, BCE, BCF, BDE, DBF)
17
18 Notice: the arguments follow the convention explain in :ref:`annexe`
19
20 Get the number of all hexahedra of the document::
21
22     sum_a = doc.countHexa()
23
24 Get an hexahedron of the document::
25
26     hexa_i = doc.getHexa(i)
27     
28 Get a vertex of an hexahedron::
29
30         vertex_i = hexa_i.getVertex(i)
31
32 Get an edge of an hexahedron::
33
34         edge_i = hexa_i.getEdge(i)
35
36 Get a quad of an hexahedron::
37
38         quad_i = hexa_i.getQuad(i)
39         
40 Get the number of used hexahedrons in the model of blocks::
41
42     nb_used_hexa = doc.countUsedHexa()
43     
44 Get the hexahedrons used by the model of blocks
45
46 .. literalinclude:: test_doc/hexa/hexa.py
47
48 Find an hexahedron in the document::
49
50     hexa = doc.findHexa(vertex_1, vertex_2)
51     
52 Add an hexahedron with 5 quads::
53
54         doc.addHexa5Quads (qa, qc, qd, qe, qf)
55         
56 Add an hexahedron with 4 quads::
57
58         doc.addHexa4Quads (qa, qd, qe, qf)
59         
60 Add an hexahedron with 3 quads::
61
62         doc.addHexa3Quads (qa, qd, qe)
63         
64 Add an hexahedron with 2 quads::
65
66         doc.addHexa2Quads (qa, qb)
67
68 More operations: *Hexa* inherits :ref:`Element <tuielement>`.
69
70 GUI command: :ref:`guihexahedron`