fix(cpgrid): reject out-of-segment crossing nodes#59
Open
tomerarnon wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
Here is a minimal reproducer for the crossing-node issue using using GeoEnergyIO
import GeoEnergyIO.CornerPointGrid: find_crossing_node
x1 = [517.2413793103449, 827.5862068965517, 832.5650700477282]
x2 = [517.2413793103449, 775.8620689655172, 843.7944466341665]
x3 = [517.2413793103449, 827.5862068965517, 833.565070047728]
x4 = [517.2413793103449, 775.8620689655172, 844.7944461223784]
pt = find_crossing_node(x1, x2, x3, x4)
println(pt)The four points define two finite CPG edge segments. Their local envelope is: Package output before this change: That point is far outside the finite segment envelope. The corresponding segment parameter is: Package output with this PR: Visual summary: |
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.
Summary
This changes corner-point grid crossing-node construction to treat line intersections as bounded segment intersections.
Previously,
find_crossing_nodeused the intersection of the infinite lines defined by two CPG face edges. For nearly parallel or strongly skewed edges, that can produce an extra node far outside the local grid geometry. The new logic:Tests