Reputation:
I want to make Paraview slice in normal z direction (0,0,1) in python shell.
paraview.simple.Slice(*input, **params)
what should be input in paraview.simple.Slice
to get a slice at particular location
Upvotes: 2
Views: 2069
Reputation: 1522
Here's an example script:
from paraview import simple as pvs
dataProducer = pvs.Wavelet()
slicer = pvs.Slice(Input=dataProducer, SliceType="Plane")
slicer.SliceType.Origin = [0, 0, 0]
slicer.SliceType.Normal = [0, 0, 1]
# To render the result, do this:
Show(slicer)
Render()
You can also you Tools | Start Trace to generate Python trace for actions you perform in the UI.
Upvotes: 6