[vtkusers] possible to use structured points with an unstructured grid?

Todd.Lee at gtri.gatech.edu Todd.Lee at gtri.gatech.edu
Wed Feb 17 06:44:07 EST 2010


Good evening,

I'm trying to use VTK to display a finite-difference mesh (a rectilinear mesh). The "cells" are the cubes of the grid, and I need to be able to specify properties of the cubes, the faces of the cubes, and the edges independently. In terms of VTK, I've interpreted that as types VTK_LINE(=3), VTK_PIXEL(=8), and VTK_VOXEL(=11). So far, I've been able to accomplish this using an unstructured grid. Unfortunately, an unstructured grid requires me (I think) to explicitly specify every point. Is there a way in VTK to "pattern" the points, like for the "structured points" dataset?

Below is an example of what I currently have. I'd like to replace the "dataset unstructured_grid" section by the "dataset structured_points", but I can't get it to work. I appreciate any advice anyone can offer!

Thanks,
Todd

 # "Ideal" replacement dataset
DATASET STRUCTURED_POINTS
DIMENSIONS 3 3 3
ORIGIN 0 0 0
SPACING 1 1 1


#################################
# vtk DataFile Version 1.0
Example file
ASCII

DATASET UNSTRUCTURED_GRID
POINTS 27 int
0 0 0
1 0 0
2 0 0
0 1 0
1 1 0
2 1 0
0 2 0
1 2 0
2 2 0
0 0 1
1 0 1
2 0 1
0 1 1
1 1 1
2 1 1
0 2 1
1 2 1
2 2 1
0 0 2
1 0 2
2 0 2
0 1 2
1 1 2
2 1 2
0 2 2
1 2 2
2 2 2

CELLS 5 29
8 13 14 16 17 22 23 25 26
4 0 3 9 12
4 3 6 12 15
4 9 12 18 21
4 12 15 21 24

CELL_TYPES 5
11
8
8
8
8

CELL_DATA 5
SCALARS cell_scalars int 1
LOOKUP_TABLE default
2
1
1
1
1
#########################

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100217/208fabaa/attachment.htm>


More information about the vtkusers mailing list