SMESH_Group* SMESH_Mesh::AddGroup (const SMDSAbs_ElementType theType,
const char* theName,
int& theId,
- const TopoDS_Shape& theShape)
+ const TopoDS_Shape& theShape,
+ const SMESH_PredicatePtr& thePredicate)
{
- if (_mapGroup.find(_groupId) != _mapGroup.end())
+ if (_mapGroup.count(_groupId))
return NULL;
theId = _groupId;
- SMESH_Group* aGroup = new SMESH_Group (theId, this, theType, theName, theShape);
+ SMESH_Group* aGroup = new SMESH_Group (theId, this, theType, theName, theShape, thePredicate);
GetMeshDS()->AddGroup( aGroup->GetGroupDS() );
_mapGroup[_groupId++] = aGroup;
return aGroup;
#include "SMESH_SMESH.hxx"
#include "SMESH_Hypothesis.hxx"
+#include "SMESH_Controls.hxx"
#include "SMESHDS_Mesh.hxx"
#include "SMESHDS_Command.hxx"
int NbSubMesh() const throw(SALOME_Exception);
int NbGroup() const { return _mapGroup.size(); }
-
+
SMESH_Group* AddGroup (const SMDSAbs_ElementType theType,
const char* theName,
int& theId,
- const TopoDS_Shape& theShape=TopoDS_Shape());
+ const TopoDS_Shape& theShape=TopoDS_Shape(),
+ const SMESH_PredicatePtr& thePredicate=SMESH_PredicatePtr());
typedef boost::shared_ptr< SMDS_Iterator<SMESH_Group*> > GroupIteratorPtr;
GroupIteratorPtr GetGroups() const;