Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Problem with triangulate_polyhedron

Subject: CGAL users discussion list

List archive

[cgal-discuss] Problem with triangulate_polyhedron


Chronological Thread 
  • From: Hamed Ghasemieh <>
  • To:
  • Subject: [cgal-discuss] Problem with triangulate_polyhedron
  • Date: Tue, 22 Apr 2014 12:05:24 +0200

Hi, 
I am trying to use the undocumented function CGAL::triangulate_polyhedron. But I am receiving lots of error with it. here is my simple code: 

#include <CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h>
#include <CGAL/point_generators_3.h>
#include <CGAL/algorithm.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/convex_hull_3.h>

#include <CGAL/triangulate_polyhedron.h>

#include <vector>
typedef CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt K;
typedef CGAL::Polyhedron_3<K> Polyhedron_3;
typedef K::Segment_3 Segment_3;
// define point creator
typedef K::Point_3 Point_3;
typedef CGAL::Creator_uniform_3<double, Point_3> PointCreator;



int main() {
CGAL::Random_points_in_sphere_3<Point_3, PointCreator> gen(100.0);
// generate 250 points randomly on a sphere of radius 100.0
// and copy them to a vector
std::vector<Point_3> points;
CGAL::cpp11::copy_n(gen, 250, std::back_inserter(points));
// define polyhedron to hold convex hull
Polyhedron_3 poly;

// compute convex hull of non-colinear points
CGAL::convex_hull_3(points.begin(), points.end(), poly);

CGAL::triangulate_polyhedron<Polyhedron_3>(poly);

return 0;
}

and here are the errors. 

/home/hamed/workspace/CGALtest/include/CGAL/Triangulation_2_filtered_projection_traits_3.h:38:36: error: no type named ‘Exact_kernel’ in ‘CGAL::Triangulation_2_filtered_projection_traits_3<CGAL::Simple_cartesian<CORE::Expr> >::K {aka struct CGAL::Simple_cartesian<CORE::Expr>}’
   typedef typename K::Exact_kernel Exact_kernel;
                                    ^
/home/hamed/workspace/CGALtest/include/CGAL/Triangulation_2_filtered_projection_traits_3.h:39:42: error: no type named ‘Approximate_kernel’ in ‘CGAL::Triangulation_2_filtered_projection_traits_3<CGAL::Simple_cartesian<CORE::Expr> >::K {aka struct CGAL::Simple_cartesian<CORE::Expr>}’
   typedef typename K::Approximate_kernel Approximate_kernel;
                                          ^
/home/hamed/workspace/CGALtest/include/CGAL/Triangulation_2_filtered_projection_traits_3.h:40:27: error: no type named ‘C2E’ in ‘CGAL::Triangulation_2_filtered_projection_traits_3<CGAL::Simple_cartesian<CORE::Expr> >::K {aka struct CGAL::Simple_cartesian<CORE::Expr>}’
   typedef typename K::C2E C2E;
 
... and a lot more  like above ....


plus this: 

/usr/include/c++/4.8/cmath:494:5: note:   template argument deduction/substitution failed:
...
/usr/include/c++/4.8/cmath:494:5: error: no type named ‘__type’ in ‘struct __gnu_cxx::__enable_if<false, double>’
In file included from /home/hamed/workspace/CGALtest/include/CGAL/triangulate_polyhedron.h:32:0,


any help would be appreciated!

Bests,
Hamed



Archive powered by MHonArc 2.6.18.

Top of Page