1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SMESH_Group.idl
23 // Author : Sergey ANIKIN, OCC
26 #ifndef _SMESH_GROUP_IDL_
27 #define _SMESH_GROUP_IDL_
29 #include "SALOME_Exception.idl"
30 #include "SALOME_GenericObj.idl"
31 #include "SALOMEDS_Attributes.idl"
33 #include "SMESH_Mesh.idl"
40 * SMESH_Group: base interface of group object
42 interface SMESH_GroupBase : SALOME::GenericObj, SMESH_IDSource
47 void SetName( in string name );
55 * Returns group type (type of elements in the group)
57 ElementType GetType();
60 * Returns the number of elements in the group
65 * Returns true if the group does not contain any elements
70 * returns true if the group contains an element with ID == <elem_id>
72 boolean Contains( in long elem_id );
75 * Returns ID of an element at position <elem_index>
77 long GetID( in long elem_index );
80 * Returns a sequence of all element IDs in the group
82 long_array GetListOfID();
85 * Returns the mesh object this group belongs to
92 void SetColor(in SALOMEDS::Color theColor);
97 SALOMEDS::Color GetColor();
100 * Sets group color number
101 * (corresponds to the "hue" parameter of the color - must be in range [0, 360])
103 void SetColorNumber( in long color );
106 * Returns group color number (obsolete - use GetColor instead)
107 * (corresponds to the "hue" parameter of the color - must be in range [0, 360])
109 long GetColorNumber();
113 * SMESH_Group: interface of group object
115 interface SMESH_Group : SMESH_GroupBase
118 * Clears the group's contents
123 * Adds elements to the group
125 long Add( in long_array elem_ids );
126 long AddByPredicate( in Predicate thePredicate );
129 * Removes elements from the group
131 long Remove( in long_array elem_ids );
132 long RemoveByPredicate( in Predicate thePredicate );
136 * SMESH_Group: interface of group object linked to geometry
138 interface SMESH_GroupOnGeom : SMESH_GroupBase
140 GEOM::GEOM_Object GetShape();