mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-02 21:00:34 +05:00
PAL18920: 2 Meshes with the same hypothesis : one compute well but the other not !?!
fix GetSubMeshNodesId() for vertex submesh with several nodes
This commit is contained in:
parent
e2cfeef800
commit
b88ec5abd8
@ -1946,12 +1946,12 @@ SMESH::long_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID, CO
|
||||
SMESHDS_SubMesh* SDSM = SM->GetSubMeshDS();
|
||||
if(!SDSM) return aResult._retn();
|
||||
|
||||
map<int,const SMDS_MeshElement*> theElems;
|
||||
if( !all || (SDSM->NbElements()==0 && SDSM->NbNodes()==1) ) {
|
||||
set<int> theElems;
|
||||
if( !all || (SDSM->NbElements()==0) ) { // internal nodes or vertex submesh
|
||||
SMDS_NodeIteratorPtr nIt = SDSM->GetNodes();
|
||||
while ( nIt->more() ) {
|
||||
const SMDS_MeshNode* elem = nIt->next();
|
||||
theElems.insert( make_pair(elem->GetID(),elem) );
|
||||
theElems.insert( elem->GetID() );
|
||||
}
|
||||
}
|
||||
else { // all nodes of submesh elements
|
||||
@ -1961,16 +1961,16 @@ SMESH::long_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID, CO
|
||||
SMDS_ElemIteratorPtr nIt = anElem->nodesIterator();
|
||||
while ( nIt->more() ) {
|
||||
const SMDS_MeshElement* elem = nIt->next();
|
||||
theElems.insert( make_pair(elem->GetID(),elem) );
|
||||
theElems.insert( elem->GetID() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
aResult->length(theElems.size());
|
||||
map<int, const SMDS_MeshElement * >::iterator itElem;
|
||||
set<int>::iterator itElem;
|
||||
int i = 0;
|
||||
for ( itElem = theElems.begin(); itElem != theElems.end(); itElem++ )
|
||||
aResult[i++] = (*itElem).first;
|
||||
aResult[i++] = *itElem;
|
||||
|
||||
return aResult._retn();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user