Hello,
I would like to optimize some of my code, and one thing I usually do is creating a slice with several range values, and I would like to get the minimum and maximum possible values for this range automatically. this range will change in function of the plane normal (and I imagine of the plane origin also) of the slice itself. For slices that are placed in the XY, XZ, YZ planes this is easy to do using the bounding ruler, but when the plane is not parallel to this plane things get more complicated. while working with the interface, I notice that paraview automatically calculates this, (it is shown over the table with the different desired values as Value Range: [minVal, maxVal] (with minVal and maxVal being floats) and also when creating several values (ie., when clicking on the ‘add a range of values’) we can see that the minVal and maxVal are displayed.
my question is, is it possible to get in python this values automatically?
I mean something like this procedure:
0. define the number of slices(nS) in a variable and a desired source filter to be sliced
- create a slice filter with definition of the origin and normal over a source filter
- calculate the possible range value (so get the minVal and maxVal) of the slice filter defined in 1.
- set the
SliceOffsetValues
of the slice filter using a linespace with the minVal and maxVal found in 2. and the nS defined in 0.