SurfacePoint::inEdge: fix reversed tEdge for Vertex-typed points#248
Open
designbynumbers wants to merge 1 commit into
Open
SurfacePoint::inEdge: fix reversed tEdge for Vertex-typed points#248designbynumbers wants to merge 1 commit into
designbynumbers wants to merge 1 commit into
Conversation
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: nmwsharp#245
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Minimal two-line fix for #245.
SurfacePoint::inEdgeon aVertex-typed point returns the reflected edgeparameter —
tEdge=1foredge.halfedge().tailVertex(),0for the tip —which contradicts the rest of
surface_point.ipp(interpolate, theSurfacePoint(Edge, double)ctor,nearestVertex), wheretEdge=0is the tailand
tEdge=1is the tip. Downstream this mis-places every shared-edgeinsertVertex(SurfacePoint(edge, t))at parameter(1 - t)instead oft,producing visible Steiner drift in an intrinsic-triangulation pipeline.
The fix swaps the two return values so the Vertex-typed branch matches the
documented convention.
Full writeup + single-triangle MWE: #245.
Note: I noticed the (unmerged)
int-tri-updatesbranch reworksinEdgemorebroadly — happy to defer to that approach if you'd rather pick it back up; this
is just the minimal correctness fix against current
master.Fixes #245.