Salome HOME
updated copyright message
[modules/hexablock.git] / doc / tui_groups.rst
1 :tocdepth: 3
2
3 .. _tuigroups:
4
5 ====================================
6 Define groups on the model of blocks
7 ====================================
8
9 Three kinds of group of meshing elements:
10
11 - group of hexahedra:
12
13     HexaBlocks.HexaCell 
14
15 - group of quadrangles:
16
17     HexaBlocks.QuadCell
18
19 - group of edges: 
20
21     HexaBlocks.EdgeCell 
22
23 Four kinds of group of nodes:
24
25 - group of nodes in hexahedra:
26
27     HexaBlocks.HexaNode
28
29 - group of nodes in quadrangles:
30
31     HexaBlocks.QuadNode
32
33 - group of nodes in edges:
34
35     HexaBlocks.EdgeNode
36
37 - group of nodes on vertices:
38
39     HexaBlocks.VertexNode
40
41
42
43 Add a new group in the document::
44
45     grp = doc.addHexaGroup(name)
46     grp = doc.addQuadGroup(name)
47     grp = doc.addEdgeGroup(name)
48     grp = doc.addQuadNodeGroup(name)
49     grp = doc.addHexaNodeGroup(name)
50     grp = doc.addEdgeNodeGroup(name)
51     grp = doc.addVertexNodeGroup(name)
52
53 Remove a group from the document::
54
55     doc.removeGroup(grp)
56
57 Get the number of groups of the document::
58
59     ng = doc.countGroup()
60
61 Get a group of the document::
62
63     grp = doc.getGroup(index)
64
65
66 Find a group by his name in the document::
67
68     g = doc.findGroup(name)
69
70 Get the name of a group::
71
72     name = grp.getName()
73
74 Set the name of a group::
75
76     grp.setName(name)
77
78 Get the kind of group among the 7 possibilities::
79
80     kind = grp.getKind()
81
82
83 Add an element in a group::
84
85     grp.addElement(element)
86
87 Get the number of elements of a group::
88
89     nb = grp.countElement()
90
91 Get an element of a group::
92
93     el = grp.getElement(index)
94
95 Remove an element of a group::
96
97     grp.removeElement(index)
98
99 Clear all elements of a group::
100
101     grp.clearElement()
102
103
104 GUI command: :ref:`guigroups`