Bad hack to r5Cobustify the algorithm. Need work.

This commit is contained in:
Laurent Rineau 2007-06-12 14:11:57 +00:00
parent 4c12071ab5
commit 41a045b9be
2 changed files with 27 additions and 5 deletions

View File

@ -32,6 +32,7 @@
#include <list> #include <list>
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <boost/format.hpp>
#include <CGAL/Surface_mesher/Verbose_flag.h> #include <CGAL/Surface_mesher/Verbose_flag.h>
#include <CGAL/Surface_mesher/Types_generators.h> #include <CGAL/Surface_mesher/Types_generators.h>
@ -198,7 +199,9 @@ namespace CGAL {
// deletes the next element from the set of elements to refine // deletes the next element from the set of elements to refine
// NB: it is useless here, since the update of the restricted // NB: it is useless here, since the update of the restricted
// Delaunay triangulation automatically deletes the next element // Delaunay triangulation automatically deletes the next element
void pop_next_element_impl() {} void pop_next_element_impl() {
facets_to_refine.pop_front();
}
// From the element to refine, gets the point to insert // From the element to refine, gets the point to insert
Point refinement_point_impl(const Facet& f) const Point refinement_point_impl(const Facet& f) const
@ -225,11 +228,18 @@ namespace CGAL {
} }
// Useless here // Useless here
Mesher_level_conflict_status private_test_point_conflict_impl(const Point&, Mesher_level_conflict_status private_test_point_conflict_impl(const Point& p,
Zone&) Zone& )
{
Vertex_handle v;
if( tr.is_vertex(p, v) )
{ {
return NO_CONFLICT; std::cerr << boost::format("Error: (%1%) is already inserted\n") % p;
return CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED;
} }
else
return NO_CONFLICT;
}
// Useless here // Useless here
void after_no_insertion_impl(const Facet&, const Point&, const Zone&) void after_no_insertion_impl(const Facet&, const Point&, const Zone&)

View File

@ -364,7 +364,6 @@ namespace Surface_mesher {
typename details::Surface_mesher_edges_base_types<C2T3>::Default_container typename details::Surface_mesher_edges_base_types<C2T3>::Default_container
> >
class Surface_mesher_edges_level_base : class Surface_mesher_edges_level_base :
public No_private_test_point_conflict,
public No_after_no_insertion, public No_after_no_insertion,
public No_before_conflicts, public No_before_conflicts,
public Triangulation_mesher_level_traits_3<typename C2T3::Triangulation>, public Triangulation_mesher_level_traits_3<typename C2T3::Triangulation>,
@ -518,6 +517,19 @@ namespace Surface_mesher {
return refinement_point_cache; return refinement_point_cache;
} }
Mesher_level_conflict_status private_test_point_conflict_impl(const Point_3& p,
Zone& )
{
Vertex_handle v;
if( tr.is_vertex(p, v) )
{
std::cerr << boost::format("Error: (%1%) is already inserted\n") % p;
return CONFLICT_AND_ELEMENT_SHOULD_BE_DROPPED;
}
else
return NO_CONFLICT;
}
Zone conflicts_zone_impl(const Point_3& p, Zone conflicts_zone_impl(const Point_3& p,
const Edge& e) const const Edge& e) const
{ {