Commit 87c7ba00 authored by Ken Martin's avatar Ken Martin
Browse files

add coverage

parent e70b844b
......@@ -575,6 +575,13 @@ aTriangleStrip aLine aPolyLine aVertex aPolyVertex aPenta aHexa" {
}
# write to the temp directory if possible, otherwise use .
set dir "."
if {[info commands rtTester] == "rtTester"} {
set dir [rtTester GetTempDirectory]
}
foreach cell "aVoxel aHexahedron aWedge aPyramid aTetra aQuad aTriangle aTriangleStrip aLine
aPolyLine aVertex aPolyVertex aPixel aPolygon aPenta aHexa" {
......@@ -582,15 +589,23 @@ aPolyLine aVertex aPolyVertex aPixel aPolygon aPenta aHexa" {
${cell}derivs SetInput ${cell}Grid
${cell}derivs SetVectorModeToComputeGradient
# set FileName "/tmp/"
# append FileName ${cell}
# append FileName ".vtk"
set FileName $dir
append FileName ${cell}
append FileName ".vtk"
# make sure the directory is writeable first
if {[catch {set channel [open $dir/test.tmp w]}] == 0 } {
close $channel
file delete -force $dir/test.tmp
vtkUnstructuredGridWriter ${cell}Writer
${cell}Writer SetInput [${cell}derivs GetOutput]
${cell}Writer SetFileName $FileName
${cell}Writer Write
# delete the file
file delete -force $FileName
}
# vtkUnstructuredGridWriter ${cell}Writer
# ${cell}Writer SetInput [${cell}derivs GetOutput]
# ${cell}Writer SetFileName $FileName
# ${cell}Writer Write
vtkCellCenters ${cell}Centers
${cell}Centers SetInput [${cell}derivs GetOutput]
${cell}Centers VertexCellsOn
......
......@@ -31,6 +31,27 @@ vtkPolyDataMapper mapper1
vtkActor actor1
actor1 SetMapper mapper1
# write out a rect grid
# write to the temp directory if possible, otherwise use .
set dir "."
if {[info commands rtTester] == "rtTester"} {
set dir [rtTester GetTempDirectory]
}
# make sure the directory is writeable first
if {[catch {set channel [open $dir/test.tmp w]}] == 0 } {
close $channel
file delete -force $dir/test.tmp
vtkRectilinearGridWriter rectWriter
rectWriter SetInput [extract1 GetOutput]
rectWriter SetFileName $dir/rect.tmp
rectWriter Write
# delete the file
file delete -force $dir/rect.tmp
}
# Create the RenderWindow, Renderer and both Actors
#
vtkRenderer ren1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment