MantisBT - ParaView | |||||||||||||||
| View Issue Details | |||||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||
| 0009208 | ParaView | Bug | public | 2009-06-26 04:37 | 2010-03-10 13:05 | ||||||||||
| Reporter | Paul Edwards | ||||||||||||||
| Assigned To | Zhanping Liu | ||||||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||||||||
| Status | closed | Resolution | no change required | ||||||||||||
| Platform | OS | OS Version | |||||||||||||
| Product Version | |||||||||||||||
| Target Version | 3.8 | Fixed in Version | 3.8 | ||||||||||||
| Project | |||||||||||||||
| Topic Name | |||||||||||||||
| Type | |||||||||||||||
| Summary | 0009208: Calculator parsing issue | ||||||||||||||
| Description | There is a problem with the Python parser where it will not recognise a variable that begins with the letters of a mathematical function, e.g. a variable called "absolute" with cause an error because "abs" is a function and it will expect a bracket. Here is a test case: 8<--------------------------------------- from paraview.simple import * cone = Cone() calc = Calculator(cone) calc.Function = "17" calc.ResultArrayName = "absolute" calc2 = Calculator(calc) calc2.ScalarVariable = ["abs", "abs", "0"] calc2.Function = "absolute - 15" calc2.UpdatePipeline() --------------------------------------->8 Here is a patch to fix: 8<--------------------------------------- Index: ./VTK/Common/vtkFunctionParser.cxx =================================================================== RCS file: /cvsroot/ParaView3/ParaView3/VTK/Common/vtkFunctionParser.cxx,v retrieving revision 1.44 diff -r1.44 vtkFunctionParser.cxx 1455,1457c1455,1460 < index += this->GetMathFunctionStringLength(functionNumber); < currentChar = this->Function[index]; < if ( currentChar != '(' ) --- > currentChar = this->Function[index+this->GetMathFunctionStringLength(functionNumber)]; > if ( currentChar == '(' ) > { > index += this->GetMathFunctionStringLength(functionNumber); > } > else 1459,1460d1461 < vtkErrorMacro("Syntax error: input to math function not in " < << "parentheses; see position " << index); 1463c1464 < return 0; --- > return 1; --------------------------------------->8 | ||||||||||||||
| Steps To Reproduce | |||||||||||||||
| Additional Information | |||||||||||||||
| Tags | No tags attached. | ||||||||||||||
| Relationships |
| ||||||||||||||
| Attached Files | |||||||||||||||
| Issue History | |||||||||||||||
| Date Modified | Username | Field | Change | ||||||||||||
| 2009-06-26 04:37 | Paul Edwards | New Issue | |||||||||||||
| 2009-12-09 14:49 | Berk Geveci | Project | @3@ => ParaView | ||||||||||||
| 2009-12-29 11:22 | Utkarsh Ayachit | Status | backlog => tabled | ||||||||||||
| 2009-12-29 11:22 | Utkarsh Ayachit | Assigned To | => Zhanping Liu | ||||||||||||
| 2010-03-04 13:10 | Zhanping Liu | Note Added: 0019712 | |||||||||||||
| 2010-03-04 13:10 | Zhanping Liu | Status | tabled => @80@ | ||||||||||||
| 2010-03-04 13:10 | Zhanping Liu | Category | => Bug | ||||||||||||
| 2010-03-09 22:05 | Alan Scott | Note Added: 0019791 | |||||||||||||
| 2010-03-09 22:05 | Alan Scott | Status | @80@ => @20@ | ||||||||||||
| 2010-03-09 22:05 | Alan Scott | Resolution | open => reopened | ||||||||||||
| 2010-03-10 09:38 | Utkarsh Ayachit | Note Added: 0019799 | |||||||||||||
| 2010-03-10 09:38 | Utkarsh Ayachit | Status | @20@ => @80@ | ||||||||||||
| 2010-03-10 09:38 | Utkarsh Ayachit | Resolution | reopened => no change required | ||||||||||||
| 2010-03-10 09:38 | Utkarsh Ayachit | Fixed in Version | => 3.8 | ||||||||||||
| 2010-03-10 09:38 | Utkarsh Ayachit | Target Version | => 3.8 | ||||||||||||
| 2010-03-10 13:05 | Alan Scott | Note Added: 0019811 | |||||||||||||
| 2010-03-10 13:05 | Alan Scott | Status | @80@ => closed | ||||||||||||
| 2010-05-06 14:11 | Robert Maynard | Relationship added | has duplicate 0010536 | ||||||||||||
| 2010-05-06 14:26 | Robert Maynard | Relationship added | has duplicate 0009438 | ||||||||||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||