Skip to content

Commit e74185b

Browse files
committed
Fix #696. Account for multiple coincident edges when looking for naked edges.
1 parent d8f5a8d commit e74185b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/mesh.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,9 +971,15 @@ void SKdNode::MakeCertainEdgesInto(SEdgeList *sel, EdgeKind how, bool coplanarIs
971971

972972
switch(how) {
973973
case EdgeKind::NAKED_OR_SELF_INTER:
974+
// there should be one anti-parllel edge
974975
if(info.count != 1) {
975-
sel->AddEdge(a, b, auxA);
976-
if(leaky) *leaky = true;
976+
// but there may be multiple parallel coincident edges
977+
SKdNode::EdgeOnInfo parallelInfo = {};
978+
FindEdgeOn(b, a, -cnt, coplanarIsInter, &parallelInfo);
979+
if (info.count != parallelInfo.count) {
980+
sel->AddEdge(a, b, auxA);
981+
if(leaky) *leaky = true;
982+
}
977983
}
978984
if(info.intersectsMesh) {
979985
sel->AddEdge(a, b, auxA);

0 commit comments

Comments
 (0)