diff --git a/Fltk/Opengl_Window.cpp b/Fltk/Opengl_Window.cpp index f46af1fd3a282e8911f3e8b04ac40132e36a249a..4bcd1a027febfd37f34e9616c36f8a0f5ab14ce1 100644 --- a/Fltk/Opengl_Window.cpp +++ b/Fltk/Opengl_Window.cpp @@ -1,4 +1,4 @@ -// $Id: Opengl_Window.cpp,v 1.77 2006-11-27 22:22:10 geuzaine Exp $ +// $Id: Opengl_Window.cpp,v 1.78 2006-12-17 22:23:16 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -287,6 +287,7 @@ int Opengl_Window::handle(int event) CTX.s[0] *= ((dy > 0) ? fact : 1./fact); CTX.s[1] = CTX.s[0]; CTX.s[2] = CTX.s[0]; + prev.recenter(); redraw(); } WID->update_manip_window(); diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index f465a6164e2c2dc8df6de925b617db2671707449..9ea6da85471a4969e2671b40aaff4279add25200 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -1,4 +1,4 @@ -// $Id: GModel.cpp,v 1.25 2006-12-12 18:16:41 geuzaine Exp $ +// $Id: GModel.cpp,v 1.26 2006-12-17 22:23:17 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -298,10 +298,10 @@ void GModel::deleteMeshPartitions() double GModel::getMeshSize () { - if (meshSize < 0) - { - SBoundingBox3d b = bounds(); - return 0.1 * norm( SVector3 ( b.max() , b.min() ) ); - } - else return meshSize; + if(meshSize < 0){ + SBoundingBox3d b = bounds(); + return 0.1 * norm(SVector3(b.max(), b.min())); + } + else + return meshSize; } diff --git a/Geo/GModel.h b/Geo/GModel.h index 11fb1b3e0cfd55746478a29d585b3bf20e24bb2a..3a9faa67e0ddbd16c255e4a5dcaf581c17cc36fa 100644 --- a/Geo/GModel.h +++ b/Geo/GModel.h @@ -32,12 +32,15 @@ // OCC Internals have to be stored in the model class OCC_Internals; + // A geometric model. The model is a "not yet" non-manifold B-Rep. class GModel { + private: void deleteOCCInternals(); OCC_Internals *occ_internals; double meshSize; + protected: std::string modelName; std::set<GRegion*, GEntityLessThan> regions; @@ -46,10 +49,11 @@ class GModel std::set<GVertex*, GEntityLessThan> vertices; std::set<int> meshPartitions; std::map<int, std::string> physicalNames; + public: GModel() : modelName("Untitled"), normals(0), meshSize(-1.) {} GModel(const std::string &name) : modelName(name), normals(0), meshSize(-1.) {} - virtual ~GModel(){ deleteOCCInternals();destroy(); } + virtual ~GModel(){ deleteOCCInternals(); destroy(); } typedef std::set<GRegion*, GEntityLessThan>::iterator riter; typedef std::set<GFace*, GEntityLessThan>::iterator fiter;