Skip to content

Use tolerance-based discretization for CurvilinearPolygon curves#195

Merged
gpeairs merged 1 commit intomainfrom
lgh/curvilinear-atol
Apr 1, 2026
Merged

Use tolerance-based discretization for CurvilinearPolygon curves#195
gpeairs merged 1 commit intomainfrom
lgh/curvilinear-atol

Conversation

@laylagi
Copy link
Copy Markdown
Contributor

@laylagi laylagi commented Mar 31, 2026

Mentioned in #47. Replaces hardcoded 181-point uniform sampling with discretize_curve/discretization_grid, which adapts point density to curvature and the atol parameter.

@laylagi laylagi requested a review from gpeairs March 31, 2026 15:48
@laylagi laylagi added the enhancement New feature or request label Mar 31, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Member

@gpeairs gpeairs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! Confirmed that this reduces point counts in practical cases with only slivers of difference.

In another PR we have an is_sliver test utility to check whether differences are within tolerance or not (heuristic 2*area/perimeter < atol). The tests here are fine as they are, but that will be available in the future.

@gpeairs gpeairs merged commit 5cd31a7 into main Apr 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants