diff --git a/Graphics/Graph2D.cpp b/Graphics/Graph2D.cpp index 20abe72d1585d37e0d5bc7a4d0bf52acca1c5177..3425c4b5d0b605c25220d9d48aa31df60d1ee51b 100644 --- a/Graphics/Graph2D.cpp +++ b/Graphics/Graph2D.cpp @@ -1,4 +1,4 @@ -// $Id: Graph2D.cpp,v 1.68 2007-09-14 18:51:37 geuzaine Exp $ +// $Id: Graph2D.cpp,v 1.69 2007-09-15 15:01:02 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -34,12 +34,12 @@ int Fix2DCoordinates(double *x, double *y) if(*x < 0) // measure from right border *x = CTX.viewport[2] + *x; else if(*x > 99999) // by convention, x-centered - *x = CTX.viewport[2]/2; + *x = CTX.viewport[2] / 2; if(*y < 0) // measure from bottom border *y = -(*y); else if(*y > 99999) // by convention, y-centered - *y = CTX.viewport[3]/2.; + *y = CTX.viewport[3] / 2.; else *y = CTX.viewport[3] - *y; return ret; diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp index 21a6d32b29c8229d1cc63d4496982cf3d8d0eb5b..de3a4c5c9519daabce03cf2f2e6d1a9fee89dd10 100644 --- a/Graphics/Post.cpp +++ b/Graphics/Post.cpp @@ -1,4 +1,4 @@ -// $Id: Post.cpp,v 1.131 2007-09-13 06:57:21 geuzaine Exp $ +// $Id: Post.cpp,v 1.132 2007-09-15 15:01:02 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -1339,11 +1339,13 @@ class drawPViewBoundingBox { if(!opt->Visible || opt->Type != PViewOptions::Plot3D) return; + SBoundingBox3d bb = data->getBoundingBox(); + if(bb.empty()) return; + glColor4ubv((GLubyte *) & CTX.color.fg); glLineWidth(CTX.line_width); gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor); - SBoundingBox3d bb = data->getBoundingBox(); Draw_Box(bb.min().x(), bb.min().y(), bb.min().z(), bb.max().x(), bb.max().y(), bb.max().z()); glColor3d(1., 0., 0.); diff --git a/Parser/OpenFile.cpp b/Parser/OpenFile.cpp index 2123c36d1d706643901d53e39deb90c93091db31..56cedb83b77547fbe0cb329dc53a38e53820cba1 100644 --- a/Parser/OpenFile.cpp +++ b/Parser/OpenFile.cpp @@ -1,4 +1,4 @@ -// $Id: OpenFile.cpp,v 1.161 2007-09-12 21:17:01 geuzaine Exp $ +// $Id: OpenFile.cpp,v 1.162 2007-09-15 15:01:03 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -151,9 +151,10 @@ void SetBoundingBox(void) if(bb.empty()) { for(unsigned int i = 0; i < PView::list.size(); i++) - bb += PView::list[i]->getData()->getBoundingBox(); + if(!PView::list[i]->getData()->getBoundingBox().empty()) + bb += PView::list[i]->getData()->getBoundingBox(); } - + if(bb.empty()){ bb += SPoint3(-1., -1., -1.); bb += SPoint3(1., 1., 1.); diff --git a/Plugin/MakeSimplex.cpp b/Plugin/MakeSimplex.cpp index fd48217f895539fd01056ee91c6b12f479b033fb..398a76d0d3e0b90f39b7ca02788215228c059a3e 100644 --- a/Plugin/MakeSimplex.cpp +++ b/Plugin/MakeSimplex.cpp @@ -1,4 +1,4 @@ -// $Id: MakeSimplex.cpp,v 1.3 2007-09-11 14:01:55 geuzaine Exp $ +// $Id: MakeSimplex.cpp,v 1.4 2007-09-15 15:01:03 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -146,6 +146,7 @@ PView *GMSH_MakeSimplexPlugin::execute(PView *v) decomposeList(data1, 5, 3, &data1->VY, &data1->NbVY, data1->VS, &data1->NbVS); decomposeList(data1, 5, 9, &data1->TY, &data1->NbTY, data1->TS, &data1->NbTS); + data1->finalize(); v1->setChanged(true); return v1; diff --git a/benchmarks/misc/test_displ.geo b/benchmarks/misc/test_displ.geo index 0ff49dbc3d2b2511174639e8976f6c266cffd5eb..1fcc185b01bec289b69cb5c7786f1265919ddec3 100644 --- a/benchmarks/misc/test_displ.geo +++ b/benchmarks/misc/test_displ.geo @@ -1,8 +1,10 @@ Include "test_field.pos"; Include "test_displ.pos"; -Plugin(DisplacementRaise).Factor = 1; -Plugin(DisplacementRaise).Run; +Plugin(Warp).iView = 0; +Plugin(Warp).dView = 1; +Plugin(Warp).Factor = 1; +Plugin(Warp).Run; View[0].ShowElement = 1; diff --git a/demos/isosurf.script b/demos/isosurf.script index 0894bb2a0f8af2b1194f7025b2b6f62fa64abc6e..ebe229333bb9a57bcfcd751c4265b4d0a016a4f9 100644 --- a/demos/isosurf.script +++ b/demos/isosurf.script @@ -15,8 +15,9 @@ Delete Empty Views; Combine Views; -Plugin(DecomposeInSimplex).iView = 0; -Plugin(DecomposeInSimplex).Run; + +Plugin(MakeSimplex).iView = 0; +Plugin(MakeSimplex).Run; View[0].ColormapAlpha = 0.6; View[0].SmoothNormals = 1;