[vtkusers] vtkPointData::NullPoint

David Doria daviddoria at gmail.com
Mon Oct 11 17:04:45 EDT 2010


I noticed a NullPoint(id) function of vtkPointData. I tried to use it like this:

// See the current points
  for(vtkIdType i = 0; i < 10; i++)
    {
    double p[3];
    polydata->GetPoint(i,p);
    std::cout << "Point " << i << " : " << p[0] << " " << p[1] << " "
<< p[2] << std::endl;
    }

// Set one point to NULL
  polydata->GetPointData()->NullPoint(4);
  polydata->Modified();

// See the modified points
  for(vtkIdType i = 0; i < 10; i++)
    {
    double p[3];
    polydata->GetPoint(i,p);
    std::cout << "Point " << i << " : " << p[0] << " " << p[1] << " "
<< p[2] << std::endl;
    }

Nothing seemed to change with point 4, so I'm assuming this is not the
correct usage? What I am looking to do is remove a point from a
vtkPolyData without changing the point indexes of the rest of the
points. I was thinking that to do this I could use something like
NullPoint to leave the point in the data set (and hence not change the
ids) but to have it be "invisible".

Any ideas?

Thanks,

David



More information about the vtkusers mailing list