mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
a little optimize FindFace (std::vector<const SMDS_MeshNode *> nodes)
This commit is contained in:
parent
78364113e1
commit
0811f1f0ea
@ -1782,15 +1782,10 @@ const SMDS_MeshFace* SMDS_Mesh::FindFace (std::vector<const SMDS_MeshNode *> nod
|
||||
while (itF->more()) {
|
||||
const SMDS_MeshElement* f = itF->next();
|
||||
if ( f->NbNodes() == nodes.size() ) {
|
||||
SMDS_ElemIteratorPtr it2 = f->nodesIterator();
|
||||
while(it2->more()) {
|
||||
if ( find( nodes.begin(), nodes.end(), it2->next() ) == nodes.end() ) {
|
||||
f = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( f )
|
||||
return static_cast<const SMDS_MeshFace *> (f);
|
||||
for ( int i = 1; i < nodes.size(); ++ i )
|
||||
if ( f->GetNodeIndex( nodes[ i ]) < 0 )
|
||||
return NULL;
|
||||
return static_cast<const SMDS_MeshFace *> (f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user