[vtkusers] Fill in 2D vtkPolyData

Jonathan Morra jonmorra at gmail.com
Mon Apr 23 12:20:40 EDT 2012


I'm just getting around to looking into this now.  I'll let you know if I
fix this for my case.  On a related note, does there exist a filter which
takes as input a specified 2D vtkPolyData, and a set of candidate 2D
vtkPolyDatas, and returns a list of those candidate vtkPolyDatas which are
wholly inside the specified input?  This seems to be related to this filter.

On Thu, Apr 19, 2012 at 11:03 AM, David Gobbi <david.gobbi at gmail.com> wrote:

> Hi Jonathan,
>
> This is why I haven't added this filter to VTK yet.  When the input
> has multiple contours, the code doesn't yet have the necessary logic
> for determining which contours are holes.  In your case, it has
> incorrectly marked the large contour as a hole.
>
> Unfortunately I cannot provide you with a timeline for when I will
> finish this filter, lately I've been crazy busy on other projects.
> But if you want to give it a shot yourself, take a look at the code
> for vtkContourToPolygonFilter::MakePolysFromContours(). The
> section that needs to be modified is the block that starts with
> "if (normal == 0)".
>
>  - David
>
>
> On Thu, Apr 19, 2012 at 11:44 AM, Jonathan Morra <jonmorra at gmail.com>
> wrote:
> >
> > After using your filter for a little while, for the most part it works
> great, however I have discovered a few cases where it doesn't work.  I've
> attached a screen shot showing a failure,  The first image is the input
> vtkPolyData, and the second is the result of running through your filter.
>  Can you determine what is going on?  If not, I'd be happy to give you the
> poly data I'm using, just let me know how to export it to disk, and I can
> email it to you.
> >
> > Thanks
> >
> > PS The behavior seems unpredictable, as sometimes with shapes just as
> complicated it works fine, I can't seem to tell what makes it fail.
> >
> >
> >
> >
> >
> >
> > On Tue, Apr 10, 2012 at 12:26 PM, David Gobbi <david.gobbi at gmail.com>
> wrote:
> >>
> >> Use the PickableOff() method (on the actor, not the data).
> >>
> >> On Tue, Apr 10, 2012 at 1:17 PM, Jonathan Morra <jonmorra at gmail.com>
> wrote:
> >> > One more question along this same line.  Now that I have opaque
> vtkPolyData,
> >> > I'm noticing that my vtkPicker is no longer hitting the same data it
> was
> >> > before, it's hitting the now opaque poly data.  This makes sense to
> me, but
> >> > I don't want it to happen.  Is there a way to tell the vtkPicker to
> ignore
> >> > some vtkPolyData (ie always pick the underlying data).
> >> >
> >> > Thanks
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120423/1ee1d76f/attachment.htm>


More information about the vtkusers mailing list