use of formula in Notebook: WARNING!
use of formula in Notebook: WARNING!Posted by pierre_j at August 24. 2012
I would like to report what could be stated as a bug, even if it is not really.
However, this can lead to wrong results without the user noticing it: it is really frustrating (I really prefer a bug that crashes the application, than a bug like this one).
I believe this is caused by python: using an integer in a division will return an integer.
Basically, I had in the notebook:
As a result, the use of "Translation_Y" leads to a translation of -1 instead of -0.5.
Maybe nothing can be done against this behaviour, but when handling very large structures, such a difference in translation may goes unoticed, while being not what is expected by the user.
At least, maybe an alarm should be emitted when integers are used in division in Salome Notebook.
Or maybe, all numbers should be turned into real.
PS: using Salome 6.5.0
Sorry to come back again.
Actually, A 2nd bug should be mentionned (an important one this time):
In the notebook, an integer that is entered as a real (for instance 1.0 instead of 1) is dumped in python as an integer (1).
Thus, replaying the script will turned to wrong results if this variable is used in formula.