Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Connect polygons corresponding to different layers #6501
    A
    Participant

    Hi Ronald,

    Thanks a lot for your feedback. That was very helpful.

    best regards,
    A

    A
    Participant

    Hi Ronald,

    I do not know the polygon positions in advance.

    A

    A
    Participant

    Dear Ronald,

    Thank you very much for your reply on the forum. I am aware of most of the links you provided but I still need a little help. Indeed, a picture would explain better what I am trying to achieve.

    Please see below the sketch of the gds design. It has two layers (in red and blue colors), each containing spaced horizontal polygons shifted along x-axis in one layer with respect to the other. I would like to iterate over these polygons in the existing gds file and connect the beginning of every 2th polygon from the ‘red’ layer with the end of every 2th polygon from the blue layer and put the connectors (metal lines) in another layer (yellow color).

    import nazca as nd
    import nazca.geometries as geom
    from nazca.interconnects import Interconnect
    
    def rect1(layer_n=1):
        rect_shape = nd.geom.rectangle(length=20, height=5)
        with nd.Cell('rect1') as cell:
            nd.Polygon(layer=1, points=rect_shape).put(0)
            nd.Polygon(layer=10, points=rect_shape).put(2, 10)
            # guide=ic.sbend_p2p(pin1=r1, pin2=r2.pin['a0']).put()
        return cell
    
    rect1().put(array=[4, [30, 0], 2, [0, 20]])
    
    nd.export_plt()

    I know how to open and change a gds file. The difficulty I have is how to iterate over the polygons from different layers and connect them?

    Thank you very much for your help.
    A

    image.png

Viewing 3 posts - 1 through 3 (of 3 total)