Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re: Convex hull errors

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re: Convex hull errors


Chronological Thread 
  • From: johnzjq <>
  • To:
  • Subject: [cgal-discuss] Re: Convex hull errors
  • Date: Thu, 9 Dec 2010 21:00:40 -0800 (PST)


I convert the obj file to off file:
http://cgal-discuss.949826.n4.nabble.com/file/n3081403/1.off 1.off

Here is the code:
#include <CGAL/Cartesian.h>
#include <CGAL/Gmpq.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/IO/Polyhedron_iostream.h>
#include <fstream>
typedef CGAL::Cartesian<CGAL::Gmpq> kernal;
typedef CGAL::Polyhedron_3<kernal,My_items> Polyhedron_3;

int _tmain(int argc, _TCHAR* argv[])
{
//IO
std::ifstream iFile;
iFile.open("c:\\1.off");
if (!iFile.is_open())
{
std::cerr<<"Error opening file";
}
Polyhedron_3 P;
iFile >> P;
iFile.close();
//Convexhull
Polyhedron_3 ch_obj;
CGAL::convex_hull_3(P.points_begin(),P.points_end(),ch_obj);
}

--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Convex-hull-errors-tp3078363p3081403.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.16.

Top of Page