Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def rodCreateRectBase(layer,width,length,origin=[0,0],elementsX=1,spaceX=0,termIOType=None,termName=None,pin=None,cvId=None,beginOffset=0,endOffset=0,space=0):
r = None
l1 = maplayer(layer)
if l1 >= 0:
print("found layer")
r = db.DBox.new(origin[0],origin[1],origin[0]+width,origin[1]+length).to_itype(0.001)
r = top.shapes(l1).insert(r)
return createObj(subs=[r])
def dbCreateRect(name,layer,coord):
l1 = layermap[ (layer[0],layer[1]) ]
l1 = layout.layer(l1[0], l1[1])
r = db.DBox.new(coord[0][0],coord[0][1],coord[1][0],coord[1][1])
top.shapes(l1).insert(r)