Subject: CGAL users discussion list
List archive
- From: Zohar <>
- To:
- Subject: [cgal-discuss] Polyhedron flip_edge() crash
- Date: Wed, 20 Aug 2014 16:40:32 -0700 (PDT)
Hi,
I randomly flip edges in a mesh, and at some point it crashes.
I copied below the cgal source, and I mark (with a comment) the
CGAL_precondition which fails after the filp.
Halfedge_handle flip_edge( Halfedge_handle h) const {
// performs an edge flip. It returns h after
// rotating the edge h one vertex in the direction of the face
// orientation. Precondition: `h != Halfedge_handle()' and both
// incident faces of h are triangles.
CGAL_precondition( h != Halfedge_handle());
CGAL_precondition( h == h->next()->next()->next());
CGAL_precondition( h->opposite() ==
h->opposite()->next()->next()->next());
Halfedge_handle hprev = h->next()->next();
Halfedge_handle gprev = h->opposite()->next()->next();
remove_tip( hprev);
remove_tip( gprev);
set_face_halfedge( hprev);
set_face_halfedge( gprev);
set_vertex_halfedge( hprev);
set_vertex_halfedge( gprev);
set_face( hprev->next(), hprev->face());
set_face( gprev->next(), gprev->face());
hprev = hprev->next();
gprev = gprev->next();
insert_tip( h, gprev);
insert_tip( h->opposite(), hprev);
CGAL_postcondition( h == h->next()->next()->next());
CGAL_postcondition( h->opposite() ==
h->opposite()->next()->next()->next()); // *** Fails -
crash
return h;
}
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Polyhedron-flip-edge-crash-tp4659723.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Polyhedron flip_edge() crash, Zohar, 08/21/2014
- Re: [cgal-discuss] Polyhedron flip_edge() crash, Zohar, 08/21/2014
Archive powered by MHonArc 2.6.18.