mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
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());
This commit is contained in:
parent
f1c62974f6
commit
b21414354c
@ -1420,12 +1420,13 @@ bool SMESH_Mesh::IsMainShape(const TopoDS_Shape& theShape) const
|
|||||||
SMESH_Group* SMESH_Mesh::AddGroup (const SMDSAbs_ElementType theType,
|
SMESH_Group* SMESH_Mesh::AddGroup (const SMDSAbs_ElementType theType,
|
||||||
const char* theName,
|
const char* theName,
|
||||||
int& theId,
|
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;
|
return NULL;
|
||||||
theId = _groupId;
|
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() );
|
GetMeshDS()->AddGroup( aGroup->GetGroupDS() );
|
||||||
_mapGroup[_groupId++] = aGroup;
|
_mapGroup[_groupId++] = aGroup;
|
||||||
return aGroup;
|
return aGroup;
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "SMESH_SMESH.hxx"
|
#include "SMESH_SMESH.hxx"
|
||||||
|
|
||||||
#include "SMESH_Hypothesis.hxx"
|
#include "SMESH_Hypothesis.hxx"
|
||||||
|
#include "SMESH_Controls.hxx"
|
||||||
|
|
||||||
#include "SMESHDS_Mesh.hxx"
|
#include "SMESHDS_Mesh.hxx"
|
||||||
#include "SMESHDS_Command.hxx"
|
#include "SMESHDS_Command.hxx"
|
||||||
@ -264,7 +265,8 @@ public:
|
|||||||
SMESH_Group* AddGroup (const SMDSAbs_ElementType theType,
|
SMESH_Group* AddGroup (const SMDSAbs_ElementType theType,
|
||||||
const char* theName,
|
const char* theName,
|
||||||
int& theId,
|
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;
|
typedef boost::shared_ptr< SMDS_Iterator<SMESH_Group*> > GroupIteratorPtr;
|
||||||
GroupIteratorPtr GetGroups() const;
|
GroupIteratorPtr GetGroups() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user