[vtkusers] pb w. Delaunay on multiple polygons
Will Schroeder
will.schroeder at kitware.com
Mon Apr 22 13:39:21 EDT 2002
Hi Melvin-
At 06:45 PM 4/22/2002 +0200, Melvin Hadasht wrote:
>Hi,
>
>I have a vtkCellArray containing two or more polygons that I wish to
>triangulate using vtkDelaunay (for the constrained triangulation
>ability). On a test case of two regular polygons one above the other,
>the triangulations succeeds for both polygons only if the number of the
>sides of the polygon are less than 8. Above this limit, the second
>created polygon is not correctly triangulated:
If I am reading your script properly, you are using vtkDelaunay2D
incorrectly. The first polygon defines the outer boundary of the polygons;
subsequent polygons in the input define holes in the polygon. You are
placing both polygons in the same source polydata, which doesn't make
sense. Instead, you should put each polygon in a separate polydata (include
holes as additional polygons) and triangulate with a separate
vtkDelaunay2D. Or equivalently, set up a pipeline of vtkPolyData and
vtkDelaunay2D, load the polygon (and any holes in the polygon) in the
vtkPolyData, execute the pipeline, save the output, and then repeat the
process. You may have to invoke Modified() on the vtkPolyData every time
you stuff new data into it.
Will
William J. Schroeder, Ph.D.
Kitware, Inc.
469 Clifton Corporate Parkway
Clifton Park, NY 12065
will.schroeder at kitware.com
1-518-371-3971 x102 (phone)
1-518-371-3971 (fax)
More information about the vtkusers
mailing list