Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Removing Sites from Delaunay Graph

Subject: CGAL users discussion list

List archive

[cgal-discuss] Removing Sites from Delaunay Graph


Chronological Thread 
  • From: <>
  • To:
  • Subject: [cgal-discuss] Removing Sites from Delaunay Graph
  • Date: Mon, 28 Dec 2009 13:55:58 +0100 (CET)

Hi.
I want to implement online removal of Sites for a Voronoi Diagram. So, since
it
is not directly supported, I tried doing this using its dual - a delaunay
graph.

But I get an error.

/*previous declarations*/

// typedefs for defining the adaptor
typedef CGAL::Exact_predicates_inexact_constructions_kernel
K;
typedef CGAL::Delaunay_triangulation_2<K>
DT;
typedef CGAL::Delaunay_triangulation_adaptation_traits_2<DT>
AT;
typedef CGAL::Delaunay_triangulation_caching_degeneracy_removal_policy_2<DT>
AP;
typedef CGAL::Voronoi_diagram_2<DT,AT,AP>
VD;

// typedef for the result type of the point location
typedef AT::Site_2 Site_2;
typedef AT::Point_2 Point_2;


/* This function call gives an error*/
void Vor_Map::set_pseudo_random() {
typedef DT Delaunay_graph;

int capacity = noPoints/noSites;
VD temp_vd = *vd;
Delaunay_graph dual_ = temp_vd.dual();

site_ext* s;//site_ext is a class derived from Site_2

//this call just gives me the closest site in the Voronoi diagram to
this point
s = (site_ext*)getSite(points[0].point, temp_vd);
cout << s->x() << ":" << s->y() << endl;
if ( s==NULL) cout<<"Errorr";
dual_.remove((Site_2*)s);
}



Error on the screen :

20:17
CGAL error: assertion violation!
Expr: n == NULL
File: /usr/include/CGAL/Compact_container.h
Line: 681
Explanation:
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: n == NULL
File: /usr/include/CGAL/Compact_container.h
Line: 681
Aborted


Thanks in advance.

Navneet.


  • [cgal-discuss] Removing Sites from Delaunay Graph, nav17kapur, 12/28/2009

Archive powered by MHonArc 2.6.16.

Top of Page