1 -- File: SMDS_MeshGroup.cdl
2 -- Created: Mon Jun 3 11:49:08 2002
3 -- Author: Jean-Michel BOULCOURT
4 -- <jmb@localhost.localdomain>
5 ---Copyright: Matra Datavision 2002
8 class MeshGroup from SMDS inherits MeshObject from SMDS
14 MeshElement from SMDS,
15 ElementType from SMDSAbs,
16 ListOfMeshGroup from SMDS,
17 MapOfMeshElement from SMDS
21 NoSuchObject from Standard,
22 TypeMismatch from Standard
26 ---=====================================
27 ---Category: public API methods
28 -- Group creation and deletion
29 --======================================
31 Create(aMesh: Mesh from SMDS) returns MeshGroup from SMDS;
32 ---Purpose: constructor
34 AddSubGroup(me: mutable) returns MeshGroup from SMDS;
35 ---Purpose: create a sub group.
36 -- uses a private constructor to create an instance of the
37 -- subgroup and attahc it the parent group.
39 RemoveSubGroup(me: mutable; aGroup: MeshGroup from SMDS)
41 ---Purpose: remove aGroup from the list of Children
42 -- if the subgroup does not belong to this, it returns False
46 RemoveFromParent(me: mutable)
48 ---Purpose: remove this from its parent
49 -- if this has no parent then it returns False (True otherwise)
54 ---=====================================
55 ---Category: public API methods
56 -- Group contents edition
57 --======================================
60 ---Purpose: clear the group
61 -- once the group is cleared, the type is set to All
62 -- but the referenced mesh remains.
64 Add(me: mutable; ME: MeshElement from SMDS)
65 raises TypeMismatch from Standard;
66 ---Purpose: add an element to the group
68 Remove(me: mutable; ME: MeshElement from SMDS)
69 raises NoSuchObject from Standard;
70 ---Purpose: remove an element from the group
71 -- raises if the element is not in the group
73 ---=====================================
74 ---Category: public API methods
75 -- Group contents exploration
76 --======================================
79 returns Boolean from Standard;
80 ---Purpose: check if the group is empty
82 Extent(me) returns Integer from Standard;
83 ---Purpose: return numner of elements in the group
85 Type(me) returns ElementType from SMDSAbs;
86 ---Purpose: return current element type
87 -- if the group is empty, returns All
89 Contains(me; ME : MeshElement from SMDS)
90 returns Boolean from Standard;
91 ---Purpose: check if the group contains the mesh element
93 Elements(me) returns MapOfMeshElement from SMDS;
94 ---Purpose: check if the group contains the mesh element
95 ---C++: return const &
98 ---===========================================
99 ---Category: private or protected API methods
101 --============================================
103 Create(parent: MeshGroup) returns mutable MeshGroup
104 ---Purpose: constructor used internally to create subgroup
110 myMesh : Mesh from SMDS;
111 myType : ElementType from SMDSAbs;
112 myElements : MapOfMeshElement from SMDS;
113 myParent : MeshGroup from SMDS;
114 myChildren : ListOfMeshGroup from SMDS;