[vtkusers] vtkPowerCrustSurfaceReconstruction

Rohan Hughes frostillicusetcetera at hotmail.com
Wed Oct 26 02:10:20 EDT 2005


I'm using vtkPowerCrustSurfaceConsturction to take a set of points i have 
and make a surface. I have two problems with it
I have about 20 differnet sets of points i wish to render as a surface. of 
these only 6 of them work. the other 14 cause python to crash. I cannot 
figure out why. All the data sets are of the same format. I can render just 
the points using vtkPolyVertex and it has no problems. If I try to print the 
surfaceActor before I set the mapper it prints ok, but if i print it 
afterwards it crashes. But when I print the mapper there isn't a problem.

the second problem is i want to decimate and smooth the surface, but the 
vtkDecimatePro requires triangles.

can anyone help?
part of my code is below

points = vtk.vtkPoints()
... read in points ...
pointSet = vtk.vtkPolyData()
pointSet.SetPoints(points)
surf = vtk.vtkPowerCrustSurfaceReconstruction()
surf.SetInput(pointSet)
mapper = vtk.vtkPolyDataMapper()
mapper.SetInput(surf.GetOutput())
mapper.ScalarVisibilityOff()
surfaceActor = vtk.vtkActor()
surfaceActor.SetMapper(mapper)
surfaceActor.GetProperty().SetDiffuseColor(r/255.0, g/255.0, b/255.0)
surfaceActor.GetProperty().SetSpecularColor(1, 1, 1)
surfaceActor.GetProperty().SetSpecular(.4)
surfaceActor.GetProperty().SetSpecularPower(50)
self.surfaces.append(surfaceActor)





More information about the vtkusers mailing list