is there a way how to extract information of color scheme ranges of quality values using Python?
Let’s say, I import a mesh and check its quality by selecting “Display graphical Summary” in Visual tab. I got the color scheme bar and the mesh according to the color scheme.
Moreover, other output are ranges of color scheme, e.g.:
Red ranges from…
Magenta ranges from…
etc.
I want to extract those ranges for Red, Magenta,…using some function/method compatible with Python. It is possible?
Welcome to the forum. The range of color schemes is just determined by the minimum and maximum quality values binned into n categories. You can use get_elem_quality_stats to get the minimum and maximum values and the sorted set of elements.
How are you setting this up? Are you running from the journal editor in python mode or are you trying to run from an external python file? Also, what version of Cubit are you running?
What happens if you copy and paste the first part of the script into the Python tab in Cubit?
@karl
I am running python commands from journal editor in python mode.
I am using Cubit 11.1.
When I run 2-8 lines of your suggested code solution (that means up to “quality_data = cubit.get_elem_quality_stats…”), I got that above-mentioned error. I just copied those lines into editor in python mode and run it.
E.g. if I try another function such as “cubit.get_surface_quads(1)”, this particular function works fine.
Cubit 11.1 is very old. Sandia Cubit is at 16.x now. Coreform Cubit switched to a year numbering system (2022.6 currently) over a year ago. The quality function I referenced likely does not exist in that old version of Cubit.