[vtkusers] contour(s) of a vtkPolyData : points ordered and counter-clockwise
Pascal Guehl
pascal.guehl at c-s.fr
Fri Jan 18 10:06:57 EST 2008
Hello,
I work with C++, and VTK 5. I don't use the VTK graphics pipeline. I
work with a custom real-time 3D engine and VTK is used to process
scientific data.
I have to find the intersection between a mesh of radioactivity
(vtkPolyData), and a contour of a city (vtkPoints), to see the impact on
the city. To do this, I use a vtkClipPolyData with the vtkPolyData as
input and a clip function vtkImplicitSelectionLoop built from the
vtkPoints. I retrieve the intersected vtkPolyData.
I would like to retrieve the contour of the resulting vtkPolyData. It
might be separated in several parts, so I need all contours of all
largest regions.
I've seen the source code of the filter vtkExtractEdges,
vtkLinearExtrusionFilter and the VTK book. I 've seen part of code that
could help me : iteration on cells, then iteration on each each edges,
and then test if there are neighbors, if not, that is an edge of one
contour.
First, I would like to know if there is already a filter that do this ?
I only find a of filter for vtkStructuredGrid : the
vtkStructuredGridOutlineFilter…
Then, my problem is that I have to give this contour to a custom
triangulator that must receive each point ordered and counter-clockwise.
So my points must be inserted ordered and counter-clockwise. Is there a
mean to do this with VTK, or I need to do this by myself in my algorithm ?
Best Regards,
Pascal
More information about the vtkusers
mailing list