mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 18:20:34 +05:00
Fix GetNodeIndex() for polygon
This commit is contained in:
parent
01d8b02caa
commit
c17253baf7
@ -462,14 +462,13 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
|
||||
vtkIdType nFaces = 0;
|
||||
vtkIdType* ptIds = 0;
|
||||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
int id = 0, nbPoints = 0;
|
||||
int id = 0;
|
||||
for (int iF = 0; iF < nFaces; iF++)
|
||||
{
|
||||
int nodesInFace = ptIds[id];
|
||||
for ( vtkIdType i = 0; i < nodesInFace; ++i )
|
||||
if ( ptIds[id+i] == node->getVtkId() )
|
||||
if ( ptIds[id+i+1] == node->getVtkId() )
|
||||
return id+i-iF;
|
||||
nbPoints += nodesInFace;
|
||||
id += (nodesInFace + 1);
|
||||
}
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user