diff --git a/Geo/MQuadrangle.h b/Geo/MQuadrangle.h index cc0daf183f7cfbfd07a5ab1f1cafaab6eb66dec8..d3c8e28b7b51c65f93126e39cca4442d9aa94a8b 100644 --- a/Geo/MQuadrangle.h +++ b/Geo/MQuadrangle.h @@ -283,10 +283,9 @@ class MQuadrangle9 : public MQuadrangle { virtual void getEdgeRep(int num, double *x, double *y, double *z, SVector3 *n); virtual void getEdgeVertices(const int num, std::vector<MVertex*> &v) const { -// v.resize(3); - MQuadrangle::getEdgeVertices(num, v); - v.push_back(_vs[num]); -// v[2] = _vs[num]; + v.resize(3); + MQuadrangle::_getEdgeVertices(num, v); + v[2] = _vs[num]; } virtual int getNumFacesRep(); virtual void getFaceRep(int num, double *x, double *y, double *z, SVector3 *n); diff --git a/Graphics/drawMesh.cpp b/Graphics/drawMesh.cpp index 04477181ec47ddd2dc871a76000aee0df332dfab..42d545003c86dcb2256a3bd4b5765e59d08ce270 100644 --- a/Graphics/drawMesh.cpp +++ b/Graphics/drawMesh.cpp @@ -258,7 +258,12 @@ static void drawVertexLabel(drawContext *ctx, GEntity *e, MVertex *v, glColor4ubv((GLubyte *) & CTX::instance()->color.mesh.vertexSup); else glColor4ubv((GLubyte *) & CTX::instance()->color.mesh.vertex); - glRasterPos3d(v->x(), v->y(), v->z()); + + double offset = (0.5 * CTX::instance()->mesh.pointSize + + 0.3 * CTX::instance()->glFontSize) * ctx->pixel_equiv_x; + glRasterPos3d(v->x() + offset / ctx->s[0], + v->y() + offset / ctx->s[1], + v->z() + offset / ctx->s[2]); ctx->drawString(str); }