Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Problem with Convex Hull, again

Subject: CGAL users discussion list

List archive

[cgal-discuss] Problem with Convex Hull, again


Chronological Thread 
  • From: "Rafael Roberto" <>
  • To:
  • Subject: [cgal-discuss] Problem with Convex Hull, again
  • Date: Tue, 17 Jun 2008 09:27:24 -0300
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :x-google-sender-auth; b=YpzBj70DgtnDOt16lnRJS64En97TziFOtEuWV/MT16SInAbB4mZ8NeWtFLKYgnAYDZ d7KrCxtA1qG2W6H2MH8YTgeiBzRTAouS+5XnOq5r1OtXSrZa3tnVJtyqgVwPr/DUG1SK PLpTn115CMKEqnAYajxo/70sFYphcuEr39cF0=

Hello,

like I've said before, I'm making an application that takes a set of points and create a convex hull for those points. I had some problems with my code because I was using the Cartesian kernel, not the Exact_predicates_inexact_constructions_kernel, for treat double numbers. But now that I changed the kernel, when I call the convex_hull_3 function, the program makes an access  violation (Unhandled exception at 0x104817fd (msvcp80d.dll) in ConstrainedDelaunay.exe: 0xC0000005: Access violation writing location 0xcccccccc.)

I have no idea what this could be. Does any body have any clue where I'm wrong?

The code is the follow ---------------------------------------
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Convex_hull_traits_3.h>
#include <CGAL/convex_hull_3.h>
#include <iostream>
#include <fstream>
#include <vector>

typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef CGAL::Convex_hull_traits_3<Kernel>                  Traits;
typedef Traits::Polyhedron_3                                Polyhedron;

typedef Kernel::FT                                          Field_number;
typedef Kernel::Point_3                                     Point;

using namespace std;

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

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

    Polyhedron polyhedron;

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

    return 0;
}

-----------------------------------------------------------------------

Thank you all,
Rafael Roberto


Archive powered by MHonArc 2.6.16.

Top of Page