diff --git a/Common/VertexArray.cpp b/Common/VertexArray.cpp index 3c8b72f249513deb6b7373fddea63b8179316c4b..46b17c71f23de4077483c43497545afdfd9b7236 100644 --- a/Common/VertexArray.cpp +++ b/Common/VertexArray.cpp @@ -1,4 +1,4 @@ -// $Id: VertexArray.cpp,v 1.22 2007-08-27 23:33:48 geuzaine Exp $ +// $Id: VertexArray.cpp,v 1.23 2007-09-14 18:51:37 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -27,7 +27,7 @@ extern Context_T CTX; VertexArray::VertexArray(int numVerticesPerElement, int numElements) - : fill(0), _numVerticesPerElement(numVerticesPerElement) + : _numVerticesPerElement(numVerticesPerElement) { int nb = (numElements ? numElements : 1) * numVerticesPerElement; _vertices.reserve(nb * 3); @@ -192,4 +192,3 @@ void VertexArray::sort(double x, double y, double z) _normals = sortedNormals; _colors = sortedColors; } - diff --git a/Common/VertexArray.h b/Common/VertexArray.h index e99b87eb9159269bc25436841420702c5223c095..8d1e6772e98379f96dfca83d2cf2487733693fd9 100644 --- a/Common/VertexArray.h +++ b/Common/VertexArray.h @@ -52,8 +52,6 @@ class BarycenterLessThan{ }; class VertexArray{ - public: - int fill; // this must/will be removed private: int _numVerticesPerElement; std::vector<float> _vertices; diff --git a/Geo/Makefile b/Geo/Makefile index 7de66d24d7a039a60173f4f3833955b378c48c71..a3d360eea29898d6a0f77d8255fb3baf7c96e6da 100644 --- a/Geo/Makefile +++ b/Geo/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.163 2007-09-12 20:14:34 geuzaine Exp $ +# $Id: Makefile,v 1.164 2007-09-14 18:51:37 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -205,7 +205,8 @@ GModel.o: GModel.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ ../Post/ColorTable.h ../Geo/Geo.h ../Geo/gmshSurface.h \ ../DataStr/Tree.h ../DataStr/avl.h ../Geo/SPoint2.h \ ../Geo/ExtrudeParams.h ../Geo/GEdge.h ../Post/OctreePost.h \ - ../Common/Octree.h ../Common/OctreeInternals.h ../Mesh/BackgroundMesh.h + ../Common/Octree.h ../Common/OctreeInternals.h ../Mesh/BackgroundMesh.h \ + ../Common/Message.h GModelIO_Geo.o: GModelIO_Geo.cpp GModel.h GVertex.h GEntity.h Range.h \ SPoint3.h SBoundingBox3d.h ../Common/VertexArray.h ../Geo/SVector3.h \ ../Geo/SPoint3.h ../Common/GmshDefines.h MVertex.h GPoint.h SPoint2.h \ diff --git a/Graphics/Graph2D.cpp b/Graphics/Graph2D.cpp index 093e26001f2617fa7d38062aafd66fe863459f82..20abe72d1585d37e0d5bc7a4d0bf52acca1c5177 100644 --- a/Graphics/Graph2D.cpp +++ b/Graphics/Graph2D.cpp @@ -1,4 +1,4 @@ -// $Id: Graph2D.cpp,v 1.67 2007-09-12 05:08:12 geuzaine Exp $ +// $Id: Graph2D.cpp,v 1.68 2007-09-14 18:51:37 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -85,6 +85,8 @@ static bool getGraphData(PView *p, std::vector<double> &x, double &xmin, bool space = (opt->Type == PViewOptions::Plot2DSpace); + SPoint3 p0; + numy = 0; for(int i = 0; i < data->getNumElements(); i++){ int dim = data->getDimension(i); @@ -97,10 +99,16 @@ static bool getGraphData(PView *p, std::vector<double> &x, double &xmin, data->getNode(i, j, xyz[0], xyz[1], xyz[2]); for(int k = 0; k < numComp; k++) data->getValue(i, j, k, ts, val[k]); - double vx = ComputeScalarRep(3, xyz); double vy = ComputeScalarRep(numComp, val); if(space){ - x.push_back(vx); + // store offset to origin + distance to first point + if(x.empty()){ + p0 = SPoint3(xyz[0], xyz[1], xyz[2]); + x.push_back(ComputeScalarRep(3, xyz)); + } + else{ + x.push_back(x[0] + p0.distance(SPoint3(xyz[0], xyz[1], xyz[2]))); + } y[0].push_back(vy); } else{ diff --git a/Post/PView.cpp b/Post/PView.cpp index b6b5e4ba327a74586efc3e5b6475d68cf427e4b3..f02ef9bfb8e81bc3625881d0423c5dde06123c5a 100644 --- a/Post/PView.cpp +++ b/Post/PView.cpp @@ -1,4 +1,4 @@ -// $Id: PView.cpp,v 1.8 2007-09-10 04:47:08 geuzaine Exp $ +// $Id: PView.cpp,v 1.9 2007-09-14 18:51:37 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -301,13 +301,19 @@ void PView::combine(bool time, int how, bool remove) bool PView::write(std::string filename, int format, bool append) { + Msg(STATUS2, "Writing '%s'", filename.c_str()); + + bool ret; switch(format){ - case 0: return _data->writePOS(filename, false, false, append); // ASCII - case 1: return _data->writePOS(filename, true, false, append); // binary - case 2: return _data->writePOS(filename, false, true, append); // parsed - case 3: return _data->writeSTL(filename); - case 4: return _data->writeTXT(filename); - case 5: return _data->writeMSH(filename); - default: Msg(GERROR, "Unknown view format %d", format); return false; + case 0: ret = _data->writePOS(filename, false, false, append); break; // ASCII + case 1: ret = _data->writePOS(filename, true, false, append); break; // binary + case 2: ret = _data->writePOS(filename, false, true, append); break; // parsed + case 3: ret = _data->writeSTL(filename); break; + case 4: ret = _data->writeTXT(filename); break; + case 5: ret = _data->writeMSH(filename); break; + default: ret = false; Msg(GERROR, "Unknown view format %d", format); break; } + + Msg(STATUS2, "Wrote '%s'", filename.c_str()); + return ret; } diff --git a/doc/VERSIONS b/doc/VERSIONS index 448af73e7fe9b04e8ae2c0269bdbcaa4c2728681..d8043e88049c8fab58fbc6c768e8d71640c3582b 100644 --- a/doc/VERSIONS +++ b/doc/VERSIONS @@ -1,7 +1,7 @@ -$Id: VERSIONS,v 1.391 2007-09-10 04:47:09 geuzaine Exp $ +$Id: VERSIONS,v 1.392 2007-09-14 18:51:37 geuzaine Exp $ 2.1.0 (XX): new post-processing database; complete rewrite of -post-processing draing code; improved 2D mesh algorithms; fix for +post-processing drawing code; improved 2D mesh algorithms; fix for 'could not find extruded vertex' bug; 2.0.8 (Jul 13, 2007): unused vertices are not saved in mesh files