[vtkusers] Delaunay triangulation of point data
Donald S Dunbar
dsd at lorax.ca
Tue Jun 10 17:34:22 EDT 2003
I'm having trouble doing something very simple: read ASCII point data
from a file, apply Delaunay triangulation, and visualize. I'm stuck at
the beginning. I understand that I'm missing a step or two, I just
can't seem to figure out how to fix it. Help appreciated (this should
be an easy one).
Thanks - Don Dunbar
My data looks like this:
==================
# vtk DataFile Version 3.0
Point data
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 20129 float
491534.14 5460893.29 -1.70
491508.13 5460934.29 0.20
(continued)
My TCL code looks like this:
======================
package require vtk
package require vtkinteraction
vtkUnstructuredGridReader reader
reader SetFileName "bathy.vtk"
vtkPolyData profile
profile SetPoints [reader GetOutput]
vtkDelaunay3D del
del SetInput profile
del SetTolerance 0.01
del SetAlpha 0.2
del BoundingTriangulationOff
The error generated is:
==================
Error in startup script: vtk bad argument, type conversion failed for
object vtkTemp0.
Could not type convert vtkTemp0 which is of type vtkUnstructuredGrid,
to type vtkPoints.
Object named: profile, could not find requested method: SetPoints
or the method was called with incorrect arguments.
while executing
"profile SetPoints [reader GetOutput]"
More information about the vtkusers
mailing list