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

KLayout doesn't like the OASIS output for this, but the GDSII file seems to be accepted. #247

Open
philstopford opened this issue Apr 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@philstopford
Copy link

def test():
    lib = gdstk.Library("Library")
    cell = lib.new_cell("Base")
    pol = gdstk.rectangle((0, 0), (1, 1))
    pol.repetition = gdstk.Repetition(x_offsets=(1, 3, -2))
    cell.add(pol)
    lib.write_gds("rectangle_rep.gds")
    lib.write_oas("rectangle_rep.oas")

test()

KLayout reports a coordinate value overflow (position=51, cell=#0) for the OASIS file.

@heitzmann heitzmann added the bug Something isn't working label Apr 25, 2024
@philstopford
Copy link
Author

Similarly, this yields a file that KLayout rejects

def testf():
    lib = gdstk.Library("Library")
    cell = lib.new_cell("Base")
    pol = gdstk.Polygon(((0, 0), (0, 1), (0.2, 1), (0.2, 0.8), (0.1, 0.8), (0.1, 0.6), (0.2, 0.6), (0.2, 0.4), (0.1, 0.4), (0.1, 0)))
    pol.repetition = gdstk.Repetition(x_offsets=(1, 3, -2))
    cell.add(pol)
    lib.write_gds("f_rep.gds")
    lib.write_oas("f_rep.oas")

testf()

@heitzmann
Copy link
Owner

Any repetition object with negative offset will create an invalid OASIS. Thanks for reporting, I'm aware of the cause of this bug. Whenever I have some time, I can work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants