2

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

Ali_Sh
  • 2,667
  • 3
  • 43
  • 66

1 Answers1

6

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.

Utkarsh
  • 1,492
  • 1
  • 11
  • 19