Subject: CGAL users discussion list
List archive
- From: Winnie Hellmann <>
- To:
- Subject: Re: [cgal-discuss] Duplicate points in Arrangment
- Date: Sun, 05 Feb 2012 15:49:36 +0100
> In an arrangement you cannot have more than one feature with the same
> geometric embeddings. For example, a given point is associated with at most
> one vertex.
Well, that's what I thought. But for the following code...
std::cout << arrangement.number_of_vertices() << std::endl;
arrangement.insert_in_face_interior(CGAL::Point_2<Kernel>(1, 10),
arrangement.unbounded_face());
std::cout << arrangement.number_of_vertices() << std::endl;
arrangement.insert_in_face_interior(CGAL::Point_2<Kernel>(1, 10),
arrangement.unbounded_face());
std::cout << arrangement.number_of_vertices() << std::endl;
... I get 0, 1, and 2 as output. So there seem to be two vertices at (1,
10). Is this a bug?
I tested the code with following definitions:
#include <CGAL/Arr_linear_traits_2.h>
#include <CGAL/Arrangement_2.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Gmpq.h>
struct FaceData
{
...
};
typedef CGAL::Gmpq Number;
typedef CGAL::Cartesian<Number> Kernel;
typedef CGAL::Arr_linear_traits_2<Kernel> Traits_2;
typedef CGAL::Arr_face_extended_dcel<Traits_2, FaceData> Dcel;
typedef CGAL::Arrangement_2<Traits_2, Dcel> Arrangement_2;
Arrangement_2 arrangement;
> Using an Observer you can intercept all attempts to insert a point or a
> curve into an arrangement that has already a feature (i.e., a vertex or an
> edge) associated with the point or curve.
That was my question: How do I find out that there is already a vertex
with the same coordinates? (without checking all the vertices)
--
PGP key: http://www.winniehell.de/0xA8FE4F09.pub.asc
Attachment:
signature.asc
Description: OpenPGP digital signature
- [cgal-discuss] Duplicate points in Arrangment, Winnie Hellmann, 02/04/2012
- Re: [cgal-discuss] Duplicate points in Arrangment, Juan Carlos Lopez Alfonso, 02/04/2012
- Re: [cgal-discuss] Duplicate points in Arrangment, Winnie Hellmann, 02/05/2012
- Re: [cgal-discuss] Duplicate points in Arrangment, Winnie Hellmann, 02/05/2012
- Re: [cgal-discuss] Duplicate points in Arrangment, Winnie Hellmann, 02/05/2012
- Re: [cgal-discuss] Duplicate points in Arrangment, Efi Fogel, 02/04/2012
- Re: [cgal-discuss] Duplicate points in Arrangment, Winnie Hellmann, 02/05/2012
- Re: [cgal-discuss] Duplicate points in Arrangment, Efi Fogel, 02/05/2012
- Re: [cgal-discuss] Duplicate points in Arrangment, Winnie Hellmann, 02/05/2012
- Re: [cgal-discuss] Duplicate points in Arrangment, Efi Fogel, 02/05/2012
- Re: [cgal-discuss] Duplicate points in Arrangment, Winnie Hellmann, 02/05/2012
- [cgal-discuss] Re: Duplicate points in Arrangment, Winnie Hellmann, 02/06/2012
- Re: [cgal-discuss] Duplicate points in Arrangment, Juan Carlos Lopez Alfonso, 02/04/2012
Archive powered by MHonArc 2.6.16.