Skip to content

Commit

Permalink
don't add obviously degenerate edge
Browse files Browse the repository at this point in the history
  • Loading branch information
rms80 committed May 20, 2018
1 parent 2244af3 commit 0822bf9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mesh_ops/MeshIsoCurves.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,11 @@ protected void compute_full(IEnumerable<int> Triangles, bool bIsFullMeshHint = f
int cross_vid = add_or_append_vertex(cross);
add_edge_pos(triVerts[i], triVerts[j], cross);

int graph_eid = Graph.AppendEdge(vert_vid, cross_vid, (int)TriangleCase.EdgeVertex);
if (graph_eid >= 0 && WantGraphEdgeInfo)
add_edge_vert(graph_eid, tid, triEdges[(z0+1)%3], triVerts[z0], new Index2i(vert_vid, cross_vid));
if (vert_vid != cross_vid) {
int graph_eid = Graph.AppendEdge(vert_vid, cross_vid, (int)TriangleCase.EdgeVertex);
if (graph_eid >= 0 && WantGraphEdgeInfo)
add_edge_vert(graph_eid, tid, triEdges[(z0 + 1) % 3], triVerts[z0], new Index2i(vert_vid, cross_vid));
} // else degenerate edge
}

} else {
Expand Down

0 comments on commit 0822bf9

Please sign in to comment.