Color by element type

This one is for EnSight 10 only, folks. E10 has a new calculator function called EleMetric which has many features for mesh quality assessment. One function creates a scalar variable for each element which represents the type of element it is. Using this function one can color each element by element type. This tool is essentially a wrapper for EleMetric that adds some nice extras.

Download: (updated 2014-2-20)

Advantages of using this tool vs. manually coloring by EleMetric include:

  1. Automate simple steps: calculating the variable, naming the variable, coloring the parts, hiding the default legend, setting per-element variable coloring to discrete (palette option).
  2. Automatically sets the palette to the correct number of levels. One level for each element type.
  3. Gives consistent coloring of element types between sessions and using different datasets. For example triangles will always be colored light blue. Colors were chosen to contrast.
  4. Creation of a ‘legend’ consisting of text annotations that tell which element types each color refers to.
  5. Provides a note about the consequences of creating the variable on created parts vs. only on model parts. Also makes it easier to calculate only on model parts.

EnSight versions: 10.0+
OS: all

Show a multi-colored overlay mesh

This simple script will create the effect of a “hidden line’ display but with more coloring options than are normally available. The script does not do anything that cannot be done through the EnSight GUI but it does make it easier. Also, only fairly advanced users of EnSight would be aware that it is even possible. To use this script just set the view and part colors how you want them, then run the script as a UDT. (updated 2014-2-21)

Basically the script does these steps:
Part selection: Applies to selected and visible parts only. If no parts are selected it is applied to all visible parts. Only 2D parts and 3D parts in border representation are affected.
1. Creates copies of the original parts and colors these parts gray.
2. Creates a black ‘outline’ part by taking an extract of 2D parts (in border rep) and 3D parts (in feature angle rep). (Skips this step by default. Set “CREATE_EDGES = True” on line 24.)
3. Turns element shading of original parts off and sets line thickness to 2.

The effect is that the ‘hidden line’ display is show with the colors of the original parts, on top of gray shaded parts.

The script attempts to have a minimal effect on the original parts. To return to the original view just do steps:
1. Delete or hide the created copy and extract parts
2. Turn on part shading of the original parts