modified before_insertion of Surface_mesher_manifold:

added in_complex test of facets and remove in_comples test of vertices
after_insertion of Surface_mesher_manifold :
use is_regular_or_boundary_for_vertices
This commit is contained in:
Mariette Yvinec 2006-03-09 09:54:29 +00:00
parent 99e8fd8b3a
commit 3a3e9b9a36
3 changed files with 34 additions and 31 deletions

View File

@ -1,3 +1,8 @@
Rendre paresseux la gestion de la liste des bad edges
dans Surface_mesher_manifold_edges
comme le traitement des bad vertices dans Surface_mesher_manifold
Laurent Rineau 2006/0227: Laurent Rineau 2006/0227:
(BEFORE THE CGAL-3.2 code freeze) (BEFORE THE CGAL-3.2 code freeze)
- Remove Complex_2_in_triangulation_3_surface_meshe.h (not finished) - Remove Complex_2_in_triangulation_3_surface_meshe.h (not finished)

View File

@ -222,7 +222,7 @@ protected:
// This function should be called only when incident edges // This function should be called only when incident edges
// are known to be REGULAR OR BOUNDARY // are known to be REGULAR OR BOUNDARY
bool is_regular_or_boundary_for_vertices(Vertex_handle v) const { bool is_regular_or_boundary_for_vertices(Vertex_handle v) {
int i,j; int i,j;
union_find_of_incident_facets(v,i,j); union_find_of_incident_facets(v,i,j);
return (j == 1); return (j == 1);

View File

@ -77,10 +77,10 @@ namespace CGAL {
Vertex_handle v = c->vertex(j); Vertex_handle v = c->vertex(j);
if(bad_vertices_initialized){ if(bad_vertices_initialized){
if ( SMREB::c2t3.is_in_complex(v) ) { // no need to test here //if ( SMREB::c2t3.is_in_complex(v) ) { // no need to test here
bad_vertices.erase(v); // il faut tester les bad_vertices.erase(v); // il faut tester les
// facets, avant // facets, avant
} //}
} }
} }
} }
@ -192,13 +192,9 @@ namespace CGAL {
for (typename Zone::Facets_iterator fit = for (typename Zone::Facets_iterator fit =
zone.boundary_facets.begin(); fit != zone.boundary_facets.begin(); fit !=
zone.boundary_facets.end(); ++fit) zone.boundary_facets.end(); ++fit)
handle_facet_on_boundary_of_conflict_zone (*fit); // @TODO: test if (SMREB::c2t3.is_in_complex(*fit)) {
// if *fit is handle_facet_on_boundary_of_conflict_zone (*fit);
// in complex, }
// before
// calling the
// handle function
SMREB::before_insertion_impl(Facet(), s, zone); SMREB::before_insertion_impl(Facet(), s, zone);
} }
@ -210,24 +206,26 @@ namespace CGAL {
Vertices vertices; Vertices vertices;
SMREB::tr.incident_vertices(v, std::back_inserter(vertices)); SMREB::tr.incident_vertices(v, std::back_inserter(vertices));
// is_regular_or_boundary_for_vertices
// is used here also incident edges are not known to be
// REGULAR which may cause some singular vertices to be forgotten
// This causes no problem because
// those SINGULAR incident SINGULAR edges are going to be handled
for (Vertices_iterator vit = vertices.begin(); for (Vertices_iterator vit = vertices.begin();
vit != vertices.end(); vit != vertices.end();
++vit) ++vit)
if ( SMREB::c2t3.is_in_complex(*vit) ) if ( SMREB::c2t3.is_in_complex(*vit) &&
// utiliser is_regular_of_boundary_for_vertices !SMREB::c2t3.is_regular_or_boundary_for_vertices(*vit)) {
if ( SMREB::c2t3.face_status(*vit) ==
SMREB::C2t3::SINGULAR ) {
bad_vertices.insert(*vit); bad_vertices.insert(*vit);
} }
if ( SMREB::c2t3.is_in_complex(v) ) { if ( SMREB::c2t3.is_in_complex(v) &&
if ( SMREB::c2t3.face_status(v) == // idem !SMREB::c2t3.is_regular_or_boundary_for_vertices(v)) {
SMREB::C2t3::SINGULAR ) {
bad_vertices.insert(v); bad_vertices.insert(v);
} }
} }
} }
}
std::string debug_info() const std::string debug_info() const
{ {