Subject: CGAL users discussion list
List archive
- From: Efi Fogel <>
- To:
- Subject: Re: [cgal-discuss] [gdal-dev] how do I get the traits for Polygon_with_holes_2
- Date: Fri, 7 Nov 2014 11:23:53 +0200
Better define the traits before hand, and use it afterwards everywhere you need it; something like the following:
typedef CGAL::Arr_segment_traits_2<Kernel> Arr_segment_traits;
typedef CGAL::Gps_segment_traits_2<Kernel, Container, Arr_segment_traits> Traits_2;
Traits_2 traits;
Kernel& kernel = traits;typedef CGAL::Arr_segment_traits_2<Kernel> Arr_segment_traits;
typedef CGAL::Gps_segment_traits_2<Kernel, Container, Arr_segment_traits> Traits_2;
Traits_2 traits;
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
On Fri, Nov 7, 2014 at 11:10 AM, Sebastien Loriot (GeometryFactory) <> wrote:
On 11/07/2014 10:01 AM, Vincent Mora wrote:
On 07/11/2014 09:48, Sebastien Loriot (GeometryFactory) wrote:
On 11/07/2014 09:33 AM, Vincent Mora wrote:but does not: error: no type named ‘Polygon_with_holes_2’ in ‘class
Hi,The following should work:
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 ?
CGAL::Epeck’
CGAL::Polygon_with_holes_2<Kernel> poly;
Kernel k;
Sorry:
CGAL::Gps_segment_traits_2<Kernel> traits;
Sebastien.
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’
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] [gdal-dev] how do I get the traits for Polygon_with_holes_2, Vincent Mora, 11/07/2014
- Re: [cgal-discuss] [gdal-dev] how do I get the traits for Polygon_with_holes_2, Sebastien Loriot (GeometryFactory), 11/07/2014
- Re: [cgal-discuss] [gdal-dev] how do I get the traits for Polygon_with_holes_2, Vincent Mora, 11/07/2014
- Re: [cgal-discuss] [gdal-dev] how do I get the traits for Polygon_with_holes_2, Sebastien Loriot (GeometryFactory), 11/07/2014
- Re: [cgal-discuss] [gdal-dev] how do I get the traits for Polygon_with_holes_2, Vincent Mora, 11/07/2014
- Re: [cgal-discuss] [gdal-dev] how do I get the traits for Polygon_with_holes_2, Efi Fogel, 11/07/2014
- Re: [cgal-discuss] [gdal-dev] how do I get the traits for Polygon_with_holes_2, Sebastien Loriot (GeometryFactory), 11/07/2014
- Re: [cgal-discuss] [gdal-dev] how do I get the traits for Polygon_with_holes_2, Vincent Mora, 11/07/2014
- Re: [cgal-discuss] [gdal-dev] how do I get the traits for Polygon_with_holes_2, Sebastien Loriot (GeometryFactory), 11/07/2014
Archive powered by MHonArc 2.6.18.