Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Problem building a delaunay triangulation

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Problem building a delaunay triangulation


Chronological Thread 
  • From: Ian Bentley <>
  • To:
  • Subject: Re: [cgal-discuss] Problem building a delaunay triangulation
  • Date: Mon, 15 Mar 2010 17:43:47 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=XwcziHQzevMKaRh/g7NcehwNWQq1e/PxspUtJZ8iAzp4Gl6gXvk2HuZjDBVK/+jCRA pU4AGqMR2ag/LAIHZ/ZjNooiFRb2pKPYcmP6WKS0/VWNVaRKtK/sNf0BM9+cvyKnOgLz hQAUp0UJy0FNvKanGE6wqvUv1N5MagapB6ENo=

Thanks for the help, but it doesn't really clarify for me. I am using the point type

CGAL::Point_2< CGAL::Cartesian<double > >

and CGAL/Exact_predicates_inexact_constructions_kernel.h

says that it uses:

"A typedef to a kernel which has the following properties:

  • It uses Cartesian representation.
  • It supports constructions of points from double Cartesian coordinates.
  • It provides exact geometric predicates, but inexact geometric constructions."
This indicates to me that I am using the right one... What am I doing wrong?

Thanks.

On Sat, Mar 13, 2010 at 4:15 AM, Michael Hemmer <> wrote:
Hi Ian,

seem that you have not chosen the right point type. Chose the one from the same Kernel that you use.

Michael


Ian Bentley wrote:
    Hello , new to CGAL, and struggling with some basic concepts.

I create a std::vector< CGAL::Point_2< CGAL::Cartesian<double> > and fill it with a series of points often generated at random, but sometimes specified.  Anyways, the exact location of these points is not particularly important, and as long as they are accurate to an epsilon of 0.001, Everything that I am concerned with will be fine.  This is why I chose Cartesian<double> for my kernel, and that seems to work just fine.

Later however, I was looking to use this vector to create a delaunay triangulation of these points.  Looking at the examples: http://www.cgal.org/Manual/last/doc_html/cgal_manual/Triangulation_2/Chapter_main.html there, I put together the following code:

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_2.h>

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;

void network::buildDelaunayTriangulation(){
       CGAL::Delaunay_triangulation_2<K> l_delaunayTriangulation;
       std::vector<point >::iterator it;
       for(it=m_locations.begin(); it < m_locations.end(); it++){
               l_delaunayTriangulation.insert((*it));
       }
}

where m_locations is the vector of points created earlier.

When I run this code however I receive the error:

model/network.cc:29: error: no matching function for call to ‘CGAL::Delaunay_triangulation_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >, CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >, CGAL::Triangulation_ds_vertex_base_2<void> >, CGAL::Triangulation_ds_face_base_2<void> > >::insert(CGAL::Point_2<CGAL::Cartesian<double> >&)’

With a series of suggestions.

I suspect this is because I use the Exact_predicates_inexact_constructions_kernel to build the delaunay, but I'm not sure.  How can I fix this code?

--
Ian Bentley
M.Sc. Student
Queen's University
Kingston, Ontario


--
Ian Bentley
M.Sc. Student
Queen's University
Kingston, Ontario


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




--
Ian Bentley
M.Sc. Student
Queen's University
Kingston, Ontario



Archive powered by MHonArc 2.6.16.

Top of Page