### Build the CxxUnstructuredGrid example with CMake Source: https://docs.paraview.org/en/latest/Catalyst/getting_started.html Commands to configure and build the example. Set CMAKE_PREFIX_PATH to the libcatalyst install directory. Run from the CxxUnstructuredGrid directory. ```bash mkdir build cd build cmake -DCMAKE_PREFIX_PATH= ../CxxUnstructuredGrid cmake --build . ``` -------------------------------- ### Setup for coloring by variable Source: https://docs.paraview.org/en/latest/Tutorials/ClassroomTutorials/pythonAndBatchParaViewAndPython.html Moves forward one timestep, gets the render view, shows the clip, and prepares for coloring by a variable. ```python animationScene1 = GetAnimationScene() animationScene1.GoToNext() renderView1 = GetActiveViewOrCreate('RenderView') canex2Display = Show(clip, renderView1) ``` -------------------------------- ### ParaView examples directory paths for macOS, Windows, and Linux Source: https://docs.paraview.org/en/latest/_sources/Tutorials/SelfDirectedTutorial/batchPythonScripting.rst.txt Common installation paths for the ParaView examples directory on macOS, Windows, and Linux. Used to locate the disk_out_ref.ex2 file for the exercise. ```console /Applications/ParaView-x.x.x.app/Contents/examples ``` ```console C:/Program Files/ParaView x.x.x/examples ``` ```console /usr/local/lib/paraview-x.x.x/examples ``` -------------------------------- ### Example pvbatch command with arguments Source: https://docs.paraview.org/en/latest/_sources/Tutorials/ClassroomTutorials/pythonAndBatchPvpythonAndPvbatch.rst.txt Example command to run pvbatch with specific arguments for nodes, minutes, and batch file path. ```console /projects/viz/paraview/bin/pvbatch_chama_mesa 1 10 FY123456 /projects/viz/training/paraview/whipple-A.py ``` -------------------------------- ### Get help on Sphere and create instance Source: https://docs.paraview.org/en/latest/Tutorials/SelfDirectedTutorial/batchPythonScripting.html Use help() on the Sphere function and then create an instance of Sphere and get help on that instance. ```python help(Sphere) sphere = Sphere() help(sphere) ``` -------------------------------- ### Get help on paraview.simple module Source: https://docs.paraview.org/en/latest/Tutorials/SelfDirectedTutorial/batchPythonScripting.html Use the help() function to get documentation on the paraview.simple module, which lists all functions and their brief descriptions. ```python help(paraview.simple) ``` -------------------------------- ### Getting and setting ShrinkFactor property Source: https://docs.paraview.org/en/latest/_sources/UsersGuide/filteringData.rst.txt Shows how to retrieve the current value of a property (ShrinkFactor) and set it to a new value. The example prints the current value (0.5) and then sets it to 0.75. ```python # To get the current value of a property: >>> sf = shrink.ShrinkFactor >>> print sf 0.5 # To set the value >>> shrink.ShrinkFactor = 0.75 ``` -------------------------------- ### Setting up multiple input connections Source: https://docs.paraview.org/en/latest/_sources/UsersGuide/filteringData.rst.txt Creates a ResampleWithDataset filter with two input connections: a Sphere and a Wavelet. This is the basic setup for filters that require multiple inputs. ```python >>> sphere = Sphere() >>> wavelet = Wavelet() >>> resampleWithDataSet = ResampleWithDataset(Input=sphere, Source=wavelet) ``` -------------------------------- ### Set ClipType and get help on implicit function Source: https://docs.paraview.org/en/latest/_sources/UsersGuide/filteringData.rst.txt Shows how to set the ClipType property to 'Plane' and then get help on the implicit function type using the help() command. This is useful for exploring available implicit function options. ```python # To get help on a specific implicit function type, make it the active # ClipType and then use help() >>> clip.ClipType = 'Plane' >>> help(clip.ClipType) Help on Plane in module paraview.servermanager object: class Plane(Proxy) ... ``` -------------------------------- ### VRPN configuration and server startup Source: https://docs.paraview.org/en/latest/_sources/UsersGuide/displayingData.rst.txt Configure VRPN to connect to a tracking device. First, modify the vrpn.cfg file to uncomment and adjust the line for your device, then start the vrpn_server on port 22222 (super user may be needed on Linux). ```text vrpn_DevInput Input0 "Hoksi Technology DURGOD Taurus K320" keyboard 255 ``` ```bash ./bin/vrpn_server -v 22222 ``` -------------------------------- ### Set view properties with GetActiveView and SetViewProperties Source: https://docs.paraview.org/en/latest/_sources/UsersGuide/displayingData.rst.txt Access view properties from the active view object and set them directly or via SetViewProperties. The example shows setting CenterAxesVisibility and OrientationAxesVisibility and OrientationAxesLabelColor. ```python >>> view = GetActiveView() # Set center axis visibility >>> view.CenterAxesVisibility = 0 # Or you can use this variant to set the property on the active view. >>> SetViewProperties(CenterAxesVisibility=0) # Another way of doing the same >>> SetViewProperties(view, CenterAxesVisibility=0) # Similarly, you can change orientation axes related properties >>> view.OrientationAxesVisibility = 0 >>> view.OrientationAxesLabelColor = (1, 1, 1) ``` -------------------------------- ### Get and set view properties in pvpython Source: https://docs.paraview.org/en/latest/_sources/UsersGuide/displayingData.rst.txt Shows how to get and set a view property (CenterAxesVisibility) on a view object in pvpython. The example prints the current value (1) and then changes it to 0. ```python # Once you have a reference to the view, you can then get/set the properties. # Get the current value >>> print(view.CenterAxesVisibility) 1 # Change the value >>> view.CenterAxesVisibility = 0 ``` -------------------------------- ### Case One: Simple command server startup Source: https://docs.paraview.org/en/latest/ReferenceManual/parallelDataVisualization.html Server configuration for a locally started pvserver on localhost:11111. The CommandStartup element runs a command before connecting, with process_wait (seconds to wait for process start), delay (seconds after command before connecting), and exec (path to pvserver or a script). ```xml ``` -------------------------------- ### Run pvbatch on cluster (example) Source: https://docs.paraview.org/en/latest/_sources/Tutorials/ClassroomTutorials/pythonAndBatchPvpythonAndPvbatch.rst.txt Example command to run pvbatch on a cluster, showing the usage with arguments for nodes, minutes, and batch file path. ```console /projects/viz/paraview/bin/pvbatch_chama_mesa ``` -------------------------------- ### Get animation scene object Source: https://docs.paraview.org/en/latest/_sources/UsersGuide/animation.rst.txt Retrieves the animation scene object in ParaView's Python interface, which is the starting point for exploring and controlling animations programmatically. ```python >>> scene = GetAnimationScene() ``` -------------------------------- ### Expected output from running the example Source: https://docs.paraview.org/en/latest/Catalyst/getting_started.html Shows the expected console output when running the example, including cycle information, bounds, and data ranges. ```text executing catalyst_pipeline ----------------------------------- executing (cycle=0, time=0.0) bounds: (0.0, 69.0, 0.0, 64.9, 0.0, 55.9) velocity-magnitude-range: (0.0, 0.0) pressure-range: (1.0, 1.0) ----------------------------------- executing (cycle=1, time=0.1) bounds: (0.0, 69.0, 0.0, 64.9, 0.0, 55.9) velocity-magnitude-range: (0.0, 6.490000000000001) pressure-range: (1.0, 1.0) ----------------------------------- ... ```