Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Issues with sbend_solve #6237
    iv_tern
    Member

    Apologies, the lines about the pins are referring to trs pin2=trs.pin[‘a0’], as the original names are slightly long and convoluted, I edited it for clarity’s sake. It turns out that it is however a cell, not an instance.

    Fixed the issue – it turns out that this makes an instance

    trs=testpat.obj().put()

    and this makes a cell

    trs=testpat.obj.()

    trs.put()

    in reply to: Clipping check, distance and length for interconnects #6090
    iv_tern
    Member

    Dear Ronald, thank you very much for your prompt response – this is almost what I’m looking for.

    If I run the following code:

    import nazca as nd
    
    nd.clear_layers()
    nd.clear_layout()
    
    toy_points1=[(0,0), (0,7), (10, 14), (0,25)]
    toy_points2=[(0,0), (0,15), (10, 14), (0,20)]
    
    with nd.Cell('toy_poly1') as tp1:
        toy_polygon1=nd.Polygon(points=toy_points1, layer=1).put(0)
        nd.Pin('a0').put(0, 0, 180)
        nd.Pin('b0').put(10, 2.5, 0)
    
    with nd.Cell('toy_poly2') as tp2:
        toy_polygon2=nd.Polygon(points=toy_points2, layer=1).put(0)
        nd.Pin('a0').put(0, 0, 180)
        nd.Pin('b0').put(10, 2.5, 0)
    
    p1 = tp1.put(0,0,0)
    p2 = tp2.put(40,40,90)
    
    print("points in original polygon:")
    for NT in nd.cell_iter(p1):  # NT is a named tuple object
        if NT.cell_start:
            print(f"\ncell: '{NT.cell.cell_name}'")
            for i, (pgon, points, bbox) in enumerate(NT.iters['polygon']):
                print(f"{i}: points: {pgon.points}, layer: '{pgon.layer}'")
    
    print("points in original polygon:")
    for NT in nd.cell_iter(p2):  # NT is a named tuple objec
        if NT.cell_start:
            print(f"\ncell: '{NT.cell.cell_name}'")
            for i, (pgon, points, bbox) in enumerate(NT.iters['polygon']):
                print(f"{i}: points: {pgon.points}, layer: '{pgon.layer}'")

    I get this output:

    points in original polygon:
    
    cell: 'toy_poly1'
    0: points: [(0, 0), (0, 7), (10, 14), (0, 25)], layer: '1/0/None'
    points in original polygon:
    
    cell: 'toy_poly2'
    0: points: [(0, 0), (0, 15), (10, 14), (0, 20)], layer: '1/0/None'

    Whereas I’m looking for the output, that takes into account the fact that p2 has been .put at 40,40 and rotated 90. I.e. I’m interested in the points with the origin of the entire mask, as opposed to the origin of the top cell, if this makes sense.

    Regards,
    iv_tern

    in reply to: Clipping check, distance and length for interconnects #6075
    iv_tern
    Member

    Thank you for your input!

    One final question, if that’s ok – is there any way to get the coordinates of all the points in an interconnect (i.e. where in the object properties as those stores?) I.e. doing the reverse of the tutorial example of placing a polygon, where we give a list of points and then use nd.Polygon(points=pts, layer=’layer’).put(coords).

    Let me know if this isn’t clear, and I can try to elaborate.

    in reply to: Interconnect: pcurve_p2p #6020
    iv_tern
    Member

    Was just about to make a new topic for this, but it seemed very closely related.

    For the cobra_p2p() method, is the taper always linear? I am looking to do some polynomial tapers, but I haven’t managed to figure out a way to do it via viper.

    Apologies, if this has been covered somewhere, my search didn’t reveal anything.

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