Skip to content

Commit 002ea9c

Browse files
authored
Fix bug in signed fast marching when curve lies on a boundary edge (#220)
1 parent 5144d8e commit 002ea9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/surface/fast_marching_method.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ VertexData<double> FMMDistance(IntrinsicGeometryInterface& geometry,
9393
// These vertices might themselves lie on the curve, in which case we overwrite them below.
9494
Halfedge he = commonEdge.halfedge();
9595
signs[he.next().tipVertex()] = (he.vertex() == pA.vertex) ? -1 : 1;
96-
signs[he.twin().next().tipVertex()] = -signs[he.next().tipVertex()];
96+
if (!commonEdge.isBoundary()) signs[he.twin().next().tipVertex()] = -signs[he.next().tipVertex()];
9797
} else {
9898
Face commonFace = sharedFace(pA, pB);
9999
if (commonFace == Face()) {

0 commit comments

Comments
 (0)