contour interpolation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

contour interpolation

I'm completely new to vtk so bear with me if what I ask turns out to be
incredibly easy for the expert user. Believe me, I've searched everywhere
but I can't find a way to do what I need. So here's my problem:

I have a mesh, and I need to extract contours cutting it with planes at
regular intervals. I'm using vtkCutter + vtkStripper + vtkCleanPolyData to
obtain a list of points. So far so good, however I need these contours to be
resampled/interpolated so that each contour is returned as a fixed number of
points, equally spaced. Is there a way to do this in vtk: options to set on
vtkCutter, other filters that I can add?

I also have another question: on some meshes the contours run clockwise, on
others counter-clockwise, why? Of course I'm using the same planes, always
oriented in the direction of the positive X axis.

my code:

vtkSmartPointer<vtkPolyData> intersection(vtkPlane& plane,
vtkSmartPointer<vtkPolyData> polydata)
    auto cutter = vtkSmartPointer<vtkCutter>::New();

    auto cutStripper = vtkSmartPointer<vtkStripper>::New();

    auto cleanPolyData = vtkSmartPointer<vtkCleanPolyData>::New();

    vtkSmartPointer<vtkPolyData> contour = cleanPolyData->GetOutput();
    return contour;

Sent from:
Powered by

Visit other Kitware open-source projects at

Please keep messages on-topic and check the VTK FAQ at:

Search the list archives at:

Follow this link to subscribe/unsubscribe: