BASIC.Arc not appearing well in layer?


I tried making a function that easily creates Arcs for me. I used this:
def CreateArc(Cell, Layer, x, y, Rin, Rout, deg1, deg2, num=10000):

"Creates an arc starting from deg1and ending at deg2 whose center is in x,y and has inner and outer radii Rin, Rout."
ind = layout.layer(7,0)
param = {"layer":ind, "actual_radius1":Rin, "radius1":Rin, "actual_radius2":Rout, "radius2":Rout, "actual_start_angle":deg1, "actual_end_angle":deg2, "npoints": num}
ccell = LAYOUT.create_cell("ARC", "Basic",param)
trans = pya.Trans(0, False, x, y)
Cell.insert(, trans))

But the object created is not shown.
1. First, the layer does not come up right - In order for it to show I have to double-click the object and then hit OK/Apply. The correct layer IS used this way. After hitting apply, the text (shown below in the pic) turns from l=7 to l=7/0.

2. The angles are completely erroneous. Default seems to be 0..90, I guess I have the wrong parameter name for it.

Please help!


  • Have you enabled all hierarchy levels? Try to press "*" or use Display/Full Hierarchy.

    The parameter names are "layer", "npoints", "actual_radius1", "actual_radius2", "actual_start_angle" and "actual_end_angle". Units are micron for radius and degree for the angles. Setting "radius1" and "radius2" is optional. So your code should be working.


  • I have.
    The angles don't seem to 'get it' even with the correct parameter names as you wrote, and the layer still does not show until I double-click it and go "ok". I don't know what I'm doing wrong by now?

    Perhaps you could show me a code which successfully creates an arc, and I will modify it?

  • Maybe you could show me your full code? The one above will not execute and it's not a sample.

    But I see that layer isn't a pya.LayerInfo object but a layer index. That is wrong. Please take a look at the original discussion here: to see how the layer parameter is provided.


Sign In or Register to comment.