Skip to content

Normalize CurvilinearPolygon curve sense in constructor#201

Merged
gpeairs merged 3 commits intomainfrom
gp/normalize-csi
Apr 18, 2026
Merged

Normalize CurvilinearPolygon curve sense in constructor#201
gpeairs merged 3 commits intomainfrom
gp/normalize-csi

Conversation

@gpeairs
Copy link
Copy Markdown
Member

@gpeairs gpeairs commented Apr 13, 2026

CurvilinearPolygon stores a list of curves and their start indices. It allows "reversed-parameterized" curves, designated with a negative start index. It's tricky to make sure this is handled correctly absolutely everywhere. Now that reverse(::Segment) is defined for all continuous segments, we can just normalize curves in the constructor -- a negative index in the constructor reverses the corresponding segment and is replaced with a positive index.

This simplifies some code and fixes some latent bugs, which should make us more confident about using CurvilinearPolygon in other rendering pathways.

@gpeairs gpeairs requested a review from laylagi April 13, 2026 18:57
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@laylagi laylagi left a comment

Choose a reason for hiding this comment

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

LGTM - very nice improvement!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants