def runTest(): options = servermanager.vtkProcessModule.GetProcessModule().GetOptions() url = options.GetServerURL() smp.Connect(getHost(url), getPort(url)) r = smp.CreateRenderView() r.RemoteRenderThreshold = 20 s = smp.Sphere() s.PhiResolution = 80 s.ThetaResolution = 80 d = smp.Show() d.Representation = "Wireframe" smp.Render() r.RemoteRenderThreshold = 0 smp.Render() s.PhiResolution = 8 s.ThetaResolution = 8 smp.Render() smtesting.ProcessCommandLineArguments() if not smtesting.DoRegressionTesting(r.SMProxy): raise smtesting.TestError("Test failed!!!") print("Test Passed")
from visocyte import smtesting from visocyte.simple import * import os.path smtesting.ProcessCommandLineArguments() datafile = os.path.join(smtesting.DataDir, "office.binary.vtk") OpenDataFile(datafile) r = Show() # check for existence of certain representation properties from LIC # First, before loading the plugin try: print("LICIntensity", r.LICIntensity) except AttributeError: pass else: raise RuntimeError("FAILED! LICIntensity should not have exisited!") try: print("SelectInputVectors", r.SelectInputVectors) except AttributeError: pass else: raise RuntimeError("FAILED! SelectInputVectors should not have exisited!") # now load the plugin and try again LoadDistributedPlugin("SurfaceLIC", remote=False, ns=globals()) datafile = os.path.join(smtesting.DataDir, "office.binary.vtk") OpenDataFile(datafile) r = Show(Representation="Surface LIC")