Get the max and min value of Aspect Ratio for a element set with TCL
Hello everyone.
I'm checking the aspect ratio for a 2D mesh and trying to get the min and max values inside the set of elements selected.
This values are made to be display in a tk_messageBox so is necessary to obtain this values through TCL commands in the console/script.
Right now I'm only using the *elementtestaspect witch give the elements that match the criteria in a mark and those that do not in another mark. With these I can only display the % of failure.
These is my code:
*createmark elements 1 "displayed"
*createmark elements 2
*elementtestaspect elements 1 20 2 2 0 " 2D Aspect Ratio"
set elements_OK [hm_marklength elements 1]
set elements_failed [hm_marklength elements 2]
tk_messageBox -type ok -message "$elements_failed of $elements_OK failed \n"
Hope you guys can help me.
Greetings!
Best Answer
-
Something like this should give you what you want:
hm_createmark elems 1 "advanced" "all"
hm_getelemcheckbounds 1 2 aspect1
Answers
-
Something like this should give you what you want:
hm_createmark elems 1 "advanced" "all"
hm_getelemcheckbounds 1 2 aspect1 -
That's just what I need it.
Thanks so much, Ben!0