Shashwath,<br>It worked! I had to remove some extra calls to Update, SetInput, etc but it worked! My points show up and they're part of a single vtkPolyData instance.<br>Thank you!<br><br>Now my question is how to connect those points with lines? I'm able to create lines by creating new actors, but I know that's not the best way to do it. How can I update the vtkPolyData instance to include lines?<br>
<br>-Greg<br><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>---------- Forwarded message ----------<br>
From: "Shashwath T.R." <<a href="mailto:trshash@gmail.com">trshash@gmail.com</a>><br>To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>Date: Thu, 23 Jul 2009 17:04:10 +0530<br>Subject: Re: [vtkusers] connecting points with lines<br>
Hi,<br><br>You shouldn't be doing it using multiple vtkPolyData for each point. You should be updating a single polydata, or you won't be able to create lines between them.<br><br>I suspect that when you were using a single polydata, you weren't calling Modified() on the polydata instance. You should do that, and call Render() on the renderer or render window on each add. That should make it work.<br>
<br>HTH<br>Shash<br><br><div class="gmail_quote">On Tue, Jul 21, 2009 at 12:05 AM, Greg Book <span dir="ltr"><<a href="mailto:gbook@gbook.org" target="_blank">gbook@gbook.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm creating a 3D tracing application in which the user selects points and then draws lines between points. I'm able to create points by clicking and the program creates a new point/cell/polydata/actor for each point. (updating a single vtkPolyData doesn't work; no new points are displayed).<br>
Now I'm wondering how I can pick the points and connect them with a line. I'd like to be able to connect two consecutive points (points A & B) with a line after point B is clicked. Then create a line between subsequent clicks. What is the best way to do this? I've looked at the vtkImageTracerWidget, but that's not really what I'm looking for.<br>
<font color="#888888">
<br>-Greg<br>
</font><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>
<br></blockquote></div>