1 // Copyright (C) 2007-2013 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
23 // File : SMESH_Group.idl
24 // Author : Sergey ANIKIN, OCC
27 #ifndef _SMESH_GROUP_IDL_
28 #define _SMESH_GROUP_IDL_
30 #include "SALOME_Exception.idl"
31 #include "SALOME_GenericObj.idl"
32 #include "SALOMEDS_Attributes.idl"
34 #include "SMESH_Mesh.idl"
42 * SMESH_Group: base interface of group object
44 interface SMESH_GroupBase : SALOME::GenericObj, SMESH_IDSource
49 void SetName( in string name );
57 * Returns group type (type of elements in the group)
59 ElementType GetType();
62 * Returns the number of elements in the group
67 * Returns true if the group does not contain any elements
72 * returns true if the group contains an element with ID == <elem_id>
74 boolean Contains( in long elem_id );
77 * Returns ID of an element at position <elem_index>
79 long GetID( in long elem_index );
82 * Returns a sequence of all element IDs in the group
84 long_array GetListOfID();
87 * Get the number of nodes of cells included to the group
88 * For a nodal group returns the same value as Size() function
90 long GetNumberOfNodes();
93 * Get IDs of nodes of cells included to the group
94 * For a nodal group returns result of GetListOfID() function
96 long_array GetNodeIDs();
99 * Return true if GetNumberOfNodes() won't take a long time for computation
101 boolean IsNodeInfoAvailable();
106 void SetColor(in SALOMEDS::Color theColor);
109 * Returns group color
111 SALOMEDS::Color GetColor();
114 * Sets group color number
115 * (corresponds to the "hue" parameter of the color - must be in range [0, 360])
117 void SetColorNumber( in long color );
120 * Returns group color number (obsolete - use GetColor instead)
121 * (corresponds to the "hue" parameter of the color - must be in range [0, 360])
123 long GetColorNumber();
127 * SMESH_Group: interface of a standalone group object
129 interface SMESH_Group : SMESH_GroupBase
132 * Clears the group's contents
137 * Adds elements or nodes with specified identifiers to the group
139 long Add( in long_array elem_ids );
141 * Adds elements or nodes that match specified predicate to the group
143 long AddByPredicate( in Predicate thePredicate );
145 * Add all elements or nodes from the specified source to the group
147 long AddFrom( in SMESH_IDSource theSource );
150 * Removes elements or nodes with specified identifiers from the group
152 long Remove( in long_array elem_ids );
154 * Removes elements or nodes that match specified predicate from the group
156 long RemoveByPredicate( in Predicate thePredicate );
161 * SMESH_GroupOnGeom: interface of a group object linked to geometry
163 interface SMESH_GroupOnGeom : SMESH_GroupBase
165 GEOM::GEOM_Object GetShape();
169 * SMESH_GroupOnFilter: interface of a group object defined by filter
171 interface SMESH_GroupOnFilter : SMESH_GroupBase
173 void SetFilter( in Filter theFilter);