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

fix calc of mid pt for tangent

parent d9c6ef4d
No related branches found
No related tags found
No related merge requests found
// $Id: Geom.cpp,v 1.153 2008-02-20 09:20:45 geuzaine Exp $ // $Id: Geom.cpp,v 1.154 2008-02-23 08:24:42 geuzaine Exp $
// //
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -168,7 +168,7 @@ class drawGEdge { ...@@ -168,7 +168,7 @@ class drawGEdge {
} }
if(CTX.geom.lines_num) { if(CTX.geom.lines_num) {
GPoint p = e->point(0.5 * (t_max - t_min)); GPoint p = e->point(t_min + 0.5 * (t_max - t_min));
char Num[100]; char Num[100];
sprintf(Num, "%d", e->tag()); sprintf(Num, "%d", e->tag());
double offset = (0.5 * CTX.geom.line_width + 0.3 * CTX.gl_fontsize) * double offset = (0.5 * CTX.geom.line_width + 0.3 * CTX.gl_fontsize) *
...@@ -180,7 +180,7 @@ class drawGEdge { ...@@ -180,7 +180,7 @@ class drawGEdge {
} }
if(CTX.geom.tangents) { if(CTX.geom.tangents) {
double t = 0.5 * (t_max - t_min); double t = t_min + 0.5 * (t_max - t_min);
GPoint p = e->point(t); GPoint p = e->point(t);
SVector3 der = e->firstDer(t); SVector3 der = e->firstDer(t);
der.normalize(); der.normalize();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment