[vtkusers] Moving a node using mouse

David Doria daviddoria+vtk at gmail.com
Tue Feb 23 08:44:21 EST 2010


On Tue, Feb 23, 2010 at 7:08 AM, Rakesh Patil <rakeshthp at in.com> wrote:

> Hello,
>
> I have an unstructured grid and it contains only node points.. Now if I
> wish to move one of the nodes among the set of nodes, then, how do i do
> it.??
>
> I have successfully implemented the picking of node..
>
> Thanks
>
> Regards
> Rakesh Patil
>
>
By "nodes" do you mean "vertices"? I don't think that it is really trivial
to move one point - you'd have to create a new vtkPolyData with a single
point+vertex and create a new actor/mapper for it. The trick would then be
deleting the point/vertex from the set of points. I think the only way to do
this is to loop through the points and add all of them except the one you
want to delete to a new object. You can imagine this would be quite slow.

Is there a better way to delete a point from a vtkPoints/vtkPolyData?

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100223/4b4e828b/attachment.htm>


More information about the vtkusers mailing list