Here is a diff that fixes the problem:<br><br>Index: ./VTK/Common/vtkFunctionParser.cxx<br>===================================================================<br>RCS file: /cvsroot/ParaView3/ParaView3/VTK/Common/vtkFunctionParser.cxx,v<br>
retrieving revision 1.44<br>diff -r1.44 vtkFunctionParser.cxx<br>1455,1457c1455,1460<br>< index += this->GetMathFunctionStringLength(functionNumber);<br>< currentChar = this->Function[index];<br>< if ( currentChar != '(' )<br>
---<br>> currentChar = this->Function[index+this->GetMathFunctionStringLength(functionNumber)];<br>> if ( currentChar == '(' )<br>> {<br>> index += this->GetMathFunctionStringLength(functionNumber);<br>
> }<br>> else<br>1459,1460d1461<br>< vtkErrorMacro("Syntax error: input to math function not in "<br>< << "parentheses; see position " << index);<br>
1463c1464<br>< return 0;<br>---<br>> return 1;<br><br>Regards,<br>Paul<br><br><br><div class="gmail_quote">2009/6/25 Paul Edwards <span dir="ltr"><<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</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 filter than creates secondary flow variables for post processing. They have names such as "absolute temperature". There is a problem with the Python parser where it will take the "abs" from absolute and interpret it as the math function. Is there a way around this?<br>
<br>Here are steps to reproduce this:<br><br><div style="margin-left: 40px;">from paraview.simple import *<br>cone = Cone()<br>calc = Calculator(cone)<br>calc.Function = "17"<br>calc.ResultArrayName = "absolute"<br>
calc2 = Calculator(calc)<br>calc2.Function = "(absolute) - 15"<br>calc2.UpdatePipeline()<br></div><br>The only solution I can think of is to rename the scalars that are output from the filter. Does anyone have any other ideas? (In future might it be worth allowing the user to put values in {}'s or something?)<br>
<br>Regards,<br><font color="#888888">Paul<br>
</font></blockquote></div><br>