Skip to content

Fix rendering of zero-length paths and empty polygons - #270

Merged
gpeairs merged 2 commits into
mainfrom
gp/issue-269
Jul 27, 2026
Merged

Fix rendering of zero-length paths and empty polygons#270
gpeairs merged 2 commits into
mainfrom
gp/issue-269

Conversation

@gpeairs

@gpeairs gpeairs commented Jul 24, 2026

Copy link
Copy Markdown
Member

Zero-length path nodes and compound subsegments are now ignored during rendering instead of triggering the coincident-endpoint check meant to detect closed segments. Loops removed by NoRender styling expand to Polgyon{T}[] rather than an empty polygon, which can't be written to GDS and breaks some operations. Closes #269.

gpeairs added 2 commits July 24, 2026 12:11
A zero-length turn has coincident endpoints, which tripped the
closed-segment check meant for full turns when the node was rendered
individually (GDS node rendering, compound subsegment expansion) rather
than through the path-level filter. Zero-length continuous-style nodes
carry no geometry: expand them to nothing at the pathtopolys node entry
point and skip zero-length subsegments in the compound style-pinning
loop. As a side effect, zero-length pieces left around overlay
terminations no longer emit degenerate zero-area polygons.

Fixes #269
@gpeairs
gpeairs requested a review from laylagi July 24, 2026 11:00
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@laylagi laylagi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the fix, LGTM!

@gpeairs
gpeairs merged commit 4bdd11a into main Jul 27, 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.

Zero-length turn triggers closed segment check

2 participants