[Paraview] Calculater Bug or am I just with stupid?

no name keinepostnurmuell at gmail.com
Wed Jun 1 07:08:06 EDT 2016


Hello

I have a problem I cannot figure out:

1 -> read in VTR file (Rectiliniear Grid)
2 -> apply "cell data to point data" filter
3 -> apply "calculator" on it, that selects only the Z component. Call
it "M_Z" (result array name).
4 -> apply "gradientofunstructureddataset" on the calc. with Scalar
Array set to "M_Z".

Works perfectly in the GUI.

Now I code it in a macro and I do it like that (after the celldatatopointdata):

# create a new 'Calculator'
Mz = Calculator(Input=cellDatatoPointData1)
Mz.ResultArrayName = 'M_Z'
Mz.Function = 'M_Z'
RenameSource('Mz', Mz)



# create a new 'Gradient Of Unstructured DataSet'
grad_Mz = GradientOfUnstructuredDataSet(Input=Mz)
grad_Mz.ScalarArray = ['POINTS', 'M_Z']
grad_Mz.ResultArrayName = 'grad_Mz'
RenameSource('grad_Mz', grad_Mz)

No matter what I do, I always get the wrong Scalar Array selected in
the GUI when I start the macro. When I then correct it in the GUI ->
works.

Any ideas?

Thanks
Richard


More information about the ParaView mailing list