Skip to content
Snippets Groups Projects
Commit de43bcbe authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

draw line elements

parent 62eb29e9
No related branches found
No related tags found
No related merge requests found
// $Id: Mesh.cpp,v 1.41 2001-08-28 20:40:21 geuzaine Exp $
// $Id: Mesh.cpp,v 1.42 2001-09-05 09:35:29 geuzaine Exp $
#include "Gmsh.h"
#include "GmshUI.h"
......@@ -551,27 +551,20 @@ void Draw_Simplex_Curves(void *a,void *b){
s = *(Simplex**)a;
if(!EntiteEstElleVisible (s->iEnt)) return;
Xc = 0.5 * (s->V[0]->Pos.X + s->V[1]->Pos.X);
Yc = 0.5 * (s->V[0]->Pos.Y + s->V[1]->Pos.Y);
Zc = 0.5 * (s->V[0]->Pos.Z + s->V[1]->Pos.Z);
/*
double X[2],Y[2],Z[2]
double X[2],Y[2],Z[2];
for (int i=0 ; i<2 ; i++) {
X[i] = Xc + CTX.mesh.explode * (s->V[i]->Pos.X - Xc);
Y[i] = Yc + CTX.mesh.explode * (s->V[i]->Pos.Y - Yc);
Z[i] = Zc + CTX.mesh.explode * (s->V[i]->Pos.Z - Zc);
}
if(CTX.mesh.lines){
glColor4ubv((GLubyte*)&CTX.color.mesh.line);
glBegin(GL_LINES);
glVertex3d(X[0], Y[0], Z[0]);
glVertex3d(X[1], Y[1], Z[1]);
glEnd();
}
*/
/*
if(CTX.mesh.points){
glColor4ubv((GLubyte*)&CTX.color.mesh.vertex);
glBegin(GL_POINTS);
......@@ -585,9 +578,21 @@ void Draw_Simplex_Curves(void *a,void *b){
glEnd();
}
}
*/
if(CTX.mesh.color_carousel)
ColorSwitch(iColor);
else
glColor4ubv((GLubyte*)&CTX.color.mesh.line);
if(CTX.mesh.lines){
glBegin(GL_LINES);
glVertex3d(X[0], Y[0], Z[0]);
glVertex3d(X[1], Y[1], Z[1]);
glEnd();
}
if(CTX.mesh.lines_num){
glColor4ubv((GLubyte*)&CTX.color.mesh.line);
sprintf(Num,"%d",s->Num);
glRasterPos3d(Xc + 3*CTX.pixel_equiv_x/CTX.s[0],
Yc + 3*CTX.pixel_equiv_x/CTX.s[1],
......
// $Id: Read_Mesh.cpp,v 1.29 2001-09-01 15:18:48 geuzaine Exp $
// $Id: Read_Mesh.cpp,v 1.30 2001-09-05 09:35:29 geuzaine Exp $
#include "Gmsh.h"
#include "Geo.h"
......@@ -188,11 +188,11 @@ void Read_Mesh_MSH (Mesh *M, FILE *File_GEO){
switch(Type){
case LGN1:
//simp = Create_Simplex(vertsp[0], vertsp[1], NULL , NULL);
//simp->Num = Num ;
//simp->iEnt = Elementary ;
//Tree_Insert(c->Simplexes, &simp) ;
//Tree_Insert(M->Simplexes, &simp) ;
simp = Create_Simplex(vertsp[0], vertsp[1], NULL , NULL);
simp->Num = Num ;
simp->iEnt = Elementary ;
Tree_Insert(c->Simplexes, &simp) ;
//NO!!! Tree_Insert(M->Simplexes, &simp) ;
break;
case TRI1:
simp = Create_Simplex(vertsp[0], vertsp[1], vertsp[2], NULL);
......
$Id: VERSIONS,v 1.67 2001-09-04 16:25:06 geuzaine Exp $
$Id: VERSIONS,v 1.68 2001-09-05 09:35:29 geuzaine Exp $
New in 1.26: Enhanced 2D anisotropic mesh generator (metric
intersections); fixed (yet another) bug in 3D initial mesh;
alternative syntax for built-in functions (for GetDP compatibility);
draw line elements;
New in 1.25: Fixed bug with mixed recombined/non-recombined extruded
meshes; Linux versions are now build with no optimization, due to bugs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment