Salome HOME
23368: [CEA 1865] Possibility to define faces to mesh as a single one: transpatch...
[modules/smesh.git] / src / SMDS / SMDS_VtkEdge.cxx
index ba42087ed117415403a91beb360c3b87c2d411a0..f365a30f213d078c1d2795da8887e32fa97a8550 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2016  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
@@ -99,9 +99,10 @@ void SMDS_VtkEdge::Print(std::ostream & OS) const
 int SMDS_VtkEdge::NbNodes() const
 {
   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-  int nbPoints = grid->GetCell(myVtkID)->GetNumberOfPoints();
-  assert(nbPoints >= 2);
-  return nbPoints;
+  vtkIdType *pts, npts;
+  grid->GetCellPoints( myVtkID, npts, pts );
+  assert(npts >= 2);
+  return npts;
 }
 
 int SMDS_VtkEdge::NbEdges() const