Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OASIS reader doesn't update geometry-w/geometry-h to the bounding box of CTRAPEZOIDs #266

Closed
rocallahan opened this issue Jul 30, 2024 · 5 comments

Comments

@rocallahan
Copy link

I don't have the actual spec at hand but the draft spec says:

29.7 Each successive CTRAPEZOID record updates all ctrapezoid-related modal variables with the following
exception: for the forms where only one of width or height is used (types 16-23 and 25), modal variables geometry-w or geometry-h are both updated to match the specified dimension.

As far as I can tell, the code does not do this. This can result in subtle errors in the geometry of shapes following certain CTRAPEZOIDs in the file.

@rocallahan
Copy link
Author

It's not 100% clear in this draft spec whether "the specified dimension" means the value of geometry-w/geometry-h that's used to size the CTRAPEZOID, or the actual bounding box size of the CTRAPEZOID, but KLayout interprets it as the bounding box size.

heitzmann added a commit that referenced this issue Aug 9, 2024
Signed-off-by: Lucas Heitzmann Gabrielli <heitzmann@gmail.com>
@heitzmann
Copy link
Owner

Thanks for the report! You're right, we're missing a few modal variable updates for specific CTRAPEZOID types. I've added a fix in 64083fd. If you have an example where you see the error, would you mind double checking to make sure it works, @rocallahan ?

@rocallahan
Copy link
Author

I can't test it right now, but FWIW your code differs from KLayout's interpretation and I don't know who's right. E.g. for CTRAPEZOID types where the width of the bounding box is 2 x geometry-w, KLayout updates geometry-w to twice its incoming width, but your code doesn't.

@heitzmann
Copy link
Owner

The changes I've added do the update to the modal dimensions in the cases when they were missing using the bounding box. Isn't that what KLayout also does?

@rocallahan
Copy link
Author

Yes, I think you're right, sorry about that.

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

No branches or pull requests

2 participants