mirror of https://github.com/CGAL/cgal
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:
parent
99e8fd8b3a
commit
3a3e9b9a36
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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,42 +192,40 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
void after_insertion_impl(const Vertex_handle v) {
|
void after_insertion_impl(const Vertex_handle v) {
|
||||||
SMREB::after_insertion_impl(v);
|
SMREB::after_insertion_impl(v);
|
||||||
|
|
||||||
if(bad_vertices_initialized){
|
if(bad_vertices_initialized){
|
||||||
// foreach v' in star of v
|
// foreach v' in star of v
|
||||||
Vertices vertices;
|
Vertices vertices;
|
||||||
SMREB::tr.incident_vertices(v, std::back_inserter(vertices));
|
SMREB::tr.incident_vertices(v, std::back_inserter(vertices));
|
||||||
|
|
||||||
for (Vertices_iterator vit = vertices.begin();
|
// is_regular_or_boundary_for_vertices
|
||||||
vit != vertices.end();
|
// is used here also incident edges are not known to be
|
||||||
++vit)
|
// REGULAR which may cause some singular vertices to be forgotten
|
||||||
if ( SMREB::c2t3.is_in_complex(*vit) )
|
// This causes no problem because
|
||||||
// utiliser is_regular_of_boundary_for_vertices
|
// those SINGULAR incident SINGULAR edges are going to be handled
|
||||||
if ( SMREB::c2t3.face_status(*vit) ==
|
for (Vertices_iterator vit = vertices.begin();
|
||||||
SMREB::C2t3::SINGULAR ) {
|
vit != vertices.end();
|
||||||
bad_vertices.insert(*vit);
|
++vit)
|
||||||
}
|
if ( SMREB::c2t3.is_in_complex(*vit) &&
|
||||||
|
!SMREB::c2t3.is_regular_or_boundary_for_vertices(*vit)) {
|
||||||
if ( SMREB::c2t3.is_in_complex(v) ) {
|
bad_vertices.insert(*vit);
|
||||||
if ( SMREB::c2t3.face_status(v) == // idem
|
|
||||||
SMREB::C2t3::SINGULAR ) {
|
|
||||||
bad_vertices.insert(v);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( SMREB::c2t3.is_in_complex(v) &&
|
||||||
|
!SMREB::c2t3.is_regular_or_boundary_for_vertices(v)) {
|
||||||
|
bad_vertices.insert(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string debug_info() const
|
std::string debug_info() const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue