Reputation: 275
Trying to plot a "cylinder" (modification of the paraview->source->alphabetical->cylinder)
but can not figure out why is not the last polygon (end cap) plotted.
# vtk DataFile Version 5.1
vtk output
ASCII
DATASET POLYDATA
POINTS 16 float
0.5 0.5 0
0.353553 0.5 -0.353553
0. 0.5 -0.5
-0.353553 0.5 -0.353553
-0.5 0.5 0.
-0.353553 0.5 0.353553
0. 0.5 0.5
0.353553 0.5 0.353553
0.353553 -0.5 0.353553
0. -0.5 0.5
-0.353553 -0.5 0.353553
-0.5 -0.5 0.
-0.353553 -0.5 -0.353553
0. -0.5 -0.5
0.353553 -0.5 -0.353553
0.5 -0.5 0
POLYGONS 10 48
OFFSETS vtktypeint64
0 8 12 16 20 24 28 32 36 40
CONNECTIVITY vtktypeint64
0 1 2 3 4 5 6 7
0 15 14 1
1 14 13 2
2 13 12 3
3 12 11 4
4 11 10 5
5 10 9 6
6 9 8 7
7 8 15 0
8 9 10 11 12 13 14 15
Upvotes: 0
Views: 449
Reputation: 2498
Your file is not correctly formatted to define the last polygonal face.
You should add the last point index in the OFFSETS
list and thus increment the number of indices declared in POLYGONS
. See here:
POLYGONS 11 48
OFFSETS vtktypeint64
0 8 12 16 20 24 28 32 36 40 48
The full correct file:
# vtk DataFile Version 5.1
vtk output
ASCII
DATASET POLYDATA
POINTS 16 float
0.5 0.5 0
0.353553 0.5 -0.353553
0. 0.5 -0.5
-0.353553 0.5 -0.353553
-0.5 0.5 0.
-0.353553 0.5 0.353553
0. 0.5 0.5
0.353553 0.5 0.353553
0.353553 -0.5 0.353553
0. -0.5 0.5
-0.353553 -0.5 0.353553
-0.5 -0.5 0.
-0.353553 -0.5 -0.353553
0. -0.5 -0.5
0.353553 -0.5 -0.353553
0.5 -0.5 0
POLYGONS 11 48
OFFSETS vtktypeint64
0 8 12 16 20 24 28 32 36 40 48
CONNECTIVITY vtktypeint64
0 1 2 3 4 5 6 7
0 15 14 1
1 14 13 2
2 13 12 3
3 12 11 4
4 11 10 5
5 10 9 6
6 9 8 7
7 8 15 0
8 9 10 11 12 13 14 15
Upvotes: 1