-// Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
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;
int SMDS_VtkVolume::NbCornerNodes() const
{
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
- int nbN = grid->GetCell(myVtkID)->GetNumberOfPoints();
vtkIdType aVtkType = grid->GetCellType(myVtkID);
switch (aVtkType)
{
case VTK_TRIQUADRATIC_HEXAHEDRON: return 8;
default:;
}
- return nbN;
+ return NbNodes();
}
SMDSAbs_EntityType SMDS_VtkVolume::GetEntityType() const
*/
SMDS_ElemIteratorPtr SMDS_VtkVolume::uniqueNodesIterator() const
{
- MESSAGE("uniqueNodesIterator");
+ //MESSAGE("uniqueNodesIterator");
return SMDS_ElemIteratorPtr(new SMDS_VtkCellIterator(SMDS_Mesh::_meshList[myMeshId], myVtkID, GetEntityType()));
}