def metals(self): from spira.rdd import get_rule_deck from spira.gdsii.elemental.polygons import PolygonAbstract RDD = get_rule_deck() elems = ElementList() for p in self.polygons: if p.gdslayer.number in RDD.METALS.layers: elems += p return elems
import spira from spira import param from spira import shapes from spira.rdd import get_rule_deck from spira.rdd.technology import ProcessTree from demo.pdks import ply RDD = get_rule_deck() class Junction(spira.Cell): """ Josephson Junction component for the AIST process. """ metals = param.DataField(fdef_name='create_metal_layers') contacts = param.DataField(fdef_name='create_contact_layers') def create_metal_layers(self): metals = spira.ElementList() metals += ply.Box(player=RDD.PLAYER.COU, center=(1.95, 5.76), w=1.9, h=6.7) metals += ply.Box(player=RDD.PLAYER.BAS, center=(1.95, 2.6), w=3.9, h=5.2) metals += ply.Box(player=RDD.PLAYER.BAS, center=(1.95, 7.7), w=1.9, h=2.8) metals += ply.Box(player=RDD.PLAYER.RES, center=(1.95, 7.2), w=1.5, h=1.5) metals += ply.Box(player=RDD.PLAYER.RES, center=(1.95, 5.76), w=1.5, h=2.0) metals += ply.Box(player=RDD.PLAYER.RES, center=(1.95, 3.55), w=3.4, h=2.8) return metals def create_contact_layers(self): elems = spira.ElementList() elems += ply.Box(player=RDD.PLAYER.GC, center=(1.95, 1.1), w=2.9, h=1.2) elems += ply.Box(player=RDD.PLAYER.BC, center=(1.95, 8.5), w=1.4, h=1.0)