mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-22 13:25:36 +05:00
0021801: EDF 2143 SMESH: random order of groups returned by ExtrusionSweepObject2D
+ SMESH_Group* AddGroup (SMESHDS_GroupBase* groupDS)
This commit is contained in:
parent
a22deee34c
commit
110067df8c
@ -1651,6 +1651,35 @@ SMESH_Group* SMESH_Mesh::AddGroup (const SMDSAbs_ElementType theType,
|
||||
return aGroup;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Creates a group based on an existing SMESHDS group. Group ID should be unique
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
SMESH_Group* SMESH_Mesh::AddGroup (SMESHDS_GroupBase* groupDS) throw(SALOME_Exception)
|
||||
{
|
||||
if ( !groupDS )
|
||||
throw SALOME_Exception(LOCALIZED ("SMESH_Mesh::AddGroup(): NULL SMESHDS_GroupBase"));
|
||||
|
||||
map <int, SMESH_Group*>::iterator i_g = _mapGroup.find( groupDS->GetID() );
|
||||
if ( i_g != _mapGroup.end() && i_g->second )
|
||||
{
|
||||
if ( i_g->second->GetGroupDS() == groupDS )
|
||||
return i_g->second;
|
||||
else
|
||||
throw SALOME_Exception(LOCALIZED ("SMESH_Mesh::AddGroup() wrong ID of SMESHDS_GroupBase"));
|
||||
}
|
||||
SMESH_Group* aGroup = new SMESH_Group (groupDS);
|
||||
_mapGroup[ groupDS->GetID() ] = aGroup;
|
||||
GetMeshDS()->AddGroup( aGroup->GetGroupDS() );
|
||||
|
||||
_groupId = 1 + _mapGroup.rbegin()->first;
|
||||
|
||||
return aGroup;
|
||||
}
|
||||
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Creates SMESH_Groups for not wrapped SMESHDS_Groups
|
||||
|
@ -287,7 +287,9 @@ public:
|
||||
int& theId,
|
||||
const TopoDS_Shape& theShape=TopoDS_Shape(),
|
||||
const SMESH_PredicatePtr& thePredicate=SMESH_PredicatePtr());
|
||||
|
||||
|
||||
SMESH_Group* AddGroup (SMESHDS_GroupBase* groupDS) throw(SALOME_Exception);
|
||||
|
||||
typedef boost::shared_ptr< SMDS_Iterator<SMESH_Group*> > GroupIteratorPtr;
|
||||
GroupIteratorPtr GetGroups() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user