Improve triangulation robustness - #1212
Conversation
|
Thanks for this — differential check from the NetTopologySuite.Proofs side (mesh / Delaunay lane). Method
Vectors / generator: jts-1212-incircle-lane (table in Results (29 vectors)
Pins that should hit the DD path (oracle ZERO, Stage A UNCERTAIN): vertex-on-circumcircle (incl. your #1190 constrained triangle sites) and exact cocircular square diagonals. That is expected: Decisive non-zero pins (CERTAIN match): knife-edge ±, flip witness Your regression sites (sample)
The GEOS 955 subset is the useful illustration that Stage A alone is not enough:
A bare Bottom lineFilter shape looks right relative to an independent extracted in-circle kernel: CERTAIN doubles never disagreed with the oracle on this table, and the cases that must use DD (exact zeros + the 955 subset) are correctly marked UNCERTAIN. Happy to re-run if you add more quads to the test suite. (Affiliation: NetTopologySuite.Proofs — formal mesh/predicate companion, not a JTS committer review.) |
isInCircleRobustnow computes the in-circle determinant in doubles with a Shewchuk-style error bound: if the magnitude clears the bound, the sign is provably correct and returned at full speed; otherwise it falls back to the existingisInCircleDDNormalizedextended-precision evaluation.Vertex.isCCWnow usesOrientation.index.~12% slower on a 200k random-point triangulation.
Closes #20, #298, #310, #1190 (and therefore #1138), GEOS #1286, and supersedes PR #311.