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

if a curve is "discrete" but has no BDS representation, don't draw anything
in the geometry routine: we draw the elements in the mesh routine.
parent 153881ab
No related branches found
No related tags found
No related merge requests found
// $Id: Geom.cpp,v 1.85 2005-06-27 15:03:45 remacle Exp $ // $Id: Geom.cpp,v 1.86 2005-06-27 19:33:00 geuzaine Exp $
// //
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
// //
...@@ -151,12 +151,10 @@ void Draw_Curve(void *a, void *b) ...@@ -151,12 +151,10 @@ void Draw_Curve(void *a, void *b)
break; break;
} }
if(c->Typ == MSH_SEGM_DISCRETE && c->bds) { if(c->Typ == MSH_SEGM_DISCRETE && c->bds) {
BDS_GeomEntity *g = c->bds->get_geom ( c->Num,1); BDS_GeomEntity *g = c->bds->get_geom ( c->Num,1);
std::list<BDS_Edge*>::iterator it = g->e.begin(); std::list<BDS_Edge*>::iterator it = g->e.begin();
std::list<BDS_Edge*>::iterator ite = g->e.end(); std::list<BDS_Edge*>::iterator ite = g->e.end();
while (it!=ite) while (it!=ite){
{
BDS_Edge *e = (*it); BDS_Edge *e = (*it);
glBegin(GL_LINES); glBegin(GL_LINES);
glVertex3d(e->p1->X,e->p1->Y,e->p1->Z); glVertex3d(e->p1->X,e->p1->Y,e->p1->Z);
...@@ -165,6 +163,9 @@ void Draw_Curve(void *a, void *b) ...@@ -165,6 +163,9 @@ void Draw_Curve(void *a, void *b)
++it; ++it;
} }
} }
else if(c->Typ == MSH_SEGM_DISCRETE) {
// do nothing: we draw the elements in the mesh drawing routines
}
else { else {
if(CTX.geom.line_type >= 1) { if(CTX.geom.line_type >= 1) {
for(int i = 0; i < N - 1; i++) { for(int i = 0; i < N - 1; i++) {
...@@ -332,8 +333,7 @@ void Draw_Polygonal_Surface(Surface * s) ...@@ -332,8 +333,7 @@ void Draw_Polygonal_Surface(Surface * s)
BDS_GeomEntity *g = s->bds->get_geom ( s->Num,2); BDS_GeomEntity *g = s->bds->get_geom ( s->Num,2);
std::list<BDS_Triangle*>::iterator it = g->t.begin(); std::list<BDS_Triangle*>::iterator it = g->t.begin();
std::list<BDS_Triangle*>::iterator ite = g->t.end(); std::list<BDS_Triangle*>::iterator ite = g->t.end();
while (it!=ite) while (it!=ite) {
{
glBegin(GL_TRIANGLES); glBegin(GL_TRIANGLES);
BDS_Point *n[3]; BDS_Point *n[3];
BDS_Triangle *t = (*it); BDS_Triangle *t = (*it);
...@@ -618,7 +618,7 @@ void Draw_Surface(void *a, void *b) ...@@ -618,7 +618,7 @@ void Draw_Surface(void *a, void *b)
Draw_Polygonal_Surface(s); Draw_Polygonal_Surface(s);
} }
else if(s->Typ == MSH_SURF_DISCRETE){ else if(s->Typ == MSH_SURF_DISCRETE){
// do nothing // do nothing: we draw the elements in the mesh drawing routines
} }
else if(s->Typ == MSH_SURF_PLAN){ else if(s->Typ == MSH_SURF_PLAN){
Draw_Plane_Surface(s); Draw_Plane_Surface(s);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment