[Gmsh] mesh partitions without different colors

Jozsef Bakosi jbakosi at gmu.edu
Tue Jun 7 15:30:59 CEST 2005


On Mon, Jun 06, 2005 at 04:11:23PM -0700, Christophe Geuzaine wrote:
> Jozsef Bakosi wrote:
> >Hi all,
> >
> >I'm trying to display a 2d triangular partitioned mesh by setting
> >Options->Mesh->Color to "By Partition", but gmsh doesn't use
> >different colors for the different partitions. However, the mesh is
> >read in well, since when I change the visibility to display only
> >one/some of the partitions, the partitions appear.
> >
> >This is the mesh I'm using:
> >http://camp.gmu.edu/jbakosi/pub/square.msh
> >
> >Is this a bug or I'm missing something?
> >
> 
> Hi Jozsef - Good catch: it's a bug... Here is a patch to fix it:
> 
> 
> --- Common/Options.cpp.orig     2005-06-06 16:07:23.000000000 -0700
> +++ Common/Options.cpp  2005-06-06 16:07:34.000000000 -0700
> @@ -4442,7 +4442,7 @@
>    if(action & GMSH_SET) {
>      if(CTX.mesh.color_carousel != (int)val) CTX.mesh.changed = 1;
>      CTX.mesh.color_carousel = (int)val;
> -    if(CTX.mesh.color_carousel < 0 || CTX.mesh.color_carousel > 2)
> +    if(CTX.mesh.color_carousel < 0 || CTX.mesh.color_carousel > 3)
>        CTX.mesh.color_carousel = 0;
>    }
>  #if defined(HAVE_FLTK)
> 
> 
> 
> Thanks for the report!
> 

Christophe,

works excellent. Thanks a lot!

Jozsef
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20050607/11826b3f/attachment.asc>