Skip to content

Commit e37a071

Browse files
geezmolycosgreyishsong
authored andcommitted
fix: change comparison function of EdgeRecord to ensure all edges are used when simplifying
1 parent 1a18b3c commit e37a071

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/geometry/meshedit.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ HalfedgeMesh::EdgeRecord::EdgeRecord(unordered_map<Vertex*, Matrix4f>& vertex_qu
3030

3131
bool operator<(const HalfedgeMesh::EdgeRecord& a, const HalfedgeMesh::EdgeRecord& b)
3232
{
33+
if (a.cost == b.cost) {
34+
// Sort by edge id if cost are the same
35+
return a.edge->id < b.edge->id;
36+
}
3337
return a.cost < b.cost;
3438
}
3539

0 commit comments

Comments
 (0)