Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Daneel
    Member

    Hello Ronald,

    here is an image of my problem.

    the right and left side have the same coordinates around 0, but for one left side the sbend uses not a straight waveguide to connect the two points, whereas on the right side there is a straight part and 2 bends which connect the two points in a straight line.

    sbend

    Is there a way to say that both the straight parts of the sbend should be either horizontal or vertical, not going kind of diagonal from one point to the other.

    Thank you.

    in reply to: Identify Cells already created #5920
    Daneel
    Member

    Hello Ronald,

    I have another follow-up question on that topic.

    I have a function which defines a cell which itself consists of several subcells. Is it possible to use the hasme = True statement with the last cell, which is returned by the function? If I do it like that I receive an exceptio: Exception: Detected a call nd.Cell(hashme=True) without first calling the @hashme(‘cellname’) decorator with a non-empty ‘cellname’.

    Does that mean the hashme only works with one cell per function, does the cell which is hashed has to be follow the function definition directly or do i have to hash each cell in the function?

    import nazca as nd
    import nazca.geometries as geom
    
    @nd.bb_util.hashme('rectangle', 'length', 'width') # gives default cell name 'rectangle_80_80'
    def rectangles(length=80, width=80):
        with nd.Cell('Text') as text:
            nd.text(text = 'Rectangle' + str(length) +' ,' + str(width),
            height = 30, layer = 'Label', align='cc').put(0,0)
    
        with nd.Cell(hashme=True) as rectangle:
            rect = geom.box(length=length, width=width)
            nd.Polygon(points=rect).put(0, 0)
            text.put(100,0)
        
        return rectangle

    rectangles().put()
    rectangles().put()

    nd.export_gds()

    in reply to: Identify Cells already created #5553
    Daneel
    Member

    Thank you so much for the help.

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