[vtkusers] vtkusers Digest, Vol 63, Issue 23
Greg Book
gbook at gbook.org
Fri Jul 24 10:46:37 EDT 2009
Shashwath,
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.
Thank you!
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?
-Greg
> ---------- Forwarded message ----------
> From: "Shashwath T.R." <trshash at gmail.com>
> To: vtkusers at vtk.org
> Date: Thu, 23 Jul 2009 17:04:10 +0530
> Subject: Re: [vtkusers] connecting points with lines
> Hi,
>
> 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.
>
> 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.
>
> HTH
> Shash
>
> On Tue, Jul 21, 2009 at 12:05 AM, Greg Book <gbook at gbook.org> wrote:
>
>> 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).
>> 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.
>>
>> -Greg
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090724/8ef7d3f0/attachment.htm>
More information about the vtkusers
mailing list