GEOM::GEOM_Object_var shapeVar = _gen_i->ShapeToGeomObject( shape );
_gen_i->PublishGroup( aMesh, groupVar, shapeVar, group->GetName());
}
+
if ( !addedIDs.empty() )
{
// python dump
- set<int>::iterator id = addedIDs.begin();
- for ( ; id != addedIDs.end(); ++id )
+ map<int, SMESH::SMESH_GroupBase_ptr>::iterator i_grp = _mapGroups.begin();
+ for ( int index = 0; i_grp != _mapGroups.end(); ++index, ++i_grp )
{
- map<int, SMESH::SMESH_GroupBase_ptr>::iterator it = _mapGroups.find(*id);
- int i = std::distance( _mapGroups.begin(), it );
- TPythonDump() << it->second << " = " << aMesh << ".GetGroups()[ "<< i << " ]";
+ set<int>::iterator it = addedIDs.find( i_grp->first );
+ if ( it != addedIDs.end() )
+ {
+ TPythonDump() << i_grp->second << " = " << aMesh << ".GetGroups()[ "<< index << " ]";
+ addedIDs.erase( it );
+ if ( addedIDs.empty() )
+ break;
+ }
}
}
}
TDimHypList dimHypListArr[4]; // dimHyp list for each shape dimension
map<int, ::SMESH_subMesh*>::iterator i_sm = _mapSubMesh.begin();
- for ( ; i_sm != _mapSubMesh.end(); i_sm++ ) {
+ for ( ; i_sm != _mapSubMesh.end(); i_sm++ )
+ {
::SMESH_subMesh* sm = (*i_sm).second;
// shape of submesh
const TopoDS_Shape& aSubMeshShape = sm->GetSubShape();
// Find out dimensions where the submesh can be concurrent.
// We define the dimensions by algo of each of hypotheses in hypList
list <const SMESHDS_Hypothesis*>::const_iterator hypIt = hypList.begin();
- for( ; hypIt != hypList.end(); hypIt++ ) {
+ for( ; hypIt != hypList.end(); hypIt++ )
+ {
SMESH_Algo* anAlgo = 0;
const SMESH_Hypothesis* hyp = dynamic_cast<const SMESH_Hypothesis*>(*hypIt);
if ( hyp->GetType() != SMESHDS_Hypothesis::PARAM_ALGO )