mirror of https://github.com/CGAL/cgal
WIP: When we delete a face we have to transfer its isolated vertices
This commit is contained in:
parent
e7198a0d65
commit
965d4fd48d
|
|
@ -434,9 +434,10 @@ check_integrity_and_topological_planarity(bool faces) const
|
|||
/* check the source links of out edges and count isolated vertices */
|
||||
for (vit = vertices_begin() ; vit != vend; ++vit) {
|
||||
if ( is_isolated(vit) ) {
|
||||
if ( faces )
|
||||
CGAL_assertion_msg( vit->face() != Face_const_handle(),
|
||||
VI(vit).c_str());
|
||||
if (faces) {
|
||||
CGAL_assertion_msg(vit->face() != Face_const_handle(),
|
||||
VI(vit).c_str());
|
||||
}
|
||||
++iso_vert_num;
|
||||
} else {
|
||||
CGAL_assertion_msg( vit->halfedge() != Halfedge_const_handle(),
|
||||
|
|
|
|||
|
|
@ -626,8 +626,11 @@ avoid the simplification for edge pairs referenced by |e|.}*/
|
|||
for(v = this->vertices_begin(); v != vend; v=vn) { CGAL_NEF_TRACEN("at vertex "<<PV(v));
|
||||
vn=v; ++vn;
|
||||
if ( is_isolated(v) ) {
|
||||
if ( mark(v) == mark(face(v)) ) delete_vertex_only(v);
|
||||
else set_isolated_vertex(face(v),v);
|
||||
if (mark(v) == mark(face(v))) {
|
||||
delete_vertex_only(v);
|
||||
} else {
|
||||
set_isolated_vertex(face(v), v);
|
||||
}
|
||||
} else { // v not isolated
|
||||
Halfedge_handle e2 = first_out_edge(v), e1 = previous(e2);
|
||||
Point p1 = point(source(e1)), p2 = point(v),
|
||||
|
|
@ -643,7 +646,14 @@ avoid the simplification for edge pairs referenced by |e|.}*/
|
|||
for (f = this->faces_begin(); f != fend; f=fn) {
|
||||
fn=f; ++fn;
|
||||
Union_find_handle pit = Pitem[f];
|
||||
if ( unify_faces.find(pit) != pit ) delete_face(f);
|
||||
if (unify_faces.find(pit) != pit) {
|
||||
Union_find_handle root = unify_faces.find(pit);
|
||||
for(Isolated_vertex_iterator ivi = isolated_vertices_begin(f); ivi != isolated_vertices_end(f); ++ivi){
|
||||
v->set_face(*root);
|
||||
link_as_isolated_vertex(*root,v);
|
||||
}
|
||||
delete_face(f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue