Skip to content

Commit

Permalink
rest of loop is busted if we actually have no edges
Browse files Browse the repository at this point in the history
  • Loading branch information
rms80 committed May 30, 2018
1 parent d63ebb6 commit 929fb18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mesh/DMesh3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1934,6 +1934,10 @@ public List<int> GetAllVertexGroups(int vID) {
public bool IsBowtieVertex(int vID)
{
if (vertices_refcount.isValid(vID)) {
int nEdges = vertex_edges.Count(vID);
if (nEdges == 0)
return false;

// find a boundary edge to start at
int start_eid = -1;
bool start_at_boundary = false;
Expand Down Expand Up @@ -1976,7 +1980,6 @@ public bool IsBowtieVertex(int vID)
}

// if we did not see all edges at vertex, we have a bowtie
int nEdges = vertex_edges.Count(vID);
int target_count = (start_at_boundary) ? nEdges - 1 : nEdges;
bool is_bowtie = (target_count != count);
return is_bowtie;
Expand Down

0 comments on commit 929fb18

Please sign in to comment.