Commit a79eab05 authored by Isaak Lim's avatar Isaak Lim
Browse files

added a check to is_collapse_ok in TriConnectivity if the edge is already deleted or not.

moved the equivalent check in PolyConnectivity to the top of the is_collapse_ok function.

closes #681

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@582 fdac6126-5c0c-442c-9429-916003d36597
parent 0340ccf0
......@@ -284,6 +284,12 @@ PolyConnectivity::add_face(const VertexHandle* _vertex_handles, size_t _vhs_size
//-----------------------------------------------------------------------------
bool PolyConnectivity::is_collapse_ok(HalfedgeHandle v0v1)
{
//is edge already deleteed?
if (status(edge_handle(v0v1)).deleted())
{
return false;
}
HalfedgeHandle v1v0(opposite_halfedge_handle(v0v1));
VertexHandle v0(to_vertex_handle(v1v0));
VertexHandle v1(to_vertex_handle(v0v1));
......@@ -304,12 +310,6 @@ bool PolyConnectivity::is_collapse_ok(HalfedgeHandle v0v1)
VertexHandle v_10_p = from_vertex_handle(prev_halfedge_handle(v1v0));
VertexHandle v_10_n = to_vertex_handle(next_halfedge_handle(v1v0));
//is edge already deleteed?
if (status(edge_handle(v0v1)).deleted())
{
return false;
}
//are the vertices already deleted ?
if (status(v0).deleted() || status(v1).deleted())
{
......
......@@ -84,6 +84,10 @@ TriConnectivity::add_face(const VertexHandle* _vertex_handles, size_t _vhs_size)
//-----------------------------------------------------------------------------
bool TriConnectivity::is_collapse_ok(HalfedgeHandle v0v1)
{
// is the edge already deleted?
if ( status(edge_handle(v0v1)).deleted() )
return false;
HalfedgeHandle v1v0(opposite_halfedge_handle(v0v1));
VertexHandle v0(to_vertex_handle(v1v0));
VertexHandle v1(to_vertex_handle(v0v1));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment