Mesh Line Color

Hello,

I’m wondering if there’s any possibility to have mesh line colors on a per body instance? We often will compare 2d meshes by overlaying them, but it is difficult to do this when we cannot assign unique colors to each mesh.

Hi @pcristini,
yes it is possible. You just need to draw the edges with a color.

#!cubit
reset
create surface rectangle width 1 zplane
create surface rectangle width 1 zplane
move surface 1 x 0.01 y 0.02
mesh surface all
draw edge all in surface 1 color blue
draw edge all in surface 2 color red add

Thank you @Norbert_Hofbauer !

Can you explain why this does not do the same thing?

color surface 1 mesh blue 
color surface 2 mesh red

According to the docs

Including the Mesh keyword will change the color of the mesh belonging to the specified entity, without changing the color of the entity geometry itself.

The color used to draw mesh edges is the line color.
You can change that with color lines <color> but unfortunately you can’t specify any entity to get a specific line color. The best way to get different colors is with the draw command.