Skip to content
This repository was archived by the owner on Oct 19, 2026. It is now read-only.

Fix RobustPath half-width in OASIS output - #336

Merged
heitzmann merged 1 commit into
heitzmann:mainfrom
vera-rubin:fix/robustpath-oas-half-width
Oct 15, 2026
Merged

heitzmann merged 1 commit into
heitzmann:mainfrom
vera-rubin:fix/robustpath-oas-half-width

Conversation

@vera-rubin

Copy link
Copy Markdown

On main c5d1e434e60aaa2695f6a6f8d242255ea56240dd, exporting a constant-width RobustPath with simple_path=True to OASIS doubles its width. A width-2 straight path reads back as width 4, and KLayout reports 4000 DBU instead of 2000. FlexPath already stores and writes half-widths.

This change multiplies RobustPath's full width by 0.5 before quantizing the OASIS PATH half-width. The existing explicit-end extension comparisons then use the corrected half-width.

The added test_roundtrip_path_width_oas checks width-2 round trips for FlexPath and RobustPath. Recorded Linux x86_64/CPython 3.12.3 results show the RobustPath case failing before the fix and both cases passing afterward; the patched test suite reports 93 passed. Additional checks cover widths 0.8, 2 and 4 with flush, extended and explicit ends. Round ends still read back as flush for both classes.

Fixes #335

ChipLab ref: CLAB-2026-317

RobustPath::to_oas wrote the full path width into the PATH half-width
field, so simple RobustPaths doubled in width when exported to OASIS.

Fixes #335
@heitzmann
heitzmann merged commit eeec8e8 into heitzmann:main Oct 15, 2026
6 checks passed
@heitzmann

Copy link
Copy Markdown
Owner

Thanks @vera-rubin

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OASIS export writes full RobustPath width into the PATH half-width field

2 participants