Hi,<br>When I use this filter with vtk (this is vtkArrayCalculator) in c++, I have to call a function AddVectorArrayName or AddScalarArrayName in order to 'tell' the calculator that he has to use the array name as a variable in the function string. Maybe this is the point ?<br>
<br>'Hope that helps<br>Jerome<br><br><div class="gmail_quote">2009/7/13 Andreas Maier <span dir="ltr"><<a href="mailto:andi.maier@mytum.de">andi.maier@mytum.de</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I have a problem with the Calculator filter using pvpython and the<br>
servermanager module.<br>
<br>
My script works fine upto that point:<br>
<br>
<br>
> from paraview import servermanager<br>
> ...<br>
> ...<br>
># Point to Cell Data<br>
> ptc=servermanager.filters.PointDataToCellData(Input=clip2)<br>
> ptc.UpdatePipeline()<br>
><br>
># Calculate von Mises Caucy stress and save in in celldata 'vMises_stress'<br>
> calc_vM=servermanager.filters.Calculator(Input=ptc, AttributeMode=2,<br>
ResultArrayName='vMises',<br>
Function='0.70711*sqrt((eigenval1-eigenval2)^2+(eigenval2-eigenval3)^2+(eigenval3-eigenval1)^2)')<br>
> calc_vM.UpdatePipeline()<br>
<br>
<br>
and then I get the following error:<br>
<br>
>ERROR:<br>
In /home/berk/Work/ReleaseBuilds/ParaView3/VTK/Common/vtkFunctionParser.cxx,<br>
line 1473<br>
>vtkFunctionParser (0xa105428): Syntax error: expecting a variable name; see<br>
position 0<br>
<br>
>ERROR:<br>
In /home/berk/Work/ReleaseBuilds/ParaView3/VTK/Common/vtkFunctionParser.cxx,<br>
line 1473<br>
>vtkFunctionParser (0xa105428): Syntax error: expecting a variable name; see<br>
position 0<br>
<br>
It must be something with the names of my cell<br>
arrays 'eigenval1',..,'eigenval3' because I do not get that error when using<br>
just scalars in Function (IE: Function='10000').<br>
<br>
That same formula works fine when I use it in the paraview Calculator.<br>
<br>
I hope that anybody can help me with that problem. Thanks in advance.<br>
<br>
<br>
Best wishes,<br>
<br>
Andi<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</blockquote></div><br>