From b21414354ce0ea2ce1be6284464cb2217486d08e Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 23 Jun 2011 12:12:22 +0000 Subject: [PATCH] 0021014: EDF 1583 SMESH: Improvement of the Python Dump for the creation of groups SMESH_Group* AddGroup (const SMDSAbs_ElementType theType, const char* theName, int& theId, const TopoDS_Shape& theShape=TopoDS_Shape(), + const SMESH_PredicatePtr& thePredicate=SMESH_PredicatePtr()); --- src/SMESH/SMESH_Mesh.cxx | 7 ++++--- src/SMESH/SMESH_Mesh.hxx | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 8e22cc24d..2a9b64909 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -1420,12 +1420,13 @@ bool SMESH_Mesh::IsMainShape(const TopoDS_Shape& theShape) const 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; diff --git a/src/SMESH/SMESH_Mesh.hxx b/src/SMESH/SMESH_Mesh.hxx index f1406685b..79fdc3918 100644 --- a/src/SMESH/SMESH_Mesh.hxx +++ b/src/SMESH/SMESH_Mesh.hxx @@ -31,6 +31,7 @@ #include "SMESH_SMESH.hxx" #include "SMESH_Hypothesis.hxx" +#include "SMESH_Controls.hxx" #include "SMESHDS_Mesh.hxx" #include "SMESHDS_Command.hxx" @@ -260,11 +261,12 @@ public: 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 > GroupIteratorPtr; GroupIteratorPtr GetGroups() const; -- 2.30.2