Subject: CGAL users discussion list
List archive
- From: Vincent Mora <>
- To:
- Subject: Re: [cgal-discuss] call of overloaded intersection is ambiguous
- Date: Thu, 11 Dec 2014 09:08:06 +0100
Patch works, thanks.
On 11/12/2014 08:24, Sebastien Loriot (GeometryFactory) wrote:
On 12/08/2014 10:12 AM, Vincent Mora wrote:
Hi all,Hi Vincent,
I need to use intersection( Triangle_3, Triangle_3 ) and union of
polygons from
Boolean_set_operations_2.h in the same piece of code.
Unfortunatelty this does not seem possible (see error below).
Is it expected ?
Could you try the following patch?
--- a/include/CGAL/Boolean_set_operations_2.h
+++ b/include/CGAL/Boolean_set_operations_2.h
@@ -32,6 +32,8 @@
#include <CGAL/Gps_traits_2.h>
#include <CGAL/iterator.h>
#include <CGAL/Boolean_set_operations_2/Bso_internal_functions.h>
+#include <CGAL/is_iterator.h>
+#include <boost/utility/enable_if.hpp>
namespace CGAL {
@@ -902,7 +904,10 @@ inline OutputIterator intersection (InputIterator begin, InputIterator end,
template <typename InputIterator, typename OutputIterator>
inline OutputIterator intersection (InputIterator begin, InputIterator end,
- OutputIterator oi, unsigned int k=5)
+ OutputIterator oi, unsigned int k=5,
+ typename boost::enable_if<
+ typename CGAL::is_iterator<InputIterator>
+ >::type* =0)
{
typename map_iterator_to_traits<InputIterator>::Traits tr;
return intersection(begin, end, oi, tr, k);
Thanks,
Sebastien.
Thanks,
V.
/usr/local/include/CGAL/Triangle_3_Triangle_3_intersection.h:62:64:
error: call of overloaded
‘intersection(CGAL::CartesianKernelFunctors::Construct_line_3<CGAL::Simple_cartesian<CGAL::Interval_nt<false>
> >::Line_3,
CGAL::CartesianKernelFunctors::Construct_line_3<CGAL::Simple_cartesian<CGAL::Interval_nt<false>
> >::Line_3, const CGAL::Simple_cartesian<CGAL::Interval_nt<false> >&)’
is ambiguous
Object obj= intersection(Line_3(p,q),Line_3(*prev,curr),k);
^
/usr/local/include/CGAL/Triangle_3_Triangle_3_intersection.h:62:64:
note: candidates are:
In file included from /usr/local/include/CGAL/intersection_3_1.h:427:0,
from /usr/local/include/CGAL/intersection_3.h:29,
from
/usr/local/include/CGAL/Kernel/function_objects.h:34,
from
/usr/local/include/CGAL/Cartesian/function_objects.h:28,
from
/usr/local/include/CGAL/Cartesian/Cartesian_base.h:68,
from /usr/local/include/CGAL/Simple_cartesian.h:28,
from
/usr/local/include/CGAL/Exact_predicates_exact_constructions_kernel.h:28,
from /home/vmo/SFCGAL/build/include/SFCGAL/Kernel.h:24,
from /home/vmo/SFCGAL/build/include/SFCGAL/numeric.h:29,
from
/home/vmo/SFCGAL/build/include/SFCGAL/Coordinate.h:31,
from /home/vmo/SFCGAL/build/include/SFCGAL/Point.h:24,
from
/home/vmo/SFCGAL/build/include/SFCGAL/LineString.h:31,
from /home/vmo/SFCGAL/build/include/SFCGAL/Polygon.h:32,
from
/home/vmo/SFCGAL/build/include/SFCGAL/algorithm/differencePrimitives.h:3,
from /home/vmo/SFCGAL/src/algorithm/union.cpp:21:
/usr/local/include/CGAL/Intersections_3/intersection_3_1_impl.h:200:1:
note: CGAL::Object CGAL::internal::intersection(const typename
K::Line_3&, const typename K::Line_3&, const K&) [with K =
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >; typename K::Line_3 =
CGAL::Line_3<CGAL::Simple_cartesian<CGAL::Interval_nt<false> > >]
intersection(const typename K::Line_3 &l1,
^
In file included from
/home/vmo/SFCGAL/build/include/SFCGAL/algorithm/differencePrimitives.h:7:0,
from /home/vmo/SFCGAL/src/algorithm/union.cpp:21:
/usr/local/include/CGAL/Boolean_set_operations_2.h:904:23: note:
OutputIterator CGAL::intersection(InputIterator, InputIterator,
OutputIterator, unsigned int) [with InputIterator =
CGAL::Line_3<CGAL::Simple_cartesian<CGAL::Interval_nt<false> > >;
OutputIterator = CGAL::Simple_cartesian<CGAL::Interval_nt<false> >]
inline OutputIterator intersection (InputIterator begin, InputIterator
end,
^
- [cgal-discuss] call of overloaded intersection is ambiguous, Vincent Mora, 12/08/2014
- Re: [cgal-discuss] call of overloaded intersection is ambiguous, Sebastien Loriot (GeometryFactory), 12/11/2014
- Re: [cgal-discuss] call of overloaded intersection is ambiguous, Vincent Mora, 12/11/2014
- Re: [cgal-discuss] call of overloaded intersection is ambiguous, Sebastien Loriot (GeometryFactory), 12/11/2014
Archive powered by MHonArc 2.6.18.