Home Forums Nazca Importing a GDS file prepared by another software

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4213
    layouteng
    Participant

    Is it possible to import a previously designed GDSII file (with another software) into Nazca and start doing transform operations, such as rotation/scale/mirror/shift of different cells in different hierarchy levels? I could not find an exact example in the tutorials or manual.

    #4220
    Ronald
    Keymaster

    Hi layouteng,

    Yes this is possible with the load_gds method.
    In short:

    cellA = nd.load_gds(filename='library.gds', cellname='A')
    cellA.put(0, 20, 20, flip=True)

    A more extended copy-paste example:

    import nazca as nd
    
    # Create a GDS library to use in the load_gds example:
    with nd.Cell('A') as A:
        nd.Polygon(points=[(0, 0), (10, 0), (0, 5)]).put(0)
    with nd.Cell('B') as B:
        nd.Polygon(points=[(0, 0), (-5, 5), (0, 1)]).put(0)
    nd.export_gds([A, B], filename='library')
    
    # and the actual load_gds example:
    cellA = nd.load_gds(filename='library.gds', cellname='A')
    cellB = nd.load_gds(filename='library.gds', cellname='B', scale=5.0)
    
    cellA.put(0)
    cellA.put(10, 20, 45)
    cellB.put(20, flip=True)
    cellB.put(20, flop=True)
    
    nd.export_gds(filename='use_a_gds_library')

    See the load_gds docstring for more options.

    Ronald

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.