[vtkusers] cleaning polydata precludes computing curvatures

Lane Phillips phillips at cs.umn.edu
Mon Mar 30 12:46:08 EDT 2009


I have a 3DS model and I want to do analysis of the surface curvature. 
I use a vtk3DSImporter to load the model and I notice that the model is 
sliced into multiple meshes, so I take the vtkPolyData from each mesh 
and send it through a vtkCurvatures and, magically, VTK displays the 
curvature as color on the surface, and I can spin the model at 
interactive rates.

I don't want to deal with multiple meshes, so I add each vtkPolyData to 
a vtkAppendPolyData object, and send the output of that through the 
vtkCurvatures object.  VTK still displays the curvatures on the surface, 
but now it's extremely slow to rotate.  Maybe the slices cached better? 
  However, speed is not my concern right now...

Now I have all the meshes in one vtkPolyData, but I assume they are not 
contiguous yet, so I run the output of the vtkAppendPolyData through a 
vtkCleanPolyData, hoping this will merge duplicate points and stitch the 
meshes together.  I send the output of vtkCleanPolyData through 
vtkCurvatures, but now the surface is rendered in one color.

So my question is, what information is needed by vtkCurvatures that is 
getting destroyed by vtkCleanPolyData?

I'm attaching my code; sorry it's a mess.  The important lines are 81 
through 127.

Thanks,
Lane
-------------- next part --------------
A non-text attachment was scrubbed...
Name: StoneTool.cpp
Type: text/x-c++src
Size: 8348 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090330/33ebad57/attachment.cpp>


More information about the vtkusers mailing list