<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Am I correct that the cross() operation is still broken in ParaView 3.4.0<div>related to the bug posted:&nbsp;<a href="http://www.gccxml.org/Bug/view.php?id=2903">http://www.gccxml.org/Bug/view.php?id=2903</a> ?</div><div><br></div><div><span class="Apple-style-span" style="font-family: Verdana; font-size: 13px; "><a name="bugnotes" id="bugnotes"><div id="bugnotes_open" style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; "><table class="width100" cellspacing="1" style="width: 100%; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); position: static; z-index: auto; "><tbody><tr class="bugnote" id="c13828" style="vertical-align: top; "><td class="bugnote-note-public" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; text-align: left; background-color: rgb(232, 232, 232); color: rgb(0, 0, 0); width: 75%; ">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.<br><br>The correct format of a vector cross product operation is:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;====================================<br>&nbsp;&nbsp;&nbsp;&nbsp;vector_C = cross(vector_A, vector_B)<br>&nbsp;&nbsp;&nbsp;&nbsp;====================================<br><br>&nbsp;&nbsp;&nbsp;&nbsp;INSTEAD OF<br><br>&nbsp;&nbsp;&nbsp;&nbsp;====================================<br>&nbsp;&nbsp;&nbsp;&nbsp;cross(vector_A, vector_B, vector_C)<br>&nbsp;&nbsp;&nbsp;&nbsp;====================================<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;In other words, there should be TWO parameters and ONE comma.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;However, the bug in vtkFunctionParser:: CheckSyntax() occurred within the following segment (between line 1444 and line 1453):<br><br>&nbsp;&nbsp;&nbsp;&nbsp;============================================================<br>&nbsp;&nbsp;&nbsp;&nbsp;if ((functionNumber == VTK_PARSER_MIN) ||<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(functionNumber == VTK_PARSER_MAX))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expectCommaOnParenthesisCount[parenthesisCount+1] = 1;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;if ((functionNumber == VTK_PARSER_IF) ||<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(functionNumber == VTK_PARSER_CROSS))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expectTwoCommasOnParenthesisCount[parenthesisCount+1] = 1;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;============================================================<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Now this segment has been replaced with<br><br>&nbsp;&nbsp;&nbsp;&nbsp;============================================================<br>&nbsp;&nbsp;&nbsp;&nbsp;if ((functionNumber == VTK_PARSER_MIN) ||<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(functionNumber == VTK_PARSER_MAX) ||<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(functionNumber == VTK_PARSER_CROSS))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expectCommaOnParenthesisCount[parenthesisCount+1] = 1;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;if (functionNumber == VTK_PARSER_IF)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expectTwoCommasOnParenthesisCount[parenthesisCount+1] = 1;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;============================================================<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;Now the code performs correct check on the input format in terms of vector cross product and the suggested functionality is supported.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thanks for suggesting the enhancement.<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new revision: 1.43; previous revision: 1.42</td></tr></tbody></table></div></a></span></div><div><font class="Apple-style-span" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">It says it is fixed but it seems to&nbsp;exhibit&nbsp;the&nbsp;behavior&nbsp;&nbsp;described it the history of this bug (in 3.4.0). Namely if you give it two arguments it&nbsp;complains</span></font></div><div><font class="Apple-style-span" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">about&nbsp;needing three? Is this fixed in the cvs version?</span></font></div><div><font class="Apple-style-span" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><br></span></font></div><div><font class="Apple-style-span" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">Thanks</span></font></div><div><font class="Apple-style-span" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><br></span></font></div><div><font class="Apple-style-span" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">Dan</span></font></div><div><font class="Apple-style-span" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><br></span></font><div><div>On Mar 4, 2009, at 4:23 PM, Jacques Papper wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Thanks for the answer. I guess I missed the cross button !&nbsp;<div>(The whole point was that I didn't want to write out the cross product anymore !! :)&nbsp;<br><br><div class="gmail_quote">2009/3/4 Scott, W Alan <span dir="ltr">&lt;<a href="mailto:wascott@sandia.gov">wascott@sandia.gov</a>></span><br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Silly me, of course. &nbsp;Math class was just too many years ago.<br> <font color="#888888"><br> alan<br> </font><div class="im"><br> -----Original Message-----<br> From: Pebay, Philippe P<br> Sent: Wednesday, March 04, 2009 2:59 PM<br> To: Scott, W Alan; 'Jacques Papper'; 'paraview'<br> </div><div><div></div><div class="h5">Subject: RE: [Paraview] Calculator and vector products<br> <br> Hello<br> <br> The + sighs between cross terms should be replaced by - signs as follows:<br> &nbsp; &nbsp;i ( a_2b_3 - a_3b_2 )<br> &nbsp;+ j ( a_3b_1 - a_1b_3 )<br> &nbsp;+ k (a_1b_2 - a_2b_1 )<br> <br> P.<br> <br> --<br> Philippe Pébay<br> Sandia National Laboratories<br> <br> ________________________________________<br> From: <a href="mailto:paraview-bounces@paraview.org">paraview-bounces@paraview.org</a> [<a href="mailto:paraview-bounces@paraview.org">paraview-bounces@paraview.org</a>] On Behalf Of Scott, W Alan [<a href="mailto:wascott@sandia.gov">wascott@sandia.gov</a>]<br> Sent: Wednesday, March 04, 2009 1:30 PM<br> To: 'Jacques Papper'; 'paraview'<br> Subject: Re: [Paraview] Calculator and vector products<br> <br> I don't know if this is correct, but I took a quick attempt at making a cross product. &nbsp;I am using the dataset can.exo. &nbsp;In the calculator, I am trying to create the cross of the DISP and ACCL vectors. &nbsp;Here is the formula:<br> <br> iHat*(DISPL_Y*VEL_Z+DISPL_Z*VEL_Y)+jHat*(DISPL_X*VEL_Z+DISPL_Z*VEL_X)+kHat*(DISPL_X*VEL_Y+DISPL_Y*VEL_X)<br> <br> <br> <br> Alan<br> <br> -----Original Message-----<br> From: <a href="mailto:paraview-bounces@paraview.org">paraview-bounces@paraview.org</a> [mailto:<a href="mailto:paraview-bounces@paraview.org">paraview-bounces@paraview.org</a>] On Behalf Of Jacques Papper<br> Sent: Wednesday, March 04, 2009 12:27 PM<br> To: 'paraview'<br> Subject: [Paraview] Calculator and vector products<br> <br> I am trying to do a vector product with the Calculator, but this seems to fail "Error deciding between ambiguous operators".<br> Is there a way to do vector products ? Or is this something that needs to be implemented ?<br> <br> Jacques PAPPER<br> Applied CFD Team Leader<br> Tel: +44 (0) 1234 324677<br> <br> <br> ---------------------------<br> This email contains information that is private and confidential and is intended only for the addressee. &nbsp;If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.<br> Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons.<br> Aircraft Research Association Ltd. &nbsp;Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245<br> <br> <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> <br> <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> <br> <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> </div></div></blockquote></div><br></div> _______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">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">http://paraview.org/Wiki/ParaView</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><br></blockquote></div><br></div></body></html>