Repository navigation
Port upstream CDT refinement and topology updates - #32
Merged
Merged
Conversation
Closed
Co-authored-by: MichaConrad <[email protected]>
Co-authored-by: MichaConrad <[email protected]>
Copilot
AI
changed the title
[WIP] Bulk update .NET repository with latest changes
Port upstream CDT refinement and topology updates
Oct 29, 2026
This was
linked to
issues
Oct 29, 2026
Contributor
SummarySummary
CoverageCDT.Core - 87.5%
|
There was a problem hiding this comment.
🟡 Changes recommended
Critical active issues remain in smallest-angle calculation, constrained-edge preservation during flips, and safe handling of caller-supplied removal sets, so correctness is not established.
3 open issues
What changed in this PR
This pull request ports upstream CDT refinement, topology, predicate, and licensing updates into CDT.NET.
Changes:
- Adds smallest-angle and largest-area refinement with encroached-edge handling, vertex budgets, and unrefined-case reporting.
- Adds collection/finalization workflows, winding verification, and constrained-edge robustness improvements.
- Adds adaptive predicate attribution, NuGet license packaging, documentation, and regression coverage.
This pull request requires changes.
| File | Description |
|---|---|
test/CDT.Tests/TriangulationTests.cs |
Tests winding validation and near-vertex constraint splitting. |
test/CDT.Tests/RefinementTests.cs |
Tests refinement criteria, budgets, hull handling, and failure reporting. |
test/CDT.Tests/PredicatesTests.cs |
Tests strict diametral-circle encroachment behavior. |
test/CDT.Tests/GroundTruthTests.cs |
Extends conforming topology validation with winding checks. |
test/CDT.Tests/expected/issue-142-double-hanging-edge__conforming_auto_ignore_auto.txt |
Updates expected topology output for revised conforming-edge behavior. |
src/CDT.Core/Types.cs |
Defines refinement criteria and unrefined-result counters. |
src/CDT.Core/Triangulation.Refinement.cs |
Implements triangle refinement and encroached-edge resolution. |
src/CDT.Core/Triangulation.cs |
Adds lifecycle APIs and constrained-topology robustness changes. |
src/CDT.Core/TopologyVerifier.cs |
Adds counter-clockwise winding verification. |
src/CDT.Core/Predicates/PredicatesAdaptive.cs |
Adds the adaptive diametral-circle predicate and attribution. |
src/CDT.Core/CdtUtils.cs |
Adds geometric helpers for refinement and encroachment detection. |
src/CDT.Core/CDT.Core.csproj |
Updates license metadata and packages both license files. |
README.md |
Documents refinement support and adaptive-predicate licensing. |
LICENSE-predicates.txt |
Adds the BSD 3-Clause license for adaptive predicates. |
Review effort: Lite
Comment on lines
+581
to
+585
| T sideA = Distance(a, b); | ||
| T sideB = Distance(b, c); | ||
| if (sideA > sideB) (sideA, sideB) = (sideB, sideA); | ||
| sideA = T.Max(sideA, Distance(a, c)); | ||
| T sine = (T.One + T.One) * Area(a, b, c) / sideA / sideB; |
Comment on lines
+883
to
+888
| var original1 = _pieceToOriginals.TryGetValue(e1, out var pieces1) && pieces1.Count > 0 | ||
| ? pieces1[0] | ||
| : e1; | ||
| var original2 = _pieceToOriginals.TryGetValue(e2, out var pieces2) && pieces2.Count > 0 | ||
| ? pieces2[0] | ||
| : e2; |
Comment on lines
+1573
to
+1575
| public void FinalizeTriangulation(IReadOnlySet<int> removedTriangles) | ||
| { | ||
| if (IsFinalized) throw new TriangulationFinalizedException(); |
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.

This update brings the applicable upstream changes into CDT.NET, including triangle refinement, conforming-edge robustness fixes, and third-party license attribution.