From 39a151e303b543d46e403c3dd5ff599553a0defb Mon Sep 17 00:00:00 2001 From: Jason Cantarella Date: Tue, 2 Jun 2026 10:37:53 -0400 Subject: [PATCH] SurfacePoint::inEdge: fix reversed tEdge for Vertex-typed points The Vertex-typed branch returned the reflected edge parameter (tEdge=1 for the tail vertex, 0 for the tip), contradicting SurfacePoint::interpolate's convention (tEdge=0 at edge.halfedge().tailVertex(), 1 at the tip). This drove an off-by-reflection placement in IntegerCoordinatesIntrinsicTriangulation::computeEdgeSplitData's shared-edge (normalCoordinates < 0) branch, so every insertVertex on a shared intrinsic edge landed at parameter (1-t) instead of t. Upstream report: https://github.com/nmwsharp/geometry-central/issues/245 --- include/geometrycentral/surface/surface_point.ipp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/geometrycentral/surface/surface_point.ipp b/include/geometrycentral/surface/surface_point.ipp index 3c4f0b0e..63a55c9c 100644 --- a/include/geometrycentral/surface/surface_point.ipp +++ b/include/geometrycentral/surface/surface_point.ipp @@ -151,9 +151,9 @@ inline SurfacePoint SurfacePoint::inEdge(Edge targetEdge) const { switch (type) { case SurfacePointType::Vertex: if (vertex == targetEdge.halfedge().tailVertex()) { - return SurfacePoint(targetEdge, 1); - } else if (vertex == targetEdge.halfedge().tipVertex()) { return SurfacePoint(targetEdge, 0); + } else if (vertex == targetEdge.halfedge().tipVertex()) { + return SurfacePoint(targetEdge, 1); } break; case SurfacePointType::Edge: