forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[geometry] Strengthen VTK to volume mesh error cases (RobotLocomotion…
…#20240) Add some slightly more adversarial VTK files to the test suite, and improve error reporting for VTK parse failures.
- Loading branch information
1 parent
ed56c02
commit 7038449
Showing
7 changed files
with
220 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# vtk DataFile Version 2.0 | ||
Example of bad one-tet mesh -- triangle mis-typed as tet | ||
ASCII | ||
DATASET UNSTRUCTURED_GRID | ||
POINTS 3 float | ||
0.0 0.0 0.0 | ||
1.0 0.0 0.0 | ||
0.0 1.0 0.0 | ||
|
||
CELLS 1 4 | ||
4 0 1 2 | ||
|
||
CELL_TYPES 1 | ||
10 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# vtk DataFile Version 2.0 | ||
Cube represented by six squares from https://examples.vtk.org/site/VTKFileFormats/ | ||
ASCII | ||
DATASET POLYDATA | ||
POINTS 8 float | ||
0.0 0.0 0.0 | ||
1.0 0.0 0.0 | ||
1.0 1.0 0.0 | ||
0.0 1.0 0.0 | ||
0.0 0.0 1.0 | ||
1.0 0.0 1.0 | ||
1.0 1.0 1.0 | ||
0.0 1.0 1.0 | ||
POLYGONS 6 30 | ||
4 0 1 2 3 | ||
4 4 5 6 7 | ||
4 0 1 5 4 | ||
4 2 3 7 6 | ||
4 0 4 7 3 | ||
4 1 2 6 5 | ||
CELL_DATA 6 | ||
SCALARS cell_scalars int 1 | ||
LOOKUP_TABLE default | ||
0 | ||
1 | ||
2 | ||
3 | ||
4 | ||
5 | ||
NORMALS cell_normals float | ||
0 0 -1 | ||
0 0 1 | ||
0 -1 0 | ||
0 1 0 | ||
-1 0 0 | ||
1 0 0 | ||
FIELD FieldData 2 | ||
cellIds 1 6 int | ||
0 1 2 3 4 5 | ||
faceAttributes 2 6 float | ||
0.0 1.0 1.0 2.0 2.0 3.0 3.0 4.0 4.0 5.0 5.0 6.0 | ||
POINT_DATA 8 | ||
SCALARS sample_scalars float 1 | ||
LOOKUP_TABLE my_table | ||
0.0 | ||
1.0 | ||
2.0 | ||
3.0 | ||
4.0 | ||
5.0 | ||
6.0 | ||
7.0 | ||
LOOKUP_TABLE my_table 8 | ||
0.0 0.0 0.0 1.0 | ||
1.0 0.0 0.0 1.0 | ||
0.0 1.0 0.0 1.0 | ||
1.0 1.0 0.0 1.0 | ||
0.0 0.0 1.0 1.0 | ||
1.0 0.0 1.0 1.0 | ||
0.0 1.0 1.0 1.0 | ||
1.0 1.0 1.0 1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# vtk DataFile Version 2.0 | ||
Example of scalar field on uniform rectilinear grid from https://examples.vtk.org/site/VTKFileFormats/ | ||
ASCII | ||
DATASET STRUCTURED_POINTS | ||
DIMENSIONS 3 4 6 | ||
ASPECT_RATIO 1 1 1 | ||
ORIGIN 0 0 0 | ||
POINT_DATA 72 | ||
SCALARS volume_scalars char 1 | ||
LOOKUP_TABLE default | ||
0 0 0 0 0 0 0 0 0 0 0 0 | ||
0 5 10 15 20 25 25 20 15 10 5 0 | ||
0 10 20 30 40 50 50 40 30 20 10 0 | ||
0 10 20 30 40 50 50 40 30 20 10 0 | ||
0 5 10 15 20 25 25 20 15 10 5 0 | ||
0 0 0 0 0 0 0 0 0 0 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# vtk DataFile Version 2.0 | ||
Example of Unstructured Grid of Many Cell Types from https://examples.vtk.org/site/VTKFileFormats/ | ||
ASCII | ||
DATASET UNSTRUCTURED_GRID | ||
|
||
POINTS 27 float | ||
0 0 0 1 0 0 2 0 0 0 1 0 1 1 0 2 1 0 | ||
0 0 1 1 0 1 2 0 1 0 1 1 1 1 1 2 1 1 | ||
0 1 2 1 1 2 2 1 2 0 1 3 1 1 3 2 1 3 | ||
0 1 4 1 1 4 2 1 4 0 1 5 1 1 5 2 1 5 | ||
0 1 6 1 1 6 2 1 6 | ||
|
||
CELLS 11 60 | ||
8 0 1 4 3 6 7 10 9 | ||
8 1 2 4 5 7 8 10 11 | ||
4 6 10 9 12 | ||
4 11 14 10 13 | ||
6 15 16 17 14 13 12 | ||
6 18 15 19 16 20 17 | ||
4 22 23 20 19 | ||
3 21 22 18 | ||
3 22 19 18 | ||
2 26 25 | ||
1 24 | ||
|
||
CELL_TYPES 11 | ||
12 | ||
11 | ||
10 | ||
8 | ||
7 | ||
6 | ||
9 | ||
5 | ||
4 | ||
3 | ||
1 | ||
|
||
POINT_DATA 27 | ||
SCALARS scalars float 1 | ||
LOOKUP_TABLE default | ||
0.0 1.0 2.0 3.0 4.0 5.0 | ||
6.0 7.0 8.0 9.0 10.0 11.0 | ||
12.0 13.0 14.0 15.0 16.0 17.0 | ||
18.0 19.0 20.0 21.0 22.0 23.0 | ||
24.0 25.0 26.0 | ||
|
||
VECTORS vectors float | ||
1 0 0 1 1 0 0 2 0 1 0 0 1 1 0 0 2 0 | ||
1 0 0 1 1 0 0 2 0 1 0 0 1 1 0 0 2 0 | ||
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 | ||
0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 | ||
0 0 1 0 0 1 0 0 1 | ||
|
||
CELL_DATA 11 | ||
SCALARS scalars float 1 | ||
LOOKUP_TABLE CellColors | ||
0.0 1.0 2.0 3.0 4.0 5.0 | ||
6.0 7.0 8.0 9.0 10.0 | ||
|
||
LOOKUP_TABLE CellColors 11 | ||
.4 .4 1 1 | ||
.4 1 .4 1 | ||
.4 1 1 1 | ||
1 .4 .4 1 | ||
1 .4 1 1 | ||
1 1 .4 1 | ||
1 1 1 1 | ||
1 .5 .5 1 | ||
.5 1 .5 1 | ||
.5 .5 .5 1 | ||
1 .5 .4 1 |