mirror of
https://github.com/OpenFOAM/ThirdParty-6.git
synced 2025-12-08 06:57:43 +00:00
ParaView-5.0.1: Added the source-tree to ThirdParty-dev and patched as described in the README file
Resolves bug-report http://bugs.openfoam.org/view.php?id=2098
This commit is contained in:
@ -0,0 +1,34 @@
|
||||
#### import the simple module from the paraview
|
||||
from paraview.simple import *
|
||||
|
||||
# Create a wavelet and clip it with a Cylinder.
|
||||
wavelet = Wavelet()
|
||||
Show()
|
||||
|
||||
clip = Clip()
|
||||
clip.ClipType = "Cylinder"
|
||||
clip.InsideOut = True
|
||||
Show()
|
||||
|
||||
cylinder = clip.ClipType
|
||||
cylinder.Axis = [-1, 1, -1]
|
||||
cylinder.Center = [8, 4, -3]
|
||||
cylinder.Radius = 3
|
||||
|
||||
Render()
|
||||
|
||||
# compare with baseline image
|
||||
import os
|
||||
import sys
|
||||
try:
|
||||
baselineIndex = sys.argv.index('-B')+1
|
||||
baselinePath = sys.argv[baselineIndex]
|
||||
except:
|
||||
print "Could not get baseline directory. Test failed."
|
||||
exit(1)
|
||||
baseline_file = os.path.join(baselinePath, "TestClipCylinder.png")
|
||||
import vtk.test.Testing
|
||||
vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
|
||||
vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file,
|
||||
threshold=25)
|
||||
vtk.test.Testing.interact()
|
||||
Reference in New Issue
Block a user