Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Problem with double in a Convex Hull

Subject: CGAL users discussion list

List archive

[cgal-discuss] Problem with double in a Convex Hull


Chronological Thread 
  • From: <>
  • To:
  • Subject: [cgal-discuss] Problem with double in a Convex Hull
  • Date: Thu, 12 Jun 2008 15:15:45 +0200 (CEST)

I'm having a problem when I want to create a convex hull from a vector of
points that I have no idea how to fix. When I use this code below, the program
enter on the function CGAL::convex_hull_3 and doesn't come out.

ifstream file("resources/geometry.txt");
vector<Point> points;
Field_number x, y, z;

if(file.is_open()){
while (!file.eof()) {
file >> x >> x >> y >> z;
Point point(x, y, z);
points.push_back(point);
}
}

CGAL::Object object;

CGAL::convex_hull_3(points.begin(), points.end(), object);

But, if I just cast the numbers read to int [ Point point((int)x, (int)y,
(int)z); ], the code works fine.

Does anybody know where I'm making the mistake?

Thank you all!



Archive powered by MHonArc 2.6.16.

Top of Page