Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Precondition violation in Delaunay_triangulation_3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Precondition violation in Delaunay_triangulation_3


Chronological Thread 
  • From: Monique Teillaud <>
  • To:
  • Subject: Re: [cgal-discuss] Precondition violation in Delaunay_triangulation_3
  • Date: Fri, 30 Sep 2016 08:31:13 +0200

Hi,

If I am not mistaken, your code sample does not contain the definition of Cell_set. It is not defined by CGAL, is it?
Also, it is not clear to me how “conflicts" is constructed by your inserter.

Note that there is an example http://doc.cgal.org/latest/Triangulation_3/index.html#Triangulation_3FindingtheCellsinConflict that seems to do what you need. 

Best,
--
Monique Teillaud 
https://members.loria.fr/Monique.Teillaud/
INRIA Nancy - Grand Est, LORIA 
Institut National de Recherche en Informatique et Automatique 


I am getting an assert on insert_in_hole when inserting a point after removal in Delaunay_triangulation_3:
 
CGAL error: precondition violation!
_expression_: c->tds_data().is_in_conflict()
File: triangulation_data_structure_3.h
Line: 1478
 
The operation is as follows:
 
   Delaunay_triangulation_3<Kernel, Data> triangulation;
   Vertex_handle old_vertex = some_vertex();
   Point_3 new_point = some_point();
 
   triangulation.remove(old_vertex);
 
   int li = 0;
   int lj = 0;
   Delaunay_triangulation_3::Locate_type locate_type;
   Cell_handle cell = triangulation.locate(new_point, locate_type, li, lj);
 
   if (Tr::VERTEX == locate_type) return;
 
   Facet boundary;
   Cell_set conflicts;
   triangulation.find_conflicts(
      new_point,
      cell,
      CGAL::Oneset_iterator<Facet>(boundary),
      std::inserter(conflicts, conflicts.begin()));
 
   Vertex_handle new_vertex = triangulation.insert_in_hole(
      new_point,
      conflicts.begin(), conflicts.end(),
      boundary.first, boundary.second);
 
Not quite sure what I am doing wrong, any help is appreciated.




Archive powered by MHonArc 2.6.18.

Top of Page