From 99aa5f83d87261c66d4aa2381a563e08fa053058 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Mon, 7 Aug 2006 22:02:30 +0000 Subject: [PATCH] *** empty log message *** --- Common/GmshDefines.h | 7 +++ Geo/Geo.h | 8 +-- Graphics/CreateFile.cpp | 4 +- Graphics/Draw.cpp | 13 ++-- Graphics/Entity.cpp | 3 +- Graphics/Graph2D.cpp | 3 +- Graphics/Iso.cpp | 4 +- Graphics/Makefile | 124 +++++++++++++-------------------------- Graphics/Mesh.cpp | 6 +- Graphics/Post.cpp | 4 +- Graphics/PostElement.cpp | 37 ++++-------- Graphics/Scale.cpp | 3 +- Mesh/Mesh.h | 2 +- 13 files changed, 77 insertions(+), 141 deletions(-) diff --git a/Common/GmshDefines.h b/Common/GmshDefines.h index 5caff558e1..c5b3ee7934 100644 --- a/Common/GmshDefines.h +++ b/Common/GmshDefines.h @@ -50,6 +50,13 @@ #define PYR2 14 #define PNT 15 +// Geometrical entities +#define ENT_NONE 0 +#define ENT_POINT 1 +#define ENT_LINE 2 +#define ENT_SURFACE 3 +#define ENT_VOLUME 4 + #define CONV_VALUE 0.8 #define VIS_GEOM (1<<0) diff --git a/Geo/Geo.h b/Geo/Geo.h index 26acf4d4a1..c79ee91b75 100644 --- a/Geo/Geo.h +++ b/Geo/Geo.h @@ -32,12 +32,6 @@ #define NMAX_SPLINE 100 -#define ENT_NONE 0 -#define ENT_POINT 1 -#define ENT_LINE 2 -#define ENT_SURFACE 3 -#define ENT_VOLUME 4 - #define MSH_TRSF_LINE 1 #define MSH_TRSF_SURFACE 2 #define MSH_TRSF_VOLUME 3 @@ -130,4 +124,6 @@ void extrude(List_T *list, char *fich, char *what, char *tx, char *ty, char *tz) void protude(List_T *list, char *fich, char *what, char *ax, char *ay, char *az, char *px, char *py, char *pz, char *angle); +void Print_Geo(char *c); + #endif diff --git a/Graphics/CreateFile.cpp b/Graphics/CreateFile.cpp index f36beddce0..3a3e619d4d 100644 --- a/Graphics/CreateFile.cpp +++ b/Graphics/CreateFile.cpp @@ -1,4 +1,4 @@ -// $Id: CreateFile.cpp,v 1.89 2006-08-07 21:04:05 geuzaine Exp $ +// $Id: CreateFile.cpp,v 1.90 2006-08-07 22:02:29 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -24,7 +24,7 @@ #include "OpenFile.h" #include "Context.h" #include "Options.h" -#include "Mesh.h" +#include "Geo.h" #include "GModel.h" #include "gl2ps.h" diff --git a/Graphics/Draw.cpp b/Graphics/Draw.cpp index a655a01acc..7efd1372d0 100644 --- a/Graphics/Draw.cpp +++ b/Graphics/Draw.cpp @@ -1,4 +1,4 @@ -// $Id: Draw.cpp,v 1.98 2006-08-04 14:28:02 geuzaine Exp $ +// $Id: Draw.cpp,v 1.99 2006-08-07 22:02:29 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -21,15 +21,13 @@ #include "Gmsh.h" #include "GmshUI.h" -#include "Geo.h" +#include "GmshDefines.h" #include "CAD.h" -#include "Mesh.h" #include "Draw.h" #include "Context.h" #include "Numeric.h" #include "GModel.h" -extern Mesh *THEM; extern Context_T CTX; extern GModel *GMODEL; @@ -37,11 +35,8 @@ extern GModel *GMODEL; int NeedPolygonOffset() { - if(THEM->status == 2 && - (CTX.mesh.surfaces_edges || CTX.geom.lines || CTX.geom.surfaces)) - return 1; - if(THEM->status == 3 && - (CTX.mesh.surfaces_edges || CTX.mesh.volumes_edges)) + // FIXME: this should be improved! + if(CTX.geom.lines || CTX.mesh.surfaces_edges || CTX.mesh.volumes_edges) return 1; for(int i = 0; i < List_Nbr(CTX.post.list); i++){ Post_View *v = *(Post_View**)List_Pointer(CTX.post.list, i); diff --git a/Graphics/Entity.cpp b/Graphics/Entity.cpp index 3bdc9dc761..8bdae0ba86 100644 --- a/Graphics/Entity.cpp +++ b/Graphics/Entity.cpp @@ -1,4 +1,4 @@ -// $Id: Entity.cpp,v 1.65 2006-07-14 13:31:08 geuzaine Exp $ +// $Id: Entity.cpp,v 1.66 2006-08-07 22:02:30 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -19,7 +19,6 @@ // // Please report all bugs and problems to <gmsh@geuz.org>. -#include "Mesh.h" #include "Gmsh.h" #include "GmshUI.h" #include "Numeric.h" diff --git a/Graphics/Graph2D.cpp b/Graphics/Graph2D.cpp index c5822774ba..0307f507a8 100644 --- a/Graphics/Graph2D.cpp +++ b/Graphics/Graph2D.cpp @@ -1,4 +1,4 @@ -// $Id: Graph2D.cpp,v 1.56 2006-01-06 00:34:24 geuzaine Exp $ +// $Id: Graph2D.cpp,v 1.57 2006-08-07 22:02:30 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -23,7 +23,6 @@ #include "GmshUI.h" #include "Context.h" #include "Numeric.h" -#include "Mesh.h" #include "Draw.h" #include "Views.h" #include "gl2ps.h" diff --git a/Graphics/Iso.cpp b/Graphics/Iso.cpp index d802e57efd..75c38d7cff 100644 --- a/Graphics/Iso.cpp +++ b/Graphics/Iso.cpp @@ -1,4 +1,4 @@ -// $Id: Iso.cpp,v 1.36 2006-01-14 16:24:54 geuzaine Exp $ +// $Id: Iso.cpp,v 1.37 2006-08-07 22:02:30 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -21,8 +21,6 @@ #include "Gmsh.h" #include "GmshUI.h" -#include "Geo.h" -#include "Mesh.h" #include "Draw.h" #include "Context.h" #include "Views.h" diff --git a/Graphics/Makefile b/Graphics/Makefile index cfdb4b01e3..c726d89661 100644 --- a/Graphics/Makefile +++ b/Graphics/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.88 2006-08-07 19:08:12 geuzaine Exp $ +# $Id: Makefile,v 1.89 2006-08-07 22:02:30 geuzaine Exp $ # # Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle # @@ -72,14 +72,14 @@ depend: # 1 "/Users/geuzaine/.gmsh/Graphics//" Draw.o: Draw.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ - ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h ../Geo/Geo.h \ - ../Geo/CAD.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h \ - ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Vertex.h ../Mesh/Element.h \ - ../Mesh/Face.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Edge.h \ - ../Mesh/Vertex.h ../Mesh/Simplex.h ../Geo/ExtrudeParams.h \ - ../Common/VertexArray.h ../Common/SmoothNormals.h ../Numeric/Numeric.h \ - ../Common/GmshDefines.h ../Mesh/Metric.h ../Mesh/Vertex.h \ - ../Mesh/Simplex.h ../Mesh/Mesh.h ../Mesh/Matrix.h \ + ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h \ + ../Common/GmshDefines.h ../Geo/CAD.h ../Mesh/Mesh.h ../Mesh/Vertex.h \ + ../Mesh/Element.h ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Vertex.h \ + ../Mesh/Element.h ../Mesh/Face.h ../Mesh/Vertex.h ../Mesh/Element.h \ + ../Mesh/Edge.h ../Mesh/Vertex.h ../Mesh/Simplex.h \ + ../Geo/ExtrudeParams.h ../Common/VertexArray.h \ + ../Common/SmoothNormals.h ../Numeric/Numeric.h ../Mesh/Metric.h \ + ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Mesh.h ../Mesh/Matrix.h \ ../Geo/ExtrudeParams.h Draw.h ../Common/Views.h ../Common/ColorTable.h \ ../Common/VertexArray.h ../Common/SmoothNormals.h \ ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/GmshMatrix.h \ @@ -129,57 +129,30 @@ Geom.o: Geom.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ Post.o: Post.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h \ - ../Numeric/Numeric.h ../Geo/Geo.h ../Mesh/Mesh.h ../Mesh/Vertex.h \ - ../Mesh/Element.h ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Vertex.h \ - ../Mesh/Element.h ../Mesh/Face.h ../Mesh/Vertex.h ../Mesh/Element.h \ - ../Mesh/Edge.h ../Mesh/Vertex.h ../Mesh/Simplex.h \ - ../Geo/ExtrudeParams.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Common/GmshDefines.h ../Mesh/Metric.h \ - ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Mesh.h ../Mesh/Matrix.h \ - Draw.h ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Common/GmshMatrix.h \ - ../Common/AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h \ - gl2ps.h + ../Numeric/Numeric.h Draw.h ../Common/Views.h ../Common/ColorTable.h \ + ../Common/VertexArray.h ../Common/SmoothNormals.h \ + ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/GmshMatrix.h \ + ../Common/Context.h gl2ps.h # 1 "/Users/geuzaine/.gmsh/Graphics//" PostElement.o: PostElement.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ - ../Common/GmshUI.h ../Geo/Geo.h ../Mesh/Mesh.h ../Mesh/Vertex.h \ - ../Mesh/Element.h ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Vertex.h \ - ../Mesh/Element.h ../Mesh/Face.h ../Mesh/Vertex.h ../Mesh/Element.h \ - ../Mesh/Edge.h ../Mesh/Vertex.h ../Mesh/Simplex.h \ - ../Geo/ExtrudeParams.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Numeric/Numeric.h ../Common/GmshDefines.h \ - ../Mesh/Metric.h ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Mesh.h \ - ../Mesh/Matrix.h Draw.h ../Common/Views.h ../Common/ColorTable.h \ - ../Common/VertexArray.h ../Common/SmoothNormals.h \ + ../Common/GmshUI.h Draw.h ../Common/Views.h ../Common/ColorTable.h \ + ../Common/VertexArray.h ../Common/SmoothNormals.h ../Numeric/Numeric.h \ ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/GmshMatrix.h \ Iso.h ../Common/Context.h # 1 "/Users/geuzaine/.gmsh/Graphics//" Iso.o: Iso.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ - ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h ../Geo/Geo.h \ - ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Vertex.h \ - ../Mesh/Simplex.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Face.h \ - ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Edge.h ../Mesh/Vertex.h \ - ../Mesh/Simplex.h ../Geo/ExtrudeParams.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Numeric/Numeric.h ../Common/GmshDefines.h \ - ../Mesh/Metric.h ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Mesh.h \ - ../Mesh/Matrix.h Draw.h ../Common/Views.h ../Common/ColorTable.h \ - ../Common/VertexArray.h ../Common/SmoothNormals.h \ - ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/GmshMatrix.h \ - ../Common/Context.h + ../DataStr/List.h ../DataStr/Tree.h ../Common/GmshUI.h Draw.h \ + ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \ + ../Common/SmoothNormals.h ../Numeric/Numeric.h ../Common/GmshMatrix.h \ + ../Common/AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h # 1 "/Users/geuzaine/.gmsh/Graphics//" -Entity.o: Entity.cpp ../Mesh/Mesh.h ../DataStr/List.h ../DataStr/Tree.h \ - ../DataStr/avl.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Vertex.h \ - ../Mesh/Simplex.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Face.h \ - ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Edge.h ../Mesh/Vertex.h \ - ../Mesh/Simplex.h ../Geo/ExtrudeParams.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Numeric/Numeric.h ../Common/GmshDefines.h \ - ../Mesh/Metric.h ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Mesh.h \ - ../Mesh/Matrix.h ../Common/Gmsh.h ../Common/Message.h \ - ../DataStr/Malloc.h ../DataStr/Tools.h ../DataStr/List.h \ - ../DataStr/Tree.h ../Common/GmshUI.h Draw.h ../Common/Views.h \ +Entity.o: Entity.cpp ../Common/Gmsh.h ../Common/Message.h \ + ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ + ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ + ../Common/GmshUI.h ../Numeric/Numeric.h Draw.h ../Common/Views.h \ ../Common/ColorTable.h ../Common/VertexArray.h \ ../Common/SmoothNormals.h ../Common/GmshMatrix.h \ ../Common/AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h \ @@ -195,14 +168,8 @@ ReadImg.o: ReadImg.cpp ReadImg.h ../Common/Gmsh.h ../Common/Message.h \ Scale.o: Scale.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ - ../Common/GmshUI.h ../Numeric/Numeric.h ../Mesh/Mesh.h ../Mesh/Vertex.h \ - ../Mesh/Element.h ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Vertex.h \ - ../Mesh/Element.h ../Mesh/Face.h ../Mesh/Vertex.h ../Mesh/Element.h \ - ../Mesh/Edge.h ../Mesh/Vertex.h ../Mesh/Simplex.h \ - ../Geo/ExtrudeParams.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Common/GmshDefines.h ../Mesh/Metric.h \ - ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Mesh.h ../Mesh/Matrix.h \ - Draw.h ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \ + ../Common/GmshUI.h ../Numeric/Numeric.h Draw.h ../Common/Views.h \ + ../Common/ColorTable.h ../Common/VertexArray.h \ ../Common/SmoothNormals.h ../Common/GmshMatrix.h \ ../Common/AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h \ gl2ps.h @@ -210,14 +177,8 @@ Scale.o: Scale.cpp ../Common/Gmsh.h ../Common/Message.h \ Graph2D.o: Graph2D.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ - ../Common/GmshUI.h ../Common/Context.h ../Numeric/Numeric.h \ - ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Vertex.h \ - ../Mesh/Simplex.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Face.h \ - ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Edge.h ../Mesh/Vertex.h \ - ../Mesh/Simplex.h ../Geo/ExtrudeParams.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Common/GmshDefines.h ../Mesh/Metric.h \ - ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Mesh.h ../Mesh/Matrix.h \ - Draw.h ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \ + ../Common/GmshUI.h ../Common/Context.h ../Numeric/Numeric.h Draw.h \ + ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \ ../Common/SmoothNormals.h ../Common/GmshMatrix.h \ ../Common/AdaptiveViews.h ../Common/GmshMatrix.h gl2ps.h # 1 "/Users/geuzaine/.gmsh/Graphics//" @@ -225,25 +186,20 @@ CreateFile.o: CreateFile.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ ../Common/GmshUI.h ../Parser/OpenFile.h ../Common/Context.h \ - ../Common/Options.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h \ - ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Vertex.h ../Mesh/Element.h \ - ../Mesh/Face.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Edge.h \ - ../Mesh/Vertex.h ../Mesh/Simplex.h ../Geo/ExtrudeParams.h \ - ../Common/VertexArray.h ../Common/SmoothNormals.h ../Numeric/Numeric.h \ - ../Common/GmshDefines.h ../Mesh/Metric.h ../Mesh/Vertex.h \ - ../Mesh/Simplex.h ../Mesh/Mesh.h ../Mesh/Matrix.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ + ../Common/Options.h ../Geo/Geo.h ../Geo/GModel.h ../Geo/GVertex.h \ + ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/MVertex.h \ - ../Geo/MVertex.h ../Geo/GPoint.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h ../Geo/GFace.h \ - ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/MElement.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/MElement.h ../Geo/SBoundingBox3d.h gl2ps.h gl2gif.h \ - PixelBuffer.h Draw.h ../Common/Views.h ../Common/ColorTable.h \ - ../Common/VertexArray.h ../Common/SmoothNormals.h \ - ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/GmshMatrix.h \ - gl2jpeg.h gl2png.h gl2ppm.h gl2yuv.h + ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/GPoint.h ../Geo/GEdge.h \ + ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h \ + ../Numeric/Numeric.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \ + ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ + ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/MElement.h \ + ../Geo/SBoundingBox3d.h gl2ps.h gl2gif.h PixelBuffer.h Draw.h \ + ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \ + ../Common/SmoothNormals.h ../Common/GmshMatrix.h \ + ../Common/AdaptiveViews.h ../Common/GmshMatrix.h gl2jpeg.h gl2png.h \ + gl2ppm.h gl2yuv.h # 1 "/Users/geuzaine/.gmsh/Graphics//" gl2ps.o: gl2ps.cpp gl2ps.h # 1 "/Users/geuzaine/.gmsh/Graphics//" diff --git a/Graphics/Mesh.cpp b/Graphics/Mesh.cpp index d0303b4182..1708eb12bc 100644 --- a/Graphics/Mesh.cpp +++ b/Graphics/Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: Mesh.cpp,v 1.155 2006-08-04 14:28:02 geuzaine Exp $ +// $Id: Mesh.cpp,v 1.156 2006-08-07 22:02:30 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -83,8 +83,8 @@ void Draw_Mesh() /* if(CTX.mesh.changed){ - if(THEM->normals) delete THEM->normals; - THEM->normals = new smooth_normals(CTX.mesh.angle_smooth_normals); + if(GMODEL->normals) delete GMODEL->normals; + GMODEL->normals = new smooth_normals(CTX.mesh.angle_smooth_normals); } */ diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp index 2675e4bd31..3691fa7b57 100644 --- a/Graphics/Post.cpp +++ b/Graphics/Post.cpp @@ -1,4 +1,4 @@ -// $Id: Post.cpp,v 1.106 2006-08-04 14:28:02 geuzaine Exp $ +// $Id: Post.cpp,v 1.107 2006-08-07 22:02:30 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -22,8 +22,6 @@ #include "Gmsh.h" #include "GmshUI.h" #include "Numeric.h" -#include "Geo.h" -#include "Mesh.h" #include "Draw.h" #include "Views.h" #include "Context.h" diff --git a/Graphics/PostElement.cpp b/Graphics/PostElement.cpp index ffc01cc246..cab2655ec5 100644 --- a/Graphics/PostElement.cpp +++ b/Graphics/PostElement.cpp @@ -1,4 +1,4 @@ -// $Id: PostElement.cpp,v 1.74 2006-07-14 13:31:08 geuzaine Exp $ +// $Id: PostElement.cpp,v 1.75 2006-08-07 22:02:30 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -25,16 +25,10 @@ #include "Gmsh.h" #include "GmshUI.h" -#include "Geo.h" -#include "Mesh.h" #include "Draw.h" #include "Iso.h" #include "Context.h" #include "Numeric.h" -#include <iostream> -#include <math.h> - -using namespace std; extern Context_T CTX; @@ -1270,22 +1264,18 @@ void Draw_TensorElement(int type, Post_View * View, int preproNormals, case POST_PYRAMID: nbnod = 5; break; } - /// By lack of any current better solution, tensors are displayed as - /// their Von Mises invariant (J2 invariant); this will simply call - /// the scalar function... - int ts = View->TimeStep; if(View->TensorType == DRAW_POST_VONMISES){ - View->TimeStep = 0; - - double V_VonMises[8]; - for(int i = 0; i < nbnod; i++){ - V_VonMises[i] = ComputeVonMises(V + 9*(i + nbnod * ts)); - } - Draw_ScalarElement(type, View, preproNormals, ValMin, ValMax, iX, iY, iZ, V_VonMises); - } - + + View->TimeStep = 0; + double V_VonMises[8]; + for(int i = 0; i < nbnod; i++) + V_VonMises[i] = ComputeVonMises(V + 9*(i + nbnod * ts)); + Draw_ScalarElement(type, View, preproNormals, ValMin, ValMax, + iX, iY, iZ, V_VonMises); + + } else if(View->TensorType == DRAW_POST_LMGC90 || View->TensorType == DRAW_POST_LMGC90_TYPE || View->TensorType == DRAW_POST_LMGC90_COORD || @@ -1297,9 +1287,7 @@ void Draw_TensorElement(int type, Post_View * View, int preproNormals, View->TensorType == DRAW_POST_LMGC90_DEPAV || View->TensorType == DRAW_POST_LMGC90_DEPNORM){ - //cout << View->TensorType << endl; - - static double zmin[3],zmax[3]; + static double zmin[3], zmax[3]; int it; double DEP[3]; // déplacement relatif cdf % a config de référence double CDG[3]; // coordonnées du centre de gravité au tps t0 @@ -1584,7 +1572,8 @@ void Draw_TensorElement(int type, Post_View * View, int preproNormals, glCallList((* View->DisplayListsOfGrains )[(int)V[6]]); glPopMatrix(); glDisable(GL_LIGHTING); - } + } + View->TimeStep = ts; } diff --git a/Graphics/Scale.cpp b/Graphics/Scale.cpp index 3b49eff6d5..4d28a4ef2a 100644 --- a/Graphics/Scale.cpp +++ b/Graphics/Scale.cpp @@ -1,4 +1,4 @@ -// $Id: Scale.cpp,v 1.62 2006-01-06 00:34:25 geuzaine Exp $ +// $Id: Scale.cpp,v 1.63 2006-08-07 22:02:30 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -22,7 +22,6 @@ #include "Gmsh.h" #include "GmshUI.h" #include "Numeric.h" -#include "Mesh.h" #include "Draw.h" #include "Context.h" #include "Views.h" diff --git a/Mesh/Mesh.h b/Mesh/Mesh.h index 4ae621d1e3..af1174ff6c 100644 --- a/Mesh/Mesh.h +++ b/Mesh/Mesh.h @@ -361,7 +361,7 @@ void mai3d(int Asked); void Init_Mesh0(); void Init_Mesh(); -void Print_Geo(char *c); + void GetStatistics(double s[50]); void GetDefaultMeshFileName(int Type, char *name); -- GitLab