[Paraview] Python Scripting - Slicing Data
Kevin Lau
kevin.d.lau at gmail.com
Tue Sep 16 19:11:50 EDT 2014
Dear all,
I'm trying to use a Python script to slice a 3D model in multiple locations
and interrogate the values at these slices.
Is it possible to apply the slice with a plane? I.e. intersect the model
with a pre-defined plane?
I can load and view my data and a plane I've defined (see below), but I
can't find how to slice/intersect them
Many thanks for your help,
Kevin
PYTHON SCRIPT:
from paraview.simple import *
# read data
data = PhastaReader(FileName="view.pht")
Show(data)
Render()
# define plane
plane1 = Plane()
plane1.Origin = [0, 0, 0]
plane1.Point1 = [1, 0, 0]
plane1.Point2 = [0, 1, 0]
Show(plane1)
Render()
# how to slice with the plane?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140916/1c498ef7/attachment.html>
More information about the ParaView
mailing list