Home Forums Nazca Bug when exporting flat gds of scaled instances

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #6957
    Marco
    Participant

    Dear Nazca Team,

    I would like to report a small bug I encountered while exporting flat gds of designs containing scaled instances (instanced created with a put statement with the scale parameter).

    When exporting gds with native hierarchy, the result is correct. However, when the directive hierachy=’flat’ is added to to export_gds, the scaled instance scales the dimension of the cell’s objects, but not the position.

    Here is a small code snippet to reproduce the issue:

    with nd.Cell("level0", instantiate=True) as level0:
        _poly = nd.Polygon(points=nd.geom.square(length=10.0, position=5), layer=1)
        for i in [-1, 1]:
            for j in [-1, 1]:
                _poly.put(50.0 * i, 50.0 * j)
                nd.Annotation(text=f"{i}_{j}", layer=3).put(50.0 * i, 50.0 * j)
    
    with nd.Cell("level1") as level1:
        level0.put(0, 0, 0, scale=5.0)
    
    nd.export_gds(level1, filename="bug_normal.gds")
    nd.export_gds(level1, filename="bug_flat.gds", hierarchy="flat")

    Best,
    Marco

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.