Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] how create and clear

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] how create and clear


Chronological Thread 
  • From: Efi Fogel <>
  • To:
  • Subject: Re: [cgal-discuss] how create and clear
  • Date: Fri, 5 Jan 2018 09:52:13 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:hyTJ/RH+P5WSHDhnF2Ml+p1GYnF86YWxBRYc798ds5kLTJ79rsywAkXT6L1XgUPTWs2DsrQY07OQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmCexbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VDK/5KlpVRDokj8KODw38G/XhMJ+j79Vrgy9qBFk2YHYfJuYOeBicq/Bf94XQ3dKUMZLVyxGB4Oxd4QBD+QAPe1Fr4f9oFQOogW6BQKxA+7g1DFIhn743a093OQuDwXG0RcvH9ILqnvUrdH1OL0OXuCyyanF1DPOZO5V1zfl8IXEbAwtrPWWUb9zccfd01QjGgfbglmKtIDoPTGY2+IQuGaB9eVgT/igi2s/pgFxvDevwsAsh5HMho0Py1DE8Tx1wJ47JdGkUUJ7b8OoHZlSui2AOIt2RcQiQ25suCkk0LEJpZm7fC0SxJQmwR7QdeCHfpCW7h7/UOudOzR1iXJ/dL6igxu+71KsxvD+W8S2yFpKqzBKktjItnADzRzT7c2HR+Nj8Uev2DaP2QfT6u5aLkAwjqfbJJshzaQxlpoXq0jMAij2mEDugK+Makok4vSo6/jgYrj+upCcOJV7igXnPqszm8y/Gvg3MhUVX2iA4um8z73i/UjhQLpQlPE2k6/ZsIrbJcsBvKK5DRVVgc4f7EO0AD6ildgZhnIaN0lteRSdjoGvNUudDur/CKKSjVXkvjBkyvSOarDvA5vKIXXHuLjkdLd5rUVbzVxgnphk+5tIB+RZc7rIUUjruYmAAw==

On 5 January 2018 at 00:54, xoru <> wrote:
I have 2 polygons. outer and hole inside outer.
 
Polygon_2 outer ;
 
outer.push_back( Point(-1,-1) ) ;
outer.push_back( Point(0,-12) ) ;
outer.push_back( Point(1,-1) ) ;
outer.push_back( Point(12,0) ) ;
outer.push_back( Point(1,1) ) ;
outer.push_back( Point(0,12) ) ;
outer.push_back( Point(-1,1) ) ;
outer.push_back( Point(-12,0) ) ;
 
Polygon_2 hole ;
 
hole.push_back( Point(-1,0) ) ;
hole.push_back( Point(0,1 ) ) ;
hole.push_back( Point(1,0 ) ) ;
hole.push_back( Point(0,-1) ) ;
 
 
Polygon_with_holes poly( outer ) ;
 
poly.add_hole( hole ) ;
 
======
 
1. How I can create poly variable without initialization.
 Polygon_with_holes poly;

You cannot

and how add outer to poly?
is any poly.add_outer function?

Briefly looking at it, I think these functions can and should be added.
Until we do it, you have 2 options:
1. Construct a new polygon with holes when you need to add an outer boundary.
2. Introduce a new template that has these missing functions and refer to this new template of yours in Gps_segment_traits_2.h (you can simply replace the included file Polygon_with_holes_2.h with your newly introduced file.)
 
2. How I can clear all point from poly. all outer and all holes?
poly.clear() or similar?

Yes




Archive powered by MHonArc 2.6.18.

Top of Page