From 14a26a93069fae2ba5031e7378ed5167872d0a7f Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sat, 21 Apr 2007 22:08:30 +0000
Subject: [PATCH] increase size of bbox for 2d algo (cf example)

---
 Mesh/meshGFace.cpp                |  7 ++++---
 benchmarks/2d/bounding_box_pb.geo | 12 ++++++++++++
 2 files changed, 16 insertions(+), 3 deletions(-)
 create mode 100644 benchmarks/2d/bounding_box_pb.geo

diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp
index d3db3beffb..1a10eac9d2 100644
--- a/Mesh/meshGFace.cpp
+++ b/Mesh/meshGFace.cpp
@@ -1,4 +1,4 @@
-// $Id: meshGFace.cpp,v 1.73 2007-04-16 09:08:28 remacle Exp $
+// $Id: meshGFace.cpp,v 1.74 2007-04-21 22:08:30 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -725,8 +725,9 @@ bool gmsh2DMeshGenerator ( GFace *gf , bool debug = true)
     }
 
 
-  /// Increase the size of the bounding box by 20 %
-  bbox *= 1.5;
+  /// Increase the size of the bounding box
+  bbox *= 2.5;
+
   /// add 4 points than encloses the domain
   /// Use negative number to distinguish thos fake vertices
   MVertex *bb[4];
diff --git a/benchmarks/2d/bounding_box_pb.geo b/benchmarks/2d/bounding_box_pb.geo
new file mode 100644
index 0000000000..63a70ad370
--- /dev/null
+++ b/benchmarks/2d/bounding_box_pb.geo
@@ -0,0 +1,12 @@
+
+// this is a simple example for which computing a bounding box with
+// bbox*=1.5 fails...
+
+Point (1) = {0,   0,   0, 1};
+Point (2) = {0.1, 0.1, 0, 1};
+Point (3) = {0.1, 0.2, 0, 1};
+Line (1) = {1, 2};
+Line (2) = {2, 3};
+Line (3) = {3, 1};
+Line Loop(1) = {1, 2, 3};
+Plane Surface(1) = {1};
-- 
GitLab