[Version 1.1 reuse bug fix added]
I want to share this small tool. It is a math expression to ICE compound converter. (Softimage 2011)
Donwload agMathParser 1.1 (Right click – SaveAs or drag and drop into softimage)
Supported functions:
- +, -, *, /, ^, %
- sin, cos, tan, asin, acos, atan
- sqrt, abs, min, max, floor, log, ln
- PI, E
Install the addon, and execute it at Ice Tree View\User Tools\agMath Parser.
If you find any error, please tell me and indicate the expression taht cause the error.
Any comments or ideas are welcome too.
No related posts.


SI 2011.5
Encountered an error:
# ERROR : 2000-EDIT-ConnectICENodes – The nodes you are trying to connect are not in the same container
as well as
# ERROR : 2000 – Argument 0 (Port) is invalid
# ERROR : 2001-EDIT-AddPortToICENode – Argument 0 is invalid
# ERROR : 2000 – Argument 0 (InputObj) is invalid
# ERROR : 2006-SIMU-CreateICECompoundNode – Unexpected failure.
first compound is executed without problems but all the subsequent ones get an error.
Great and time saving idea, btw. Thanks for sharing.
Hello Alex, what expression cause the error?
Hi Angel, just about any expression except the first one executed on a given ice tree causes an error. Sometimes, it will just fail to connect nodes properly. Heres a screenshot:
http://img195.imageshack.us/img195/9575/16804212.png
Dont think this could be excursively a problem on my machine, but i would wait for more people to report it.
Thanks Alex, I found the bug and now it’s fixed.
I not detected it becouse before upload the addon I delete a souce line that I think that not was needed buy it’s seem that is essential.
That was quick!
Works absolutely fine now. Take care Angel, and again, thank you.
Nice idea!
Does it have some kind of support to add new functions by users?
Hi Cesar, yes and no.
You can add a lot of new ICE nodes in the config.py file.
But others nodes are not so trivial to modify, for example cos node. Is the same node that sin one, but you must change the configuration. Other example is ln (Neper logarithm) becouse is not dafault ice supported, internally add the E constant node.
In a second version I add new config possibilities, and rewrite the code. That addon was my first experience with the ast module (a wondefurll python parser module) and I have some source code changes in mind.
GREAT Tool, man, Many Thanks for sharing!!!!!!
Great idea! And thanks for sharing.
Hi Angel.
It´s fantastic, i have 2 ideas for features right now.
1.Add ability to get back expression to editor (just get compound expression comment!?)
2.Add PHI (Phibonacci) constant.
Thanks, and continue good work! ;)
PHI = ~1.6180339887
Hi Angel, i found a error in parse order in comment of compound created.
Note the order of execution parenthesis.
If formula is (1 + sqrt(5) )/ 2 the result comment of compound is wrong missing parenthesis : “1 + sqrt(5) / 2″ but the result in formula is correct 1.618 (PHI constant formula)
it´s a problem because if i use the wrong comment “1 + sqrt(5) / 2″ result to rebuild formula the result is wrong order of execution formula resulting in erroneous PHI contant of 2.118 !
Malcolm.
Hello Malcom, you are right. There is a bug writting the comment. I’ll solve it as soon as possible.
Phi constant is a good candidate to add to the parser. I’ll released soon a new version with more customization possibilities. But phi will be a default constant in the new version
What do you mean with your first idea? Writhe the parsed expression to the script editor.
If you have any new suggernce tell me
Thanks for the report.
[...] math node generator translating expressions to an ICE Compound. Nifty! You can download it here agedito.com/?blog/??p=134 (new version 1.1 [...]
All data is scalar. It is not very convenient.
You are right. In next version integers and vectors will be supported.
Hi Angel,
one thing I noticed is you define all your variables with constants right inside the compound. I tend to avoid it because then you can’t use arrays on the expressions… just an idea.
Either way, nice addon!
thanks.
Thanks for making this for everyone.
just brilliant
Something similare would make sense also for the render tree .I’d released a second version fixing a bug.
Finally if you have time,please must visit <a href=”http://www.flyermilescard.com/”>my blog</a>.I want more and more people visit my blog.Therefore i need your attention and give me some advice. and I’m looking forward for your next post.
Hi I have no buttons Parse and refresh, just 2 lines
# ImportError: No module named modules.Views
# – [line 60 in \\...\Workgroup_XSI_2011_64\Addons\agMathParser\Application\Plugins\agMathParserPlugin.py]
is it possible to math like this
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:”Обычная таблица”;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:”";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:”Calibri”,”sans-serif”;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:”Times New Roman”;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:”Times New Roman”;
mso-bidi-theme-font:minor-bidi;}
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:”Обычная таблица”;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:”";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:”Calibri”,”sans-serif”;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:”Times New Roman”;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:”Times New Roman”;
mso-bidi-theme-font:minor-bidi;}
X3*y4*y1-x2*y2*y4
Sorry!
INFO : 4034 – Loaded scene was created with build number: 10.1.62.0 – compatibility version: 1000
‘ ERROR : Traceback (most recent call last):
‘ File “<Script Block 2>”, line 84, in agMathParser_Property_DefineLayout
‘ draw(oLayout, None)
‘ File “<Script Block 2>”, line 61, in draw
‘ from modules.Views import GetIceContainersComboData
‘ ImportError: No module named modules.Views
‘ – [line 60 in C:\Users\RoN43\Autodesk\Softimage_2012_SP1\Addons\agMathParser\Application\Plugins\agMathParserPlugin.py]
Find problem: not work in my custom layout! work in default
i think this is true
i think this is true
merci pour l’information
jolie article
merci pour l’information
je pense que votre article est assez complet
happy to know this
votre contribution m’aide beaucoup, merci pour cette information
jolie article
merci pour la contribution