[vtkusers] How to change the cell's PointIds() of an unstructured grid.??
rakesh patil
prakeshofficial at gmail.com
Thu Jun 2 04:32:16 EDT 2011
Hello Users,
I have an unstructured grid which contains triangular elements. Now when it
is displayed on the screen, user will do some changes to the cells. One such
requirement is to change the common edge between two triangles. For example,
if a common edge between two triangles is vertical, then on clicking, the
common edge should become vertical. That means the point ids of both cells
must be changed.
So I have been trying to change the point ids of the cells of an
unstructured grids. But the changes are not reflected back on the render
window. Here is what I am doing:
vtkCell *selCell = uGrid->GetCell( sel_id );
for( int i =0; i < 3; i++ )
{
selCell->GetPointIds()->SetId(i, new_val(i) );
}
selCell->Modified();
The above code will be executed twice( for two adjacent triangles )
this->uGrid->Modified();
this->gridActor->Modified();
Any more changes need to be done inorder to reflect the changes ? How can
the values of cell's pointids be changed and at the same time, be reflected
back in the actor.?
Thanks
Regards
Rakesh Patil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110602/73ba384e/attachment.htm>
More information about the vtkusers
mailing list