Salome HOME
#19232 [CEA] overal Mesh quality crash on imported MED
[modules/smesh.git] / src / SMDS / SMDS_MeshCell.cxx
index 3628aafe31ec31303989b396e010b60793db9668..2cec46a8c6c50e61cfbea71a280283d0a81fa210 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2020  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
@@ -521,9 +521,7 @@ int SMDS_MeshCell::NbNodes() const
 {
   if ( GetVtkType() == VTK_POLYHEDRON )
     return static_cast< const SMDS_MeshVolume* >( this )->SMDS_MeshVolume::NbNodes();
-  vtkIdType npts;
-  vtkIdType const *pts;
-  getGrid()->GetCellPoints( GetVtkID(), npts, pts );
+  vtkIdType npts = getGrid()->GetCells()->GetCellSize( GetVtkID() );
   return npts;
 }