How to use the klayout.db.DCellInstArray.new function in klayout

To help you get started, we’ve selected a few klayout examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jonpry / Pill / runtime.py View on Github external
def dbCreateParamInst(view, cell, name, origin, orient, num=1, parm=None, phys=False):
   print("dbCreateParamInst: \"" + str(cell) + "\", " + str(name) + ", " + str(origin) + "," + str(orient))

   assert(num==1) 

   kobj = ilayout(cell,parm)
   if not kobj:
      print("Instantiation failed")
      return None
   dcell = db.DCellInstArray.new(kobj.cell_index(),db.DTrans.new(getRot(orient),False,float(origin[0]),float(origin[1])))
   dcell = top.insert(dcell)

   rodobj = createObj(subs=[dcell])
   rodsByName[name] = rodobj
   return rodobj