bool SMDS_MeshCell::ChangeNodes(const SMDS_MeshNode* nodes[], const int theNbNodes)
{
vtkIdType npts = 0;
- vtkIdType* pts = 0;
- getGrid()->GetCellPoints( GetVtkID(), npts, pts );
+ vtkIdType *pts;
+ vtkIdType const *tmp(nullptr);
+ getGrid()->GetCellPoints( GetVtkID(), npts, tmp );
+ std::copy(tmp,tmp+npts,pts);
if ( theNbNodes != npts )
{
MESSAGE("ChangeNodes problem: not the same number of nodes " << npts << " -> " << theNbNodes);
{
if ( GetVtkType() == VTK_POLYHEDRON )
return static_cast< const SMDS_MeshVolume* >( this )->SMDS_MeshVolume::NbNodes();
- vtkIdType *pts, npts;
+ vtkIdType npts;
+ vtkIdType const *pts;
getGrid()->GetCellPoints( GetVtkID(), npts, pts );
return npts;
}
if ( GetVtkType() == VTK_POLYHEDRON )
return static_cast< const SMDS_MeshVolume* >( this )->SMDS_MeshVolume::GetNode( ind );
- vtkIdType npts, *pts;
+ vtkIdType npts;
+ vtkIdType const *pts;
getGrid()->GetCellPoints( GetVtkID(), npts, pts );
const std::vector<int>& interlace = SMDS_MeshCell::fromVtkOrder( VTKCellType( GetVtkType() ));
return GetMesh()->FindNodeVtk( pts[ interlace.empty() ? ind : interlace[ ind ]]);
if ( GetVtkType() == VTK_POLYHEDRON )
return static_cast< const SMDS_MeshVolume* >( this )->SMDS_MeshVolume::GetNodeIndex( node );
- vtkIdType npts, *pts;
+ vtkIdType npts;
+ vtkIdType const *pts;
getGrid()->GetCellPoints( GetVtkID(), npts, pts );
for ( vtkIdType i = 0; i < npts; ++i )
if ( pts[i] == node->GetVtkID() )