Reputation: 1
I'd want to use the CGAL Exact_predicates_exact_constructions_kernel with the 3D Convex Hulls function CGAL::halfspace_intersection_3 (CGAL Vers. 4.6.1), this is my simple test:
#include "CGAL/Exact_predicates_exact_constructions_kernel.h"
#include "CGAL/Convex_hull_3/dual/halfspace_intersection_3.h"
typedef CGAL::Exact_predicates_exact_constructions_kernel K;
typedef K::Plane_3 Plane;
typedef K::Point_3 Point;
typedef CGAL::Polyhedron_3<K> Polyhedron_3;
int main (void) {
std::list<Plane> planes;
Polyhedron_3 P;
CGAL::halfspace_intersection_3(planes.begin(),
planes.end(),
P,
boost::make_optional(Point(0, 0, 0)) );
return 0;
}
but I get this error on compilation:
In file included from /CGAL-4.6.1/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h:27:0,
from /test/halfspace_intersection_3.cpp:2:
/CGAL-4.6.1/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h: In instantiation of ‘class CGAL::Convex_hull_3::Convex_hull_filtered_traits_dual_3<CGAL::Epeck>’:
/CGAL-4.6.1/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h:266:15: required from ‘class CGAL::Convex_hull_3::Convex_hull_traits_dual_3<CGAL::Epeck, true>’
/CGAL-4.6.1/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h:259:32: required from ‘void CGAL::halfspace_intersection_3(PlaneIterator, PlaneIterator, Polyhedron&, const boost::optional<typename Polyhedron::Vertex::Point_3>&) [with PlaneIterator = std::_List_iterator<CGAL::Plane_3<CGAL::Epeck> >; Polyhedron = CGAL::Polyhedron_3<CGAL::Epeck>; typename Polyhedron::Vertex::Point_3 = CGAL::Point_3<CGAL::Epeck>]’
/test/halfspace_intersection_3.cpp:18:73: required from here
/CGAL-4.6.1/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h:193:21: error: no type named ‘Exact_kernel_rt’ in ‘class CGAL::Epeck’
Exact_traits;
^
/CGAL-4.6.1/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h:201:21: error: no type named ‘Exact_kernel_rt’ in ‘class CGAL::Epeck’
Converter_exact_dual;
^
/CGAL-4.6.1/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h:210:45: error: no type named ‘Exact_kernel_rt’ in ‘class CGAL::Epeck’
Converter_approx_dual > Equal_3;
^
/CGAL-4.6.1/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h:216:45: error: no type named ‘Exact_kernel_rt’ in ‘class CGAL::Epeck’
Converter_approx_dual > Collinear_3;
^
/CGAL-4.6.1/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h:222:45: error: no type named ‘Exact_kernel_rt’ in ‘class CGAL::Epeck’
Converter_approx_dual > Coplanar_3;
^
/CGAL-4.6.1/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h:228:45: error: no type named ‘Exact_kernel_rt’ in ‘class CGAL::Epeck’
Converter_approx_dual > Less_distance_to_point_3;
^
/CGAL-4.6.1/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h:234:45: error: no type named ‘Exact_kernel_rt’ in ‘class CGAL::Epeck’
Converter_approx_dual > Has_on_positive_side_3;
^
/CGAL-4.6.1/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h:240:45: error: no type named ‘Exact_kernel_rt’ in ‘class CGAL::Epeck’
Converter_approx_dual > Less_signed_distance_to_plane_3;
^
make[2]: *** [CMakeFiles/TestCGAL.dir/halfspace_intersection_3.cpp.o] Error 1
Is it possible to use the exact constructions kernel with 3D Convex Hulls CGAL::halfspace_intersection_3 ? Please could give me a clue about this? Thanks a lot
Upvotes: 0
Views: 139
Reputation: 6263
There is indeed a bug in this version of CGAL. The fix is in this commit.
Note that since you want to use a kernel with exact constructions, you better use CGAL::halfspace_intersection_with_constructions_3
which should be faster.
Upvotes: 2