Skip to Content.
Sympa Menu

cgal-discuss - Problem with Exact_predicates_exact_constructions_kernel

Subject: CGAL users discussion list

List archive

Problem with Exact_predicates_exact_constructions_kernel


Chronological Thread 
  • From:
  • To:
  • Subject: Problem with Exact_predicates_exact_constructions_kernel
  • Date: Wed, 5 Mar 2008 19:01:34 +0100

Hi, I'm having a problem with the exact_predicates_exact_construction_kernel.
The following program compiles fine as it is (inexact constructions), but
when I change the kernel with the exact constructions one I experience
problems: the code does compile but when I try to run the exe file I've got
an error saying that the system cannot load the program. Anybody has got any
hint?

Thanks

Angelo

#include "stdafx.h"
#include <CGAL/basic.h>
#include <list>

// standard includes
#include <iostream>
#include <fstream>
#include <cassert>
#include <stdio.h>
#include <string.h>

//CGAL includes

#include <CGAL/Triangulation_hierarchy_3.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Triangulation_3.h>

using namespace std;

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;

typedef CGAL::Triangulation_3<K> Triangulation;

typedef Triangulation::Cell_handle Cell_handle;
typedef Triangulation::Vertex_handle Vertex_handle;
typedef Triangulation::Locate_type Locate_type;
typedef Triangulation::Point Point;



void usage()
{
cerr << "med in.txt" << endl;
exit(1);
}


int main(int argc, char **argv)
{
if (argc < 2)
usage();

ifstream file;
file.open(argv[1]);

int n_points;

file >> n_points;

// Reading points from file

double *points = new double[3*n_points];
double *normals = new double[3*n_points];

for (int i=0;i<n_points;i++)
{
file >> points[3*i];
file >> points[3*i+1];
file >> points[3*i+2];
file >> normals[3*i];
file >> normals[3*i+1];
file >> normals[3*i+2];
}

std::list<Point> L; // Creating a list for the points of triangulation

//Populating the list

for (int i=0;i<n_points;i++)
{

L.push_front(Point(points[3*i],points[3*i+1],points[3*i+2]));
// pushing the points into the list

}

cout << L.size() << endl;

Triangulation T(L.begin(),L.end());

cout << "Number of vertices in triangulation: " <<
T.number_of_vertices() << endl;
cout << "Number of edges in triangulation: " << T.number_of_edges()
<< endl;

cout << "Fatto" << endl;

return 0;
}



  • Problem with Exact_predicates_exact_constructions_kernel, angelo . tardugno, 03/05/2008

Archive powered by MHonArc 2.6.16.

Top of Page