[vtkusers] Modifying a point without creating the cells again

Will Schroeder will.schroeder at kitware.com
Tue Jul 22 06:53:29 EDT 2003

At 12:47 PM 7/22/2003 +0200, =?iso-8859-2?Q?micha=B3_strzelecki?= wrote:
>-> Hello everybody,
>-> I've a question about vtkPolyData:
>-> Is it posible to modify one point position without updating the

>Yes it is posible.
>in c++:
>  vtkPolyData *p = vtkPolyData::New();
>float newpoint[3] = {3, 10, -40};
>// this line replace coordinations of point
>// pointid is index of point you want to change
>  p->GetPoints()->SetPoint(pointid, newpoint);

If you do direct writes into data arrays like you may have to invoke a 
p->Modified() to indicate that the points have changed. Otherwise the 
pipeline may not update properly.


William J. Schroeder, Ph.D.
Kitware, Inc.
469 Clifton Corporate Parkway
Clifton Park, NY 12065
will.schroeder at kitware.com
1-518-371-3971 x102 (phone)
1-518-371-3971 (fax) 

More information about the vtkusers mailing list