Subject: CGAL users discussion list
List archive
- From: Bernhard Kornberger <>
- To:
- Subject: Bug when using Delaunay_Triangulation_3
- Date: Fri, 10 Aug 2007 22:51:38 +0200
Here is a minimal example of a bug where I use exactly the
typedefs of one of the demo programs:
#include <istream>
#include <sstream>
#include <fstream>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Triangulation_hierarchy_3.h>
#include <CGAL/Triangulation_cell_base_with_circumcenter_3.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
// exact constructions (circumcenter computations) are needed in this
// demo, not only predicates
typedef CGAL::Exact_predicates_exact_constructions_kernel K;
typedef CGAL::Triangulation_vertex_base_3<K> Vb;
typedef CGAL::Triangulation_cell_base_with_circumcenter_3<K> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> TDS;
typedef CGAL::Delaunay_triangulation_3<K, TDS> Triangulation;
typedef Triangulation::Finite_cells_iterator TFinite_cells_iterator;
typedef Triangulation::Point Point;
using namespace std;
int main(int argc, char *argv[])
{
Triangulation T;
ifstream in("badPoints.txt");
vector<Point> surfacePoints;
const int BUFSIZE=1024;
char oneLine[BUFSIZE];
while(in.getline(oneLine,BUFSIZE))
{
string buf=string(oneLine);
istringstream buffer(buf.substr(0,buf.length()).c_str());
double x,y,z;
buffer>>x;
buffer>>y;
buffer>>z;
Point p(x,y,z);
T.insert(p);
cout<<p<<endl;
}
for(TFinite_cells_iterator c_it=T.finite_cells_begin();
c_it!=T.finite_cells_end();++c_it)
{
cout << "v=" <<T.dual(c_it)<<endl;
}
}
You can download the source code and the badPoints.txt-File
here: http://dist.ist.tugraz.at/mat2.tar.bz2
If it is started by the command "./mat" it inserts the points
from the badPoints.txt file into the traingulation. However,
when it comes to the computation of the dual voronoi vertices,
it outputs one time "nan nan nan".
...
v=72.4111 4.527 30.7071
v=nan nan nan
v=184950 26752.9 -71245.4
v=1.16208e+06 168117 -448105
v=1.29475e+06 187309 -499283
v=1.1143e+06 161204 -429666
...
g++ (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
CGAL 3.3
Best regards
Bernhard
- Bug when using Delaunay_Triangulation_3, Bernhard Kornberger, 08/10/2007
- Re: [cgal-discuss] Bug when using Delaunay_Triangulation_3, Camille Wormser, 08/11/2007
- Re: [cgal-discuss] Bug when using Delaunay_Triangulation_3 (solved), Bernhard Kornberger, 08/14/2007
- Re: [cgal-discuss] Bug when using Delaunay_Triangulation_3, Camille Wormser, 08/11/2007
Archive powered by MHonArc 2.6.16.