View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0002903 | VTK | (No Category) | public | 2006-02-22 11:24 | 2013-04-05 19:57 | ||||
Reporter | Randall Hand | ||||||||
Assigned To | Zhanping Liu | ||||||||
Priority | urgent | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | open | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0002903: vtkArrayCalculator does not support Cross Products | ||||||||
Description | the existing vtkArrayCalculator (in both VTK & ParaView) does not support computation of Cross Products. As this is important in my work, I modified the Common/vtkFunctionParser.cxx/h to support a "cross" function that takes 2 vectors as input. | ||||||||
Tags | No tags attached. | ||||||||
Project | |||||||||
Type | |||||||||
Attached Files | vtkFunctionParser.cxx [^] (58,630 bytes) 1969-12-31 19:00 vtkFunctionParser.h [^] (8,616 bytes) 1969-12-31 19:00 | ||||||||
Relationships | |
Relationships |
Notes | |
(0013828) Zhanping Liu (developer) 2008-10-09 18:40 |
randall.hand once suggested the addition of the support for the vector cross product operator. It was added some time later. Then some new operators such as boolean ones were added and during this process unfortunately the vector cross product operator was carelessly disabled due to the incorrect check on the number of the input parameters. The correct format of a vector cross product operation is: ==================================== vector_C = cross(vector_A, vector_B) ==================================== INSTEAD OF ==================================== cross(vector_A, vector_B, vector_C) ==================================== In other words, there should be TWO parameters and ONE comma. However, the bug in vtkFunctionParser:: CheckSyntax() occurred within the following segment (between line 1444 and line 1453): ============================================================ if ((functionNumber == VTK_PARSER_MIN) || (functionNumber == VTK_PARSER_MAX)) { expectCommaOnParenthesisCount[parenthesisCount+1] = 1; } if ((functionNumber == VTK_PARSER_IF) || (functionNumber == VTK_PARSER_CROSS)) { expectTwoCommasOnParenthesisCount[parenthesisCount+1] = 1; } ============================================================ Now this segment has been replaced with ============================================================ if ((functionNumber == VTK_PARSER_MIN) || (functionNumber == VTK_PARSER_MAX) || (functionNumber == VTK_PARSER_CROSS)) { expectCommaOnParenthesisCount[parenthesisCount+1] = 1; } if (functionNumber == VTK_PARSER_IF) { expectTwoCommasOnParenthesisCount[parenthesisCount+1] = 1; } ============================================================ Now the code performs correct check on the input format in terms of vector cross product and the suggested functionality is supported. Thanks for suggesting the enhancement. new revision: 1.43; previous revision: 1.42 |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2008-09-25 15:29 | Berk Geveci | Assigned To | Mathieu Malaterre => Zhanping Liu |
2008-10-09 18:40 | Zhanping Liu | Note Added: 0013828 | |
2008-10-09 18:42 | Zhanping Liu | Status | tabled => @80@ |
2008-10-09 18:42 | Zhanping Liu | Description Updated | |
2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) |
2013-04-05 19:57 | Berk Geveci | Status | customer review => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |