Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] [gdal-dev] how do I get the traits for Polygon_with_holes_2

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] [gdal-dev] how do I get the traits for Polygon_with_holes_2


Chronological Thread 
  • From: Vincent Mora <>
  • To:
  • Subject: Re: [cgal-discuss] [gdal-dev] how do I get the traits for Polygon_with_holes_2
  • Date: Fri, 07 Nov 2014 10:01:45 +0100

On 07/11/2014 09:48, Sebastien Loriot (GeometryFactory) wrote:
On 11/07/2014 09:33 AM, Vincent Mora wrote:
Hi,

I need to call are_holes_and_boundary_pairwise_disjoint(pwh, traits) to
check an instance pwh of CGAL::Polygon_with_holes_2<Kernel>.

I can't figure out how to obtain the traits parameter. Can someone tell
me ?
The following should work:

but does not: error: no type named ‘Polygon_with_holes_2’ in ‘class CGAL::Epeck’


CGAL::Polygon_with_holes_2<Kernel> poly;
Kernel k;
are_holes_and_boundary_pairwise_disjoint(poly, k);


The complete error:

/home/vmo/SFCGAL/src/algorithm/difference.cpp: In function ‘OutputIteratorType SFCGAL::algorithm::difference(const CGAL::Polygon_with_holes_2<CGAL::Epeck>&, const SFCGAL::detail::PrimitiveHandle<2>&, OutputIteratorType)’:
/home/vmo/SFCGAL/src/algorithm/difference.cpp:196:69: error: no matching function for call to ‘are_holes_and_boundary_pairwise_disjoint(const CGAL::Polygon_with_holes_2<CGAL::Epeck>&, SFCGAL::Kernel&)’
if ( are_holes_and_boundary_pairwise_disjoint( primitive, k ) &&
^
/home/vmo/SFCGAL/src/algorithm/difference.cpp:196:69: note: candidate is:
In file included from /usr/local/include/CGAL/Gps_segment_traits_2.h:29:0,
from /usr/local/include/CGAL/Boolean_set_operations_2.h:28,
from /home/vmo/SFCGAL/src/algorithm/difference.cpp:30:
/usr/local/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h:599:6: note: template<class Traits_2> bool CGAL::are_holes_and_boundary_pairwise_disjoint(const typename Traits_2::Polygon_with_holes_2&, Traits_2&)
bool are_holes_and_boundary_pairwise_disjoint
^
/usr/local/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h:599:6: note: template argument deduction/substitution failed:
/usr/local/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h: In substitution of ‘template<class Traits_2> bool CGAL::are_holes_and_boundary_pairwise_disjoint(const typename Traits_2::Polygon_with_holes_2&, Traits_2&) [with Traits_2 = CGAL::Epeck]’:
/home/vmo/SFCGAL/src/algorithm/difference.cpp:196:69: required from here
/usr/local/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h:599:6: error: no type named ‘Polygon_with_holes_2’ in ‘class CGAL::Epeck’






Archive powered by MHonArc 2.6.18.

Top of Page