def device_detector(cell): """ We are working with the presupposition that JJ cells are flattend. Future versions can automate this process. """ c2dmap, devices = {}, {} for c in cell.dependencies(): c2dmap.update({c: c}) for c in cell.dependencies(): cc = deepcopy(c) # FIXME: Seems like there is a lack of # transformations in the parsed cells. # D = spira.Cell(elements=cc.elements).flat_copy() # elems = RDD.FILTERS.PCELL.DEVICE(D).elements # c.elements = elems # c.elements = D.elements cell_types = {0: 'JUNCTION', 1: 'VIA'} _type = None for p in cc.elements: if p.alias == 'J5': _type = cell_types[0] for key in RDD.VIAS.keys: # via_layer = RDD.VIAS[key].LAYER_STACK['VIA_LAYER'] for p in cc.elements: if p.alias == key: pcell = RDD.VIAS[key].PCELLS.DEFAULT D = spira.Cell(elements=deepcopy(cc).elements.flat_copy()) elems = RDD.FILTERS.PCELL.DEVICE(D).elements D = pcell(elements=elems) c2dmap[c] = D for key in RDD.DEVICES.keys: if _type == key: pcell = RDD.DEVICES[key].PCELLS.DEFAULT D = spira.Cell(elements=deepcopy(cc).elements.flat_copy()) elems = RDD.FILTERS.PCELL.DEVICE(D).elements D = pcell(elements=elems) c2dmap[c] = D for c in cell.dependencies(): wrap_references(c, c2dmap, devices) return cell
def import_gds(filename, cellname=None, flatten=False, pcell=True): """ """ gdsii_lib = gdspy.GdsLibrary(name='SPiRA-Cell') gdsii_lib.read_gds(filename) top_level_cells = gdsii_lib.top_level() if cellname is not None: if cellname not in gdsii_lib.cell_dict: raise ValueError("[SPiRA] import_gds() The requested cell " + "(named {}) is not present in file {}".format( cellname, filename)) topcell = gdsii_lib.cell_dict[cellname] elif cellname is None and len(top_level_cells) == 1: topcell = top_level_cells[0] elif cellname is None and len(top_level_cells) > 1: # TODO: Add this to logger. print('Multiple toplevel cells found:') for cell in top_level_cells: print(cell) raise ValueError('[SPiRA] import_gds() There are multiple' + 'top-level cells, you must specify cellname' + 'to select of one of them') cell_list = [] c2dmap = {} for cell in gdsii_lib.cell_dict.values(): D = spira.Cell(name=cell.name) for e in cell.polygons: # FIXME: Maybe check the datatype and add layer mapping. for n, p in zip(e.layers, e.polygons): layer = spira.Layer(number=int(n), datatype=0) D += spira.Polygon(shape=p, layer=layer) c2dmap.update({cell: D}) cell_list.append(cell) for cell in cell_list: wrap_references(cell, c2dmap) # wrap_labels(cell, c2dmap) top_spira_cell = c2dmap[topcell] if flatten == True: C = spira.Cell(name='import_gds') else: C = top_spira_cell if pcell is True: D = parameterize_cell(C) else: D = C return D
def create_quadrant_three(self): # self.b1.connect(port=self.b1.ports['P2'], destination=self.ports['T1']) # # h = self.p2[1] + (self.p1[1]-self.p2[1])/2 + self.radius # h = (self.p1[1]-self.p2[1])/2 + self.radius # self.b1.move(midpoint=self.b1.ports['P2'], destination=[0, h]) # self.b2.connect(port=self.b2.ports['P2'], destination=self.b1.ports['P1']) # # h = self.p2[1] + (self.p1[1]-self.p2[1])/2 - self.radius # h = (self.p1[1]-self.p2[1])/2 - self.radius # self.b2.move(midpoint=self.b2.ports['P1'], destination=[self.ports['T2'].midpoint[0], h]) # r1 = self.route_straight(self.b2.ports['P1'], self.ports['T2']) # r2 = self.route_straight(self.b1.ports['P2'], self.ports['T1']) # r3 = self.route_straight(self.b2.ports['P2'], self.b1.ports['P1']) D = spira.Cell(name='Q3') D += self.b1 # D += [self.b1, self.b2, r1, r2, r3] # D += self.ports['T1'] # D += self.ports['T2'] # D.rotate(angle=self.port1.orientation, center=self.p1) # D.move(midpoint=self.ports['T1'], destination=self.port1) return spira.SRef(D)
def create_quadrant_two(self): p1, p2 = self.p1, self.p2 h = (p2[1] - p1[1]) - self.radius self.b1.distance_alignment(port=self.b1.ports['P1'], destination=self.ports['T1'], distance=h) r1 = self.route_straight(self.b1.ports['P1'], self.ports['T1']) r2 = self.route_straight(self.b1.ports['P2'], self.ports['T2']) D = spira.Cell(name='Route_Q2_90') D += self.b1 D += r1 D += r2 # D += self.ports['T1'] # D += self.ports['T2'] # D._rotate(rotation=self.port1.orientation, center=self.p1) # D.move(midpoint=self.ports['T1'], destination=self.port1) return spira.SRef(D)
def view_virtual_connect(self, show_layers=False, write=False, **kwargs): """ View that contains all derived connections (attached contacts, derived edges). """ elems = spira.ElementList() if show_layers is True: el = self.derived_contacts F = filters.PurposeFilterAllow(purposes=['JJ', 'VIA']) elems += F(el) elems += self.device.elements else: elems += self.derived_contacts for ply_overlap, edges in self.derived_edges.items(): if ply_overlap.is_empty() is False: for e in edges: EF = filters.EdgeToPolygonFilter() elems += EF(e) if not isinstance(ply_overlap, spira.Edge): elems += ply_overlap name = self.device.name + '_VConnect' D = spira.Cell(name=name, elements=elems, ports=self.device.ports, transformation=self.device.transformation) D.gdsii_view() if write is True: D.gdsii_output(file_name=name)
def test_elem_cell(): c1 = spira.Cell(name='CellA') assert c1.name == 'CellA' assert len(c1.ports) == 0 assert len(c1.elementals) == 0 c1.ports += spira.Port(name='P1') assert len(c1.ports) == 1 c1.elementals += spira.Polygon(shape=[[[0, 0], [1, 0], [1, 1], [0, 1]]]) assert len(c1.elementals) == 1 c1.center = (0, 0) np.testing.assert_array_equal(c1.center, [0, 0]) c1.move(midpoint=c1.center, destination=(5, 0)) np.testing.assert_array_equal(c1.center, [5, 0]) class CellB(spira.Cell): def create_elementals(self, elems): elems += spira.Polygon(shape=[[[0, 0], [3, 0], [3, 1], [0, 1]]], gds_layer=spira.Layer(number=77)) return elems c2 = CellB() assert c2.name == 'CellB-0' assert len(c1.elementals) == 1 assert isinstance(c2.elementals[0], spira.Polygon)
def create_quadrant_two(self): h = (self.p2[1] - self.p1[1]) / 2 - self.radius self.b1.distance_alignment(port=self.b1.ports['P1'], destination=self.ports['T1'], distance=h) self.b2.distance_alignment(port=self.b2.ports['P2'], destination=self.ports['T2'], distance=-h) r1 = self.route_straight(self.b2.ports['P2'], self.ports['T2']) r2 = self.route_straight(self.b1.ports['P1'], self.ports['T1']) r3 = self.route_straight(self.b2.ports['P1'], self.b1.ports['P2']) D = spira.Cell(name='Q2') D += self.b1 D += self.b2 D += r1 D += r2 D += r3 # D += self.ports['T1'] # D += self.ports['T2'] # D.rotate(angle=self.port1.orientation, center=self.p1) # D.move(midpoint=self.ports['T1'], destination=self.port1) return spira.SRef(D)
def create_q4_180(self): b1 = self.b1 b2 = self.b2 b2.connect(port=b2.ports['P1'], destination=self.ports['T1']) h = self.p1[1] + self.radius + self.length b2.move(midpoint=b2.ports['P1'], destination=[0, h]) b1.connect(port=b1.ports['P2'], destination=b2.ports['P2']) b1.move(midpoint=b1.ports['P1'], destination=[self.ports['T2'].midpoint[0], h]) r1 = self.route_straight(b2.ports['P1'], self.ports['T1']) r2 = self.route_straight(b1.ports['P1'], self.ports['T2']) r3 = self.route_straight(b1.ports['P2'], b2.ports['P2']) D = spira.Cell(name='SameQ4') D += [self.b1, self.b2, r1, r2, r3] D += self.ports['T1'] D += self.ports['T2'] D.rotate(angle=self.port1.orientation, center=self.p1) D.move(midpoint=self.ports['T1'], destination=self.port1) return spira.SRef(D)
def create_quadrant_three(self): p1, p2 = self.p1, self.p2 # t1 = deepcopy(self.ports['T1']) # t2 = deepcopy(self.ports['T2']) # self.b2.connect(port=self.b2.ports['P1'], destination=t1) # h = p2[1] + self.radius # self.b2.move(midpoint=self.b2.ports['P1'], destination=[0, h]) # # r1 = self.route_straight(self.b2.ports['P1'], t1) # # r2 = self.route_straight(self.b2.ports['P2'], t2) # # self.b2.connect(port=self.b2.ports['P1'], destination=self.ports['T1']) # # h = p2[1] + self.radius # # self.b2.move(midpoint=self.b2.ports['P1'], destination=[0, h]) # # r1 = self.route_straight(self.b2.ports['P1'], self.ports['T1']) # # r2 = self.route_straight(self.b2.ports['P2'], self.ports['T2']) D = spira.Cell(name='Route_Q4_90') D += self.b1 # D += self.ports['T1'] # D += self.ports['T2'] # D._rotate(rotation=self.port1.orientation, center=self.p1) # D.move(midpoint=self.ports['T1'], destination=self.port1) return spira.SRef(D)
def create_t3(self): cell = spira.Cell() cell += spira.Rectangle(p1=(0, 0), p2=(10, 50), layer=spira.Layer(number=4)) S = spira.SRef(cell) S.rotate(-90) return S
def create_t2(self): cell = spira.Cell() cell += spira.Rectangle(p1=(0, 0), p2=(10, 50), layer=spira.Layer(number=3)) T = spira.GenericTransform(rotation=-60) S = spira.SRef(cell, transformation=T) return S
def create_t1(self): cell = spira.Cell() cell += spira.Rectangle(p1=(0, 0), p2=(10, 50), layer=spira.Layer(number=2)) T = spira.Rotation(-30) S = spira.SRef(cell, transformation=T) return S
def parse(self): gdsii_lib = gdspy.GdsLibrary(name='SPiRA-cell') gdsii_lib.read_gds(self.file_name) top_level_gdspy_cells = gdsii_lib.top_level() if self.cell_name is not None: if self.cell_name not in gdsii_lib.cell_dict: error_message = "[SPiRA] import_gds() The requested gdspy_cell (named {}) is not present in file {}" raise ValueError(error_message.format(self.cell_name, self.file_name)) topgdspy_cell = gdsii_lib.cell_dict[self.cell_name] elif self.cell_name is None and len(top_level_gdspy_cells) == 1: topgdspy_cell = top_level_gdspy_cells[0] elif self.cell_name is None and len(top_level_gdspy_cells) > 1: # TODO: Add this to logger. print('Multiple toplevel gdspy_cells found:') for gdspy_cell in top_level_gdspy_cells: print(gdspy_cell) raise ValueError('[SPiRA] import_gds() There are multiple' + 'top-level gdspy_cells, you must specify self.cell_name' + 'to select of one of them') c2dmap = {} for gdspy_cell in gdsii_lib.cell_dict.values(): D = spira.Cell(name=gdspy_cell.name) for e in gdspy_cell.polygons: for i, p in enumerate(e.polygons): n = e.layers[i] d = e.datatypes[i] # print(n, d) layer = spira.Layer(number=int(n), datatype=int(d)) L = self.map_layer(layer) # print(L) # D += spira.Polygon(shape=p, layer=L) ply = spira.Polygon(shape=p, layer=L) # print(ply) D += ply # print(e.datatypes) # key = (e.layer) # # FIXME: Maybe check the datatype and add layer mapping. # for n, p in zip(e.layers, e.polygons): # layer = spira.Layer(number=int(n), datatype=int(0)) # L = self.map_layer(layer) # D += spira.Polygon(shape=p, layer=L) c2dmap.update({gdspy_cell: D}) for gdspy_cell in gdsii_lib.cell_dict.values(): self._create_references(gdspy_cell, c2dmap) # self._create_labels(gdspy_cell, c2dmap) return c2dmap[topgdspy_cell]
def create_elementals(self, elems): elems += spira.Rectangle(p1=(60, 45), p2=(80, 80), layer=RDD.PLAYER.M2.METAL) c1 = spira.Cell(name='ply1') c1 += spira.Rectangle(p1=(60, 80), p2=(80, 100), layer=RDD.PLAYER.M2.METAL) c1 += spira.Rectangle(p1=(70, 60), p2=(100, 70), layer=RDD.PLAYER.M2.METAL) elems += spira.SRef(c1) return elems
def create_t3(self): cell = spira.Cell() tf_1 = spira.Translation(Coord(12.5, 2.5)) + spira.Rotation(60) tf_2 = spira.Translation(Coord( 12.5, 2.5)) + spira.Rotation(60) + spira.Reflection(True) cell += spira.Rectangle(p1=(0, 0), p2=(10, 50), layer=spira.Layer(number=4)) S1 = spira.SRef(cell, transformation=tf_1) S2 = spira.SRef(cell, transformation=tf_2) return [S1, S2]
def create_t2(self): cell = spira.Cell() tf_1 = spira.GenericTransform(translation=(10, 10), rotation=45) tf_2 = spira.GenericTransform(translation=Coord(10, 10), rotation=45, reflection=True) cell += spira.Rectangle(p1=(0, 0), p2=(10, 50), layer=spira.Layer(number=3)) S1 = spira.SRef(cell, transformation=tf_1) S2 = spira.SRef(cell, transformation=tf_2) return [S1, S2]
def create_elements(self, elems): points = [(10.0, 0.0), (15.0, 10.0), (0.0, 10.0), (0.0, 5.0), (-15.0, 5.0), (-5.0, 0.0), (-10.0, -10.0), (-5.0, -15.0), (10.0, -15.0), (5.0, -10.0), (5.0, -5.0)] s = spira.Shape(points=points) S1 = spira.Cell(name='shape', elements=spira.Polygon(shape=s, layer=spira.Layer(1))) # #translate a copy of the shape # t = s.move_copy((0.0, 20.0)) # S2 = Structure("shape_trans", Boundary(Layer(0), t)) # #rotate the shape (angle in degree) # t = s.rotate_copy((0.0, 0.0), 50) # S3 = Structure("shape_rot", Boundary(Layer(0), t)) # #scale the shape # t = s.magnify_copy((0.0, 0.0), 1.2) # S4 = Structure("shape_scale", Boundary(Layer(0), t)) # #stretch the shape horizontally and squeeze vertically # t = Stretch(stretch_center = (0.0, 0.0), stretch_factor = (1.5, 0.5))(s) # S5 = Structure("shape_stretch", Boundary(Layer(0), t)) # #fit the shape in a box # south_west = (-7.0, -7.0) # north_east = (7.0, 7.0) # t = ShapeFit(s, south_west, north_east) # S6 = Structure("shape_fit", Boundary(Layer(0), t)) # #create a shape which traces the contour with a certain line width # t = ShapePath(original_shape = s, path_width = 0.5) # S7 = Structure("ShapePath1", Boundary(Layer(0), t)) # t = ShapePathRounded(original_shape = s, path_width = 0.5) # S8 = Structure("ShapePath2", Boundary(Layer(0), t)) # #expand the shape with a certain distance # t = ShapeGrow(s, 1.0) # S9 = Structure("shape_grow", Boundary(Layer(1), t) + Boundary(Layer(0), s)) # #round the shape with a given radius # t = ShapeRound(original_shape = s, radius = 2.0) # S10 = Structure("shape_round", Boundary(Layer(1), t) + Boundary(Layer(0), s)) elems += [ spira.SRef(S1, (0.0, 200.0)), ] return elems
def view_derived_edges(self, show_layers=False, **kwargs): elems = spira.ElementList() if show_layers is True: elems += self.device.elements for ply_overlap, edges in self.derived_edges.items(): if ply_overlap.is_empty() is False: for e in edges: EF = filters.EdgeToPolygonFilter() elems += EF(e) D = spira.Cell(name='_DERIVED_EDGES', elements=elems) D.gdsii_view()
def test_cell_list(): cl = spira.CellList() assert cl.is_empty() == True c1 = spira.Cell('C1') c2 = spira.Cell('C2') c3 = spira.Cell('C3') cl += c1 cl += [c2, c3] assert len(cl) == 3 assert cl['C2'] == c2 assert cl.index('C2') == 1 assert cl.index(c2) == 1 del cl['C1'] assert cl[0] == c2 assert len(cl) == 2 del cl[c3] assert len(cl) == 1
def create_t1(self): cell = spira.Cell() cell += spira.Rectangle(p1=(0, 0), p2=(10, 50), layer=spira.Layer(number=2)) S1 = spira.SRef(cell) S1.rotate(rotation=45) S1.translate(Coord(15, 15)) S = spira.SRef(cell) S.rotate(rotation=45) S.translate(Coord(15, 15)) S.reflect(True) return [S1, S]
def gdsii_output_virtual_connect(self, **kwargs): elems = spira.ElementList() # for e in self.__make_polygons__(): # elems += e for ply_overlap, edges in self.connected_edges.items(): if len(ply_overlap.points) > 0: elems += ply_overlap elems += edges for e in self.device.elements: elems += e D = spira.Cell(name='_VIRTUAL_CONNECT', elements=elems) D.gdsii_output()
def view_derived_contacts(self, show_layers=False, **kwargs): elems = spira.ElementList() # if show_layers is True: # elems += self.device.elements # el = self.derived_contacts # F = filters.PurposeFilterAllow(purposes=['JJ', 'VIA']) # elems += F(el) el = self.derived_contacts elems += el D = spira.Cell(name='_DERIVED_CONTACTS', elements=elems) D.gdsii_view()
def create_quadrant_four(self): p1, p2 = self.p1, self.p2 self.b2.connect(port=self.b2.ports['P2'], destination=self.ports['T1']) h = p2[1] + self.radius self.b2.move(midpoint=self.b2.ports['P2'], destination=[0, h]) r1 = self.route_straight(self.b2.ports['P2'], self.ports['T1']) r2 = self.route_straight(self.b2.ports['P1'], self.ports['T2']) D = spira.Cell(name='Route_Q4_90') D += [self.b2, r1, r2] D += self.ports['T1'] D += self.ports['T2'] # D.rotate(angle=self.port1.orientation, center=self.p1) D._rotate(rotation=self.port1.orientation, center=self.p1) D.move(midpoint=self.ports['T1'], destination=self.port1) return spira.SRef(D)
def test_library(): l1 = spira.Library() l2 = spira.Library(name='library') l3 = spira.Library() assert l1.is_empty() == True cell = spira.Cell(name='C1') l1 += cell l3 += cell assert l1 == l3 assert l1 != l2 assert len(l1) == 1 assert l1.name == 'spira_library' assert l2.name == 'library' assert (cell in l1) == True assert l1['C1'] == cell l1.clear() assert len(l1) == 0 assert l1 == l2
def create_parallel_route(self): p1, p2 = self.p1, self.p2 b1, b2 = self.b2, self.b1 dx = max(p1[0], p2[0]) dy = max(p1[1], p2[1]) if p2[0] > p1[0]: b1, b2 = self.b1, self.b2 h = p2[1] + self.length d1 = [0, h] d2 = [self.ports['T2'].midpoint[0], h] b1.connect(port=b1.ports['P2'], destination=self.ports['T1']) b1.move(midpoint=b1.ports['P2'], destination=d1) b2.connect(port=b2.ports['P2'], destination=b1.ports['P1']) b2.move(midpoint=b2.ports['P1'], destination=d2) r1 = self.route_straight(b1.ports['P2'], self.ports['T1']) r2 = self.route_straight(b2.ports['P1'], self.ports['T2']) r3 = self.route_straight(b1.ports['P1'], b2.ports['P2']) D = spira.Cell(name='Parallel') D += [self.b1, self.b2, r1, r2, r3] t1 = self.ports['T1'] t2 = self.ports['T2'] t1.rotate(angle=self.port1.orientation) t2.rotate(angle=self.port1.orientation) D.rotate(angle=self.port1.orientation, center=self.p1) D.move(midpoint=self.ports['T1'], destination=self.port1) return spira.SRef(D)
# el += spira.Rectangle(p1=(8, 4), p2=(-4, 6), layer=RDD.PLAYER.M5.METAL) # el += spira.Rectangle(p1=(-4, 4), p2=(1, 6), layer=RDD.PLAYER.M5.METAL) # el += spira.Rectangle(p1=(3, 4), p2=(8, 6), layer=RDD.PLAYER.M5.METAL) # el += spira.Rectangle(p1=(-4, 8), p2=(8, 12), layer=RDD.PLAYER.M5.METAL) # el += spira.Rectangle(p1=(1, 9), p2=(3, 14), layer=RDD.PLAYER.M5.METAL) # el += spira.Rectangle(p1=(-1, 9), p2=(5, 14), layer=RDD.PLAYER.M5.METAL) # NOTE: Edge cases. # el += spira.Rectangle(p1=(0, 10), p2=(4, 14), layer=RDD.PLAYER.M5.METAL) # el += spira.Rectangle(p1=(-4, 4), p2=(0, 6), layer=RDD.PLAYER.M5.METAL) # el += spira.Rectangle(p1=(4, 4), p2=(7, 6), layer=RDD.PLAYER.M5.METAL) # el += spira.Rectangle(p1=(4, 9), p2=(7, 11), layer=RDD.PLAYER.M5.METAL) # el += spira.Rectangle(p1=(3, 10), p2=(7, 11), layer=RDD.PLAYER.M5.METAL) device = spira.Cell(name='Device', elements=el) v_model = virtual_connect(device=device) v_model.gdsii_output_virtual_connect() # # F = MetalConnectFilter() # # D = F(device) # D = device # D = spira.Circuit(name='TestElectricalConnections', elements=D.elements) # # D.gdsii_output() # D.netlist_output()
import spira.all as spira from spira.yevon import filters from spira.yevon import constants from spira.all import RDD ply1 = spira.Rectangle(p1=(0, 0), p2=(10, 2), layer=RDD.PLAYER.M1.METAL) D = spira.Cell(name='TopLevel', elements=[ply1]) # D += ply1.edges for edge in ply1.edges: EF = filters.EdgeToPolygonFilter() D += EF(edge) # for e in ply1.edges: # D += spira.EdgeAdapter(original_edge=e, edge_type=constants.EDGE_TYPE_OUTSIDE) # EF = filters.EdgeFilter(edge_type=constants.EDGE_TYPE_OUTSIDE) # D = EF(D) D.gdsii_output(file_name='Edges')
# print(expand_elems) # return expand_elems from spira.yevon.gdsii.containers import __CellContainer__ class JunctionStretch(__CellContainer__): def create_elementals(self, elems): elems = self.cell.elementals return elems def create_ports(self, ports): # elems = self.cell.elementals return ports if __name__ == '__main__': cell = spira.Cell(name='TopLevel') D = Junction() S = spira.SRef(reference=D) cell += S # T = spira.Stretch(stretch_factor=(2,1)) # S1 = T(S) # cell += S1 cell.gdsii_output()
def create_elements(self, elems): t1, t2 = self.get_transforms() elems += spira.Rectangle(p1=(-13, -60), p2=(13, 12), layer=RDD.PLAYER.M1.METAL) elems += spira.SRef(alias='S1', reference=Top(), transformation=t1) elems += spira.SRef(alias='S2', reference=Bot(), transformation=t2) return elems if __name__ == '__main__': junction = Junction() C = spira.Cell(name='TestingCell') S = spira.SRef(alias='Jj', reference=junction) # S.stretch_by_factor(factor=(2,1)) S.stretch_p2p(port_name='S1:Sr1:E3_R1', destination_name='S2:Sr2:E1_R1') # S.stretch_p2c(port_name='S1:Sr1:E3_R1', destination_name='S2:Sr2:E1_R1') C += S # D = C.expand_flat_copy() # D.gdsii_output() C.gdsii_output() # C.gdsii_output_expanded()
# # shape = shapes.RectangleShape(p1=(0,0), p2=(10, 50)) # # ply = spira.Polygon(shape=shape, gds_layer=spira.Layer(number=12), transformation=tf) # # return ply # def create_elements(self, elems): # elems += self.ref_point # elems += self.t1 # # elems += self.t2 # # elems += self.t3 # return elems # ------------------------------------------------------------------------------------------------------------------- cell = spira.Cell(name='Transformations') t1 = TranslatePolygon() # t1.gdsii_output(name='Translate') t2 = RotatePolygon() # t2.gdsii_output() t3 = ReflectPolygon() # t3.gdsii_output() t4 = TransformPolygon() t4.gdsii_output(name='Transform') # t5 = StretchPolygon() # t5.gdsii_output()