myPolyElems.reserve( myIdsOnBoundary.size() );
// make a set of refined elements
- set< const SMDS_MeshElement* > avoidSet, elemSet;
- avoidSet.insert( myElements.begin(), myElements.end() );
+ map<int,const SMDS_MeshElement* > avoidSet, elemSet;
+ std::vector<const SMDS_MeshElement*>::iterator itv = myElements.begin();
+ for(; itv!=myElements.end(); itv++) {
+ const SMDS_MeshElement* el = (*itv);
+ avoidSet.insert( make_pair(el->GetID(),el) );
+ }
+ //avoidSet.insert( myElements.begin(), myElements.end() );
map< TNodeSet, list< list< int > > >::iterator indListIt, nn_IdList;
SMESH_MeshEditor::FindFaceInSet( n1, n2, elemSet, avoidSet );
if ( face )
{
- avoidSet.insert ( face );
+ avoidSet.insert ( make_pair(face->GetID(),face) );
myPolyElems.push_back( face );
// some links of <face> are split;
while ( eIt->more() )
{
const SMDS_MeshElement* elem = eIt->next();
- if ( !volTool.Set( elem ) || !avoidSet.insert( elem ).second )
+ if ( !volTool.Set( elem ) || !avoidSet.insert( make_pair(elem->GetID(),elem) ).second )
continue; // skip faces or refined elements
// add polyhedron definition
myPolyhedronQuantities.push_back(vector<int> ());