From 0eef1c5c4bcd016c48d0d729ca54bae704eef980 Mon Sep 17 00:00:00 2001 From: nzfeng Date: Tue, 1 Jul 2025 13:35:20 -0400 Subject: [PATCH] Fix bug in signed fast marching when curve lies on a boundary edge --- src/surface/fast_marching_method.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/surface/fast_marching_method.cpp b/src/surface/fast_marching_method.cpp index 6c8de707..417e782a 100644 --- a/src/surface/fast_marching_method.cpp +++ b/src/surface/fast_marching_method.cpp @@ -93,7 +93,7 @@ VertexData FMMDistance(IntrinsicGeometryInterface& geometry, // These vertices might themselves lie on the curve, in which case we overwrite them below. Halfedge he = commonEdge.halfedge(); signs[he.next().tipVertex()] = (he.vertex() == pA.vertex) ? -1 : 1; - signs[he.twin().next().tipVertex()] = -signs[he.next().tipVertex()]; + if (!commonEdge.isBoundary()) signs[he.twin().next().tipVertex()] = -signs[he.next().tipVertex()]; } else { Face commonFace = sharedFace(pA, pB); if (commonFace == Face()) {