How to use the klayout.db.DTrans.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 rodTranslate(alignObj,delta,internal=False,done=None):
   m = ["lowerLeft","lL", "upperLeft", "uL", "lowerRight", "lR", "upperRight", "uR", "lC", 
         "uC", "cC", "cR", "cL"]
   for h in m:
      alignObj[h] = addPoint(alignObj[h],delta)
   print("ao: " + str(alignObj))
   shapes = alignObj['_shapes']
   print("shapes: " + str(shapes))
   if not internal:
      done = set()
   for s in shapes:
      print("s: " + str(s))
      s.transform(db.DTrans.new(float(delta[0]),float(delta[1])))
   done.add(alignObj['_id'])
 
   for m in alignObj['_masters']:
      if not m['_id'] in done:
         rodTranslate(m,delta,True,done)
   for s in alignObj['_slaves']:
      if not s['_id'] in done:
         rodTranslate(s,delta,True,done)