Exemplo n.º 1
0
 def _generate_elements(self, elems):
     # We calculate the lengths of the 2 spirals in this pcell.
     # Note that we assume that there are exactly 2 spirals in this list.
     #assert len(self.Spiral_list) == 2
     lengths = get_lengths(self)
     iz=self.Spiral_list[0].inner_size
     sx=iz[1]+200
     for counter, (child, length)  in enumerate(zip(self.Spiral_list, lengths)):
         ip= child.ports["in"].position
         op= child.ports["out"].position
         width=child.ports["in"].trace_template.core_width
         #print 'child.ports["in"].trace_template.core_width: ', child.ports["in"].trace_template.core_width
         
     #i3.TECH.PPLAYER.NONE.LOGOTXT   when using isipp50g
         if self.tipo==2: 
             elems += i3.PolygonText(layer= i3.TECH.PPLAYER.WG.TEXT, text='Width={}_Length={}_R={}'.format(width,
                                                                                                           length,
                                                                                                      self.R),
                                 coordinate=((op[0]-ip[0])/2-1000.0, -(self.n+0.5)*counter*sx-50.0),
                                 alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                 font = 2,
                                 height=20.0)
         if self.tipo==1: 
             elems += i3.PolygonText(layer= i3.TECH.PPLAYER.WG.TEXT, text='Width={}_Length={}_R={}'.format(width,
                                                                                                           length,
                                                                                                      self.R),
                                 coordinate=(-(op[0]-ip[0])/2-1000.0, (self.n)*counter*sx-50.0),
                                 alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                 font = 2,
                                 height=20.0)                
     return elems
Exemplo n.º 2
0
        def _generate_elements(self, elems):

            elems += i3.PolygonText(
                layer=i3.TECH.PPLAYER.WG.TEXT,
                text='Name={}_{}'.format(self.cell.dc.name,
                                         self.cell.wg_t1.name),
                coordinate=(1350.0, 100.0),
                alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                font=2,
                height=20.0)

            elems += i3.PolygonText(
                layer=i3.TECH.PPLAYER.WG.TEXT,
                text='Name={}_{}'.format(self.cell.dc2.name,
                                         self.cell.wg_t1.name),
                coordinate=(4650.0, 100.0),
                alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                font=2,
                height=20.0)

            # elems += i3.PolygonText(layer=i3.TECH.PPLAYER.WG.TEXT,
            #                         text='Name={}_R={}_delay={}'.format(name, self.R, self.delay_length),
            #
            #                         coordinate=(0.0, -counter * 5 * self.R - 2 * self.R + 50.0  # -100
            #                                     ),
            #                         alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
            #                         font=2,
            #                         height=20.0)

            return elems
Exemplo n.º 3
0
        def _generate_elements(self, elems):
            for counter, child in enumerate(self.MZI_22_22_list):
                name = child.name

                print name
                elems += i3.PolygonText(layer=i3.TECH.PPLAYER.WG.TEXT,
                                        text='Name={}_R={}_delay={}'.format(name, self.R, self.delay_length),

                                        coordinate=(0.0, -counter * 5 * self.R + 2 * self.R - 50.0  # -100
													),
                                        alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                        font=2,
                                        height=20.0)

                elems += i3.PolygonText(layer=i3.TECH.PPLAYER.WG.TEXT,
                                        text='Name={}_R={}_delay={}'.format(name, self.R, self.delay_length),

                                        coordinate=(0.0, -counter * 5 * self.R - 2 * self.R + 50.0  # -100
													),
                                        alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                        font=2,
                                        height=20.0)
            for counter2, child in enumerate(self.MZI_12_22_list):
                name = child.name
                print name
                elems += i3.PolygonText(layer=i3.TECH.PPLAYER.WG.TEXT, text='Name={}'.format(name),

                                        coordinate=(0.0, -(counter + 1 + counter2) * 5 * self.R - 90.0 - 500  # -100
													),
                                        alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                        font=2,
                                        height=20.0)

            return elems
Exemplo n.º 4
0
        def _generate_elements(self, elems):
            for counter, child in enumerate(self.DC_list):
                if (counter % 2 == 0):
                    name = child.name
                    elems += i3.PolygonText(
                        layer=i3.TECH.PPLAYER.WG.TEXT,
                        text="{}".format(name[0:10]),
                        # coordinate=(4650.0, 100.0),
                        alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                        font=2,
                        height=200.0,
                        transformation=i3.Rotation(
                            (0.0, 0.0), -90.0) + i3.Translation(
                                (3000 - 450, -2000 + 4500 * counter / 2)))
                else:
                    elems += i3.PolygonText(
                        layer=i3.TECH.PPLAYER.WG.TEXT,
                        text="R=200_L=80",
                        alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                        font=2,
                        height=80.0,
                        transformation=i3.Rotation(
                            (0.0, 0.0), -90.0) + i3.Translation(
                                (3000 - 450, -2700 + 4500 * counter / 2)))

            # elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
            #                       center=(0, 0),
            #                       box_size=(500, 300))
            return elems
Exemplo n.º 5
0
        def _generate_elements(self, elems):
            for counter, child in enumerate(self.DC_list):
                name = child.name

                elems += i3.PolygonText(
                    layer=i3.TECH.PPLAYER.WG.TEXT,
                    text="{}_{}".format(name, self.cell.wg_t1.name),
                    # coordinate=(1300.0, 100.0),
                    alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                    font=2,
                    height=20.0,
                    transformation=i3.Translation(
                        (2500, 100 + 10000 * counter)))

                elems += i3.PolygonText(
                    layer=i3.TECH.PPLAYER.WG.TEXT,
                    text="{}_{}".format(name, self.cell.wg_t1.name),
                    # coordinate=(-2000, -150),
                    alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                    font=2,
                    height=200.0,
                    transformation=i3.Rotation(
                        (0.0, 0.0), 90.0) + i3.Translation(
                            (450, -2000 + 10000 * counter)))

            return elems
Exemplo n.º 6
0
        def _generate_elements(self, elems):
            for counter, child in enumerate(self.DC_list):
                name = child.name

                elems += i3.PolygonText(
                    layer=i3.TECH.PPLAYER.WG.TEXT,
                    text="{}_{}".format(name, self.cell.wg_t1.name),
                    # coordinate=(1300.0, 100.0),
                    alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                    font=2,
                    height=20.0,
                    transformation=i3.Translation(
                        (1500, 100 + 10000 * counter)))

                elems += i3.PolygonText(
                    layer=i3.TECH.PPLAYER.WG.TEXT,
                    text="{}_{}".format(name, self.cell.wg_t1.name),
                    # coordinate=(-2000, -150),
                    alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                    font=2,
                    height=200.0,
                    transformation=i3.Rotation(
                        (0.0, 0.0), 90.0) + i3.Translation(
                            (450, -2000 + 10000 * counter)))

                for i in range(0, 4, 1):  #dicing marker right 16 squares
                    elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                          center=(100, -3000 + 100 +
                                                  10000 * i - 2000),
                                          box_size=(100, 100))
                    elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                          center=(100, -3000 - 100 +
                                                  10000 * i - 2000),
                                          box_size=(100, 100))
                    elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                          center=(-100, -3000 + 100 +
                                                  10000 * i - 2000),
                                          box_size=(100, 100))
                    elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                          center=(-100, -3000 - 100 +
                                                  10000 * i - 2000),
                                          box_size=(100, 100))
                elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                      center=(300,
                                              -3000 + 100 + 6000 * 3 + 10000),
                                      box_size=(100, 100))
                elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                      center=(300, -5000 - 100),
                                      box_size=(100, 100))
                elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                      center=(-300,
                                              -3000 + 100 + 6000 * 3 + 10000),
                                      box_size=(100, 100))
                elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                      center=(-300, -5000 - 100),
                                      box_size=(100, 100))

            return elems
Exemplo n.º 7
0
        def _generate_elements(self, elems):

            num_x = 5
            x_step = 200
            y_step = 200

            pplayers = get_pplayers_from_tree(i3.TECH.PPLAYER)

            xcnt = 0
            ycnt = 0

            for p in pplayers:

                x = xcnt * x_step
                y = ycnt * y_step

                if not (p.process, p.purpose) in i3.TECH.GDSII.LAYERTABLE:
                    continue
                elems += i3.Rectangle(layer=p, center=(x, y), box_size=(100.0, 100.0))
                elems += i3.PolygonText(layer=p, text=p.name, coordinate=(x, y + 75.0), height=15.0)

                if xcnt == num_x - 1:
                    xcnt = 0
                    ycnt += 1
                else:
                    xcnt += 1

            return elems
Exemplo n.º 8
0
        def _generate_elements(self, elems):
            for counter, child in enumerate(self.DC_list):
                name = child.name

                elems += i3.PolygonText(
                    layer=i3.TECH.PPLAYER.WG.TEXT,
                    text="{}_{}".format(name, self.cell.wg_t1.name),
                    # coordinate=(1300.0, 100.0),
                    alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                    font=2,
                    height=30.0,
                    transformation=i3.Translation((600, 100 + 6000 * counter)))
                for i in range(1, 8, 1):
                    elems += i3.PolygonText(
                        layer=i3.TECH.PPLAYER.WG.TEXT,
                        text="{}".format(i),
                        coordinate=(400, -4400 + 3000 * i),
                        font=2,
                        height=200.0,
                    )
                for j in range(-1, 2, 1):
                    for i in range(0, 4, 1):
                        elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                              center=(100 + j * 6000,
                                                      -3000 + 100 + 6000 * i),
                                              box_size=(100, 100))
                        elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                              center=(100 + j * 6000,
                                                      -3000 - 100 + 6000 * i),
                                              box_size=(100, 100))
                    elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                          center=(100 + j * 6000, -3000 + 100 +
                                                  6000 * 3 + 3000),
                                          box_size=(100, 100))
                    elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                          center=(100 + j * 6000, -3000 - 100 +
                                                  6000 * 3 + 3000),
                                          box_size=(100, 100))
                elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                      center=(300,
                                              -3000 + 100 + 6000 * 3 + 3000),
                                      box_size=(100, 100))
                elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                      center=(300, -3000 - 100),
                                      box_size=(100, 100))

            return elems
Exemplo n.º 9
0
        def _generate_elements(self, elems):

                elems += i3.PolygonText(layer=i3.TECH.PPLAYER.WG.TEXT,
                                        text='Name={}_port_15'.format(self.cell.mmi1_21.get_default_view(i3.LayoutView).name),
                                        coordinate=(200.0, 100.0),
                                        alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                        font=2,
                                        height=20.0)


                return elems
Exemplo n.º 10
0
        def _generate_elements(self, elems):

                elems += i3.PolygonText(layer=i3.TECH.PPLAYER.WG.TEXT,
                                        text='Name={}_{}'.format(self.cell.mmi22.get_default_view(i3.LayoutView).name, self.cell.wg_t1.name),
                                        coordinate=(1300.0, 100.0),
                                        alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                        font=2,
                                        height=20.0)

                elems += i3.PolygonText(layer=i3.TECH.PPLAYER.WG.TEXT,
                                        text='Name={}_{}'.format(self.cell.mmi22.get_default_view(i3.LayoutView).name,
                                                                 self.cell.wg_t1.name),
                                        coordinate=(-2000.0, -150.0),
                                        alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                        font=2,
                                        height=200.0,
                                        transformation=i3.Rotation((0.0, 0.0), 90.0))


                return elems
Exemplo n.º 11
0
        def _generate_elements(self, elems):
            for counter in range(0, 24, 1):
                elems += i3.PolygonText(
                    layer=i3.TECH.PPLAYER.WG.TEXT,
                    text="{}".format(str(counter)),
                    # coordinate=(1300.0, 100.0),
                    # alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                    font=2,
                    height=70.0,
                    transformation=i3.Translation((300, 100 + 150 * counter)))
                elems += i3.PolygonText(
                    layer=i3.TECH.PPLAYER.WG.TEXT,
                    text="{}".format(str(counter)),
                    # coordinate=(1300.0, 100.0),
                    # alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                    font=2,
                    height=70.0,
                    transformation=i3.Translation(
                        (5700, 1100 + 150 * counter)))

            return elems
Exemplo n.º 12
0
 def _generate_elements(self, elems):
     # The shape of the coupon you want to print
     for i in range(16):
         elems += i3.PolygonText(layer=i3.Layer(5),
                                 coordinate=(500, -3 + i * 30),
                                 text=str(300 + i * 50),
                                 alignment=(i3.TEXT.ALIGN.CENTER,
                                            i3.TEXT.ALIGN.TOP),
                                 font=i3.TEXT.FONT.DEFAULT,
                                 height=22,
                                 transformation=i3.Rotation((0.0, 0.0),
                                                            0.0))
         elems += i3.PolygonText(layer=i3.Layer(5),
                                 coordinate=(4950, -3 + i * 30),
                                 text=str(300 + i * 50),
                                 alignment=(i3.TEXT.ALIGN.CENTER,
                                            i3.TEXT.ALIGN.TOP),
                                 font=i3.TEXT.FONT.DEFAULT,
                                 height=22,
                                 transformation=i3.Rotation((0.0, 0.0),
                                                            0.0))
     for i in range(16):
         elems += i3.PolygonText(layer=i3.Layer(5),
                                 coordinate=(500, 507 + i * 30),
                                 text=str(300 + i * 50),
                                 alignment=(i3.TEXT.ALIGN.CENTER,
                                            i3.TEXT.ALIGN.TOP),
                                 font=i3.TEXT.FONT.DEFAULT,
                                 height=22,
                                 transformation=i3.Rotation((0.0, 0.0),
                                                            0.0))
         elems += i3.PolygonText(layer=i3.Layer(5),
                                 coordinate=(4950, 507 + i * 30),
                                 text=str(300 + i * 50),
                                 alignment=(i3.TEXT.ALIGN.CENTER,
                                            i3.TEXT.ALIGN.TOP),
                                 font=i3.TEXT.FONT.DEFAULT,
                                 height=22,
                                 transformation=i3.Rotation((0.0, 0.0),
                                                            0.0))
     for i in range(16):
         elems += i3.PolygonText(layer=i3.Layer(5),
                                 coordinate=(500, 1017 + i * 30),
                                 text=str(300 + i * 50),
                                 alignment=(i3.TEXT.ALIGN.CENTER,
                                            i3.TEXT.ALIGN.TOP),
                                 font=i3.TEXT.FONT.DEFAULT,
                                 height=22,
                                 transformation=i3.Rotation((0.0, 0.0),
                                                            0.0))
         elems += i3.PolygonText(layer=i3.Layer(5),
                                 coordinate=(4950, 1017 + i * 30),
                                 text=str(300 + i * 50),
                                 alignment=(i3.TEXT.ALIGN.CENTER,
                                            i3.TEXT.ALIGN.TOP),
                                 font=i3.TEXT.FONT.DEFAULT,
                                 height=22,
                                 transformation=i3.Rotation((0.0, 0.0),
                                                            0.0))
     return elems
Exemplo n.º 13
0
        def _generate_elements(self, elems):

            # Center of the structure
            (x0, y0) = self.position

            elems += i3.Rectangle(layer=self.layer,
                                  center=(x0 + 6500 + 2000,
                                          y0 + 600 + (1800 - self.width) / 4),
                                  box_size=(self.length,
                                            (1800 - self.width) / 2))

            elems += i3.Rectangle(
                layer=self.layer,
                center=(x0 + 6500 + 2000,
                        y0 + 600 + self.width + (1800 - self.width) * 3 / 4),
                box_size=(self.length, (1800 - self.width) / 2))

            elems += i3.SRef(
                reference=Interface_mmi12(pocket=self.pocket, tilt=self.tilt))

            if self.pillar:
                self.label = "NO"
                for i in range(7):
                    elems += i3.Rectangle(
                        layer=self.layer,
                        center=(10000 - 725 - i * 750 + 2000,
                                600 + (1800 - self.width) / 2 + 30),  #change
                        box_size=(50, 60))
                    elems += i3.Rectangle(
                        layer=self.layer,
                        center=(10000 - 725 - i * 750 + 2000,
                                600 + (1800 - self.width) / 2 + self.width -
                                30),  #change
                        box_size=(50, 60))
            if self.width > 330:
                self.label += "W"
            if self.pocket:
                self.label += "_WP"
            if self.tilt:
                self.label += "WT"
            elems += i3.PolygonText(
                layer=self.layer_bool,
                text=self.label,
                coordinate=(8000, 2700),
                # alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                font=2,
                height=700.0)

            generated1 = self.layer - self.layer_bool
            mapping = {generated1: self.layer}
            elems = i3.get_elements_for_generated_layers(elems, mapping)
            return elems
Exemplo n.º 14
0
        def _generate_elements(self, elems):
            elems += i3.PolygonText(
                layer=i3.TECH.PPLAYER.WG.TEXT,
                text='Name={}_port_15'.format(
                    self.cell.mmi1_21.get_default_view(i3.LayoutView).name),
                coordinate=(200.0, 100.0),
                alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                font=2,
                height=20.0)

            elems += i3.PolygonText(
                layer=i3.TECH.PPLAYER.WG.TEXT,
                text='Name={}_port_15'.format(
                    self.cell.mmi1_21.get_default_view(i3.LayoutView).name),
                # coordinate=(-4000.0, -1650.0),
                alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                font=2,
                height=200.0,
                transformation=i3.Rotation((0.0, 0.0), 90.0) + i3.Translation(
                    (-2050, -2000)))

            return elems
Exemplo n.º 15
0
        def _generate_elements(self, elems):

            # Center of the structure
            (x0, y0) = self.position

            elems += i3.Rectangle(layer=self.layer, center=(6250, -500),
                                  box_size=(500, 500))

            elems += i3.Rectangle(layer=self.layer, center=(6250, 1000),
                                  box_size=(500, 500))



            elems += i3.Rectangle(layer=self.layer2, center=(9950, 1000),
                                  box_size=(4100, self.width))  # heaters

            elems += i3.Rectangle(layer=self.layer3, center=(9950, 1000),
                                  box_size=(3900, self.width+20))  # heaters during plating

            elems += i3.Rectangle(layer=self.layer, center=(9950 - 4100 / 2+50, 1000),
                                  box_size=(100, self.width))  # heaters butt left

            elems += i3.Rectangle(layer=self.layer, center=(9950 + 4100 / 2 - 50, 1000),
                                  box_size=(100, self.width))  # heaters butt right


            elems += i3.Rectangle(layer=self.layer, center=(9950 - 4100 / 2 + 50-750, 1000),
                                  box_size=(1400, 100))  # left

            elems += i3.Rectangle(layer=self.layer, center=(9950 - 4100 / 2 + 50 - 750-450, -500),
                                  box_size=(500, 100))

            elems += i3.Rectangle(layer=self.layer, center=(9950 + 4100 / 2 - 50, 1000 - (500+self.width) / 2),
                                  box_size=(100, 500))

            elems += i3.Rectangle(layer=self.layer, center=(9450, 1000-self.width/2-450),
                                  box_size=(4900, 100))

            elems += i3.Rectangle(layer=self.layer, center=(5050 + 4100 / 2 - 50, -550+(1000-self.width/2+50)/2),
                                  box_size=(100, 1000-self.width/2+50))

            elems += i3.PolygonText(layer=i3.TECH.PPLAYER.WG.TEXT,
                                    text="width_{}".format(self.width),
                                    # coordinate=(1300.0, 100.0),
                                    alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                    font=2,
                                    height=400.0,
                                    transformation=i3.Translation((8000, 0))
                                    )

            return elems
Exemplo n.º 16
0
        def _generate_elements(self, elems):
            # Center of the structure
            (x0, y0) = self.position
            x = 6200
            y = 8000
            Height = 300
            elems += i3.PolygonText(layer=self.layer,
                                    text="1N",
                                    # coordinate=(1300.0, 100.0),
                                    # alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                    font=2,
                                    height=Height,
                                    transformation=i3.Translation((x0, y0))
                                    )
            elems += i3.PolygonText(layer=self.layer,
                                    text="5J",
                                    # coordinate=(1300.0, 100.0),
                                    # alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                    font=2,
                                    height=Height,
                                    transformation=i3.Translation((x0 + 1 * x, y0 + 1 * y+700))
                                    )
            elems += i3.PolygonText(layer=self.layer,
                                    text="4W",
                                    # coordinate=(1300.0, 100.0),
                                    # alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                    font=2,
                                    height=Height,
                                    transformation=i3.Translation((x0 + 0 * x, y0 + 1 * y))
                                    )
            elems += i3.PolygonText(layer=self.layer,
                                    text="2E",
                                    # coordinate=(1300.0, 100.0),
                                    # alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                    font=2,
                                    height=Height,
                                    transformation=i3.Translation((x0 + 1 * x, y0 + 0 * y+1100))
                                    )
            elems += i3.PolygonText(layer=self.layer,
                                    text="3W",
                                    # coordinate=(1300.0, 100.0),
                                    # alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                    font=2,
                                    height=Height,
                                    transformation=i3.Translation((x0 + 2 * x, y0 + 0 * y))
                                    )
            elems += i3.PolygonText(layer=self.layer,
                                    text="6E",
                                    # coordinate=(1300.0, 100.0),
                                    # alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                                    font=2,
                                    height=Height,
                                    transformation=i3.Translation((x0 + 2 * x, y0 + 1 * y))
                                    )

            return elems
Exemplo n.º 17
0
		def _generate_elements(self, elems):
		
			elems += i3.PolygonText(layer= i3.TECH.PPLAYER.WG.TEXT, text='period={}_duty={}_n={}_width={}'.format(self.periodin,
		                                                                                                      self.dutyin,
			                                                                                              self.nperiodsin,
		                                                                                                      self.core),
		                                #coordinate=(-(op[0]-ip[0])/2-1000.0, -(self.n+0.5)*counter*sx-50.0),
		                                #alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
		                                #font = 2,
		                                #height=20.0)


		                                coordinate=(0.0, -20),
		                                alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
		                                font = 2,
		                                height=20.0)                
			return elems
Exemplo n.º 18
0
        def _generate_elements(self, elems):
            # Center of the structure
            (x0, y0) = self.position

            for i in range(0, 4, 1):
                for j in range(0, 3, 1):
                    elems += i3.Rectangle(layer=self.layer,
                                          center=(x0 + i * 6000,
                                                  y0 + j * 7000),
                                          box_size=(100, 100))
                    elems += i3.Rectangle(layer=self.layer,
                                          center=(x0 + 200 + i * 6000,
                                                  y0 + j * 7000),
                                          box_size=(100, 100))
                    elems += i3.Rectangle(layer=self.layer,
                                          center=(x0 + i * 6000,
                                                  y0 + 200 + j * 7000),
                                          box_size=(100, 100))
                    elems += i3.Rectangle(layer=self.layer,
                                          center=(x0 + i * 6000 + 200,
                                                  y0 + 200 + j * 7000),
                                          box_size=(100, 100))
                    for k in range(0, 20, 1):
                        elems += i3.Rectangle(
                            layer=self.layer,
                            center=(-1000 + 0 + i * 6000,
                                    1000 + 10 * k + j * 7000),
                            box_size=(500, 0.6 + 0.2 * k))
                        elems += i3.PolygonText(
                            layer=self.layer,
                            text="{}".format(str(k)),
                            # coordinate=(1300.0, 100.0),
                            # alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                            font=2,
                            height=7.0,
                            transformation=i3.Translation(
                                (-1000 + 260 + i * 6000,
                                 1000 + 3 + 10 * k + j * 7000)))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.NONE.DOC,
                                  center=(9000, 7500),
                                  box_size=(21000, 16000))
            # elems += i3.Rectangle(layer=i3.TECH.PPLAYER.CONTACT.PILLAR, center=(8500, 7500),
            #                       box_size=(22000, 18000))

            return elems
Exemplo n.º 19
0
        def _generate_elements(self, elems):
            for counter, child in enumerate(self.DC_list):
                name = child.name
                # aa = child.layout.trace_length()

                elems += i3.PolygonText(
                    layer=i3.TECH.PPLAYER.WG.TEXT,
                    text="{}".format(name),
                    # coordinate=(4650.0, 100.0),
                    alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                    font=2,
                    height=150.0,
                    transformation=i3.Translation(
                        (300 + 3500 * counter, -3200)))

                # elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                #                       center=(0, 0),
                #                       box_size=(500, 300))
            return elems
Exemplo n.º 20
0
        def _generate_elements(self, elems):

            # Center of the structure
            (x0, y0) = self.position
            # width2 = 338 + 15 + 15

            elems += i3.Rectangle(layer=self.layer,
                                  center=(8750 - 15 - 10 + 5, 1500),
                                  box_size=(500 - 40, 1800 - 100))

            elems += i3.Rectangle(layer=self.layer,
                                  center=(10500 - 15 - 10, 1500),
                                  box_size=(3000 + 50, 145))

            elems += i3.Rectangle(layer=self.layer,
                                  center=(8750 - 15 - 10 + 5 + 2420 - 150,
                                          1000 - 120),
                                  box_size=(2000, 500 - 40))  #extra pad

            elems += i3.Rectangle(
                layer=self.layer_bool,
                center=(8750 - 15 - 10 + 5 + 2420 - 150 + 998,
                        1000 - 120 + 620),
                box_size=(4, 145))  #extra shrink on the interface

            for i in range(4):
                elems += i3.Rectangle(layer=self.layer,
                                      center=(10000 - 725 - i * 750 + 2000 +
                                              350 + self.offset, 1316 + 72.75),
                                      box_size=(145, 77.5))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(10000 - 725 - i * 750 + 2000 + 350 + self.offset,
                            1684 - 72.75),  # change
                    box_size=(145, 77.5))

            # Avoid solder spill on facet
            elems += i3.Rectangle(layer=self.layer_bool,
                                  center=(12000 - 20, 1500),
                                  box_size=(40, 50))
            elems += i3.Rectangle(layer=self.layer_bool,
                                  center=(12000 - 750 * 2, 1500),
                                  box_size=(80, 50))
            elems += i3.Rectangle(layer=self.layer_bool,
                                  center=(12000 - 750 * 3, 1500),
                                  box_size=(80, 50))
            elems += i3.Rectangle(layer=self.layer_bool,
                                  center=(12000 - 750 * 4, 1500),
                                  box_size=(80, 50))

            # reservoir
            if self.reservoir:
                for i in range(3):
                    elems += i3.Rectangle(layer=self.layer,
                                          center=(-750 * i + 12000 - 750,
                                                  1572.5 + 20),
                                          box_size=(149, 40))
                    elems += i3.Rectangle(layer=self.layer,
                                          center=(-750 * i + 12000 - 750,
                                                  1427.5 - 20),
                                          box_size=(149, 40))
                    elems += i3.Rectangle(layer=self.layer,
                                          center=(-750 * i + 12000 - 750,
                                                  1572.5 + 20),
                                          box_size=(149, 40))
                    elems += i3.Rectangle(layer=self.layer,
                                          center=(-750 * i + 12000 - 750,
                                                  1427.5 - 20),
                                          box_size=(149, 40))
                    elems += i3.Rectangle(layer=self.layer,
                                          center=(-750 * i + 12000 - 750,
                                                  1572.5 + 20),
                                          box_size=(149, 40))
                    elems += i3.Rectangle(layer=self.layer,
                                          center=(-750 * i + 12000 - 750,
                                                  1427.5 - 20),
                                          box_size=(149, 40))
                elems += i3.PolygonText(
                    layer=self.layer,
                    text="RE",
                    coordinate=(12000, 2600),
                    # alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                    font=2,
                    height=400.0)

            # Markers
            bigsquare = 16.5
            smallsquare = 11.5
            for i in range(-3, 0, 2):
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 78, 1568.75),
                                      box_size=(9, 9.5))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 49.5,
                                              1572 - 32),
                                      box_size=(9, 9))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 49.5 - 57,
                                              1572 - 32),
                                      box_size=(9, 9))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 78,
                                              1568.75 - 57.5),
                                      box_size=(9, 9.5))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 58.75,
                                              1572.5 - 13.25),
                                      box_size=(smallsquare, smallsquare))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 58.75 - 38.5,
                                              1572.5 - 13.25),
                                      box_size=(smallsquare, smallsquare))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 58.75,
                                              1572.5 - 13.25 - 38.5),
                                      box_size=(smallsquare, smallsquare))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 58.75 - 38.5,
                                              1572.5 - 13.25 - 38.5),
                                      box_size=(smallsquare, smallsquare))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 78, 1568.75-80), box_size=(7, 7.5))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 49.5, 1572 - 32-80), box_size=(7, 7))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 49.5 - 57, 1572 - 32-80), box_size=(7, 7))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 78, 1568.75 - 57.5-80), box_size=(7, 7.5))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75-2.5, 1572.5 - 13.25-80-2.5), box_size=(bigsquare, bigsquare))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75 - 38.5+2.5, 1572.5 - 13.25-80-2.5),
                #                       box_size=(bigsquare, bigsquare))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75-2.5, 1572.5 - 13.25 - 38.5-80+2.5),
                #                       box_size=(bigsquare, bigsquare))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75 - 38.5+2.5, 1572.5 - 13.25 - 38.5-80+2.5),
                #                       box_size=(bigsquare, bigsquare))

                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 78-594, 1568.75), box_size=(7, 7.5))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 49.5-594, 1572 - 32), box_size=(7, 7))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 49.5 - 57-594, 1572 - 32), box_size=(7, 7))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 78-594, 1568.75 - 57.5), box_size=(7, 7.5))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75-594-2.5, 1572.5 - 13.25-2.5), box_size=(bigsquare, bigsquare))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75 - 38.5-594+2.5, 1572.5 - 13.25-2.5),
                #                       box_size=(bigsquare, bigsquare))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75-594-2.5, 1572.5 - 13.25 - 38.5+2.5),
                #                       box_size=(bigsquare, bigsquare))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75 - 38.5-594+2.5, 1572.5 - 13.25 - 38.5+2.5),
                #                       box_size=(bigsquare, bigsquare))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 78 - 594,
                                              1568.75 - 80),
                                      box_size=(9, 9.5))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 49.5 - 594,
                                              1572 - 32 - 80),
                                      box_size=(9, 9))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 49.5 - 57 -
                                              594, 1572 - 32 - 80),
                                      box_size=(9, 9))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 78 - 594,
                                              1568.75 - 57.5 - 80),
                                      box_size=(9, 9.5))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 58.75 - 594,
                                              1572.5 - 13.25 - 80),
                                      box_size=(smallsquare, smallsquare))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 58.75 - 38.5 -
                                              594, 1572.5 - 13.25 - 80),
                                      box_size=(smallsquare, smallsquare))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 58.75 - 594,
                                              1572.5 - 13.25 - 38.5 - 80),
                                      box_size=(smallsquare, smallsquare))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 58.75 - 38.5 -
                                              594, 1572.5 - 13.25 - 38.5 - 80),
                                      box_size=(smallsquare, smallsquare))

            for i in range(-2, 1, 2):
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 78, 1568.75), box_size=(7, 7.5))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 49.5, 1572-32), box_size=(7, 7))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 49.5-57, 1572-32), box_size=(7, 7))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 78, 1568.75-57.5), box_size=(7, 7.5))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75, 1572.5-13.25), box_size=(smallsquare, smallsquare))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75-38.5, 1572.5 - 13.25), box_size=(smallsquare, smallsquare))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75, 1572.5 - 13.25-38.5), box_size=(smallsquare, smallsquare))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75-38.5, 1572.5 - 13.25-38.5), box_size=(smallsquare, smallsquare))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 78,
                                              1568.75 - 80),
                                      box_size=(9, 9.5))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 49.5,
                                              1572 - 32 - 80),
                                      box_size=(9, 9))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 49.5 - 57,
                                              1572 - 32 - 80),
                                      box_size=(9, 9))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 78,
                                              1568.75 - 57.5 - 80),
                                      box_size=(9, 9.5))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 58.75 - 2.5,
                                              1572.5 - 13.25 - 80 - 2.5),
                                      box_size=(bigsquare, bigsquare))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 58.75 - 38.5 +
                                              2.5, 1572.5 - 13.25 - 80 - 2.5),
                                      box_size=(bigsquare, bigsquare))
                elems += i3.Rectangle(
                    layer=self.layer_bool,
                    center=(750 * i + 12000 - 58.75 - 2.5,
                            1572.5 - 13.25 - 38.5 - 80 + 2.5),
                    box_size=(bigsquare, bigsquare))
                elems += i3.Rectangle(
                    layer=self.layer_bool,
                    center=(750 * i + 12000 - 58.75 - 38.5 + 2.5,
                            1572.5 - 13.25 - 38.5 - 80 + 2.5),
                    box_size=(bigsquare, bigsquare))

                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 78 - 594,
                                              1568.75),
                                      box_size=(9, 9.5))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 49.5 - 594,
                                              1572 - 32),
                                      box_size=(9, 9))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 49.5 - 57 -
                                              594, 1572 - 32),
                                      box_size=(9, 9))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 78 - 594,
                                              1568.75 - 57.5),
                                      box_size=(9, 9.5))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 58.75 - 594 -
                                              2.5, 1572.5 - 13.25 - 2.5),
                                      box_size=(bigsquare, bigsquare))
                elems += i3.Rectangle(layer=self.layer_bool,
                                      center=(750 * i + 12000 - 58.75 - 38.5 -
                                              594 + 2.5, 1572.5 - 13.25 - 2.5),
                                      box_size=(bigsquare, bigsquare))
                elems += i3.Rectangle(
                    layer=self.layer_bool,
                    center=(750 * i + 12000 - 58.75 - 594 - 2.5,
                            1572.5 - 13.25 - 38.5 + 2.5),
                    box_size=(bigsquare, bigsquare))
                elems += i3.Rectangle(
                    layer=self.layer_bool,
                    center=(750 * i + 12000 - 58.75 - 38.5 - 594 + 2.5,
                            1572.5 - 13.25 - 38.5 + 2.5),
                    box_size=(bigsquare, bigsquare))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 78-594, 1568.75 - 80), box_size=(7, 7.5))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 49.5-594, 1572 - 32 - 80), box_size=(7, 7))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 49.5 - 57-594, 1572 - 32 - 80), box_size=(7, 7))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 78-594, 1568.75 - 57.5 - 80), box_size=(7, 7.5))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75 -594, 1572.5 - 13.25 - 80 ),
                #                       box_size=(smallsquare, smallsquare))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75 - 38.5 -594, 1572.5 - 13.25 - 80 ),
                #                       box_size=(smallsquare, smallsquare))
                # elems += i3.Rectangle(layer=self.layer_bool, center=(750*i+12000 - 58.75 -594, 1572.5 - 13.25 - 38.5 - 80 ),
                #                       box_size=(smallsquare, smallsquare))
                # elems += i3.Rectangle(layer=self.layer_bool,
                #                       center=(750*i+12000 - 58.75 - 38.5 -594, 1572.5 - 13.25 - 38.5 - 80 ),
                #                       box_size=(smallsquare, smallsquare))

            generated1 = self.layer - self.layer_bool
            mapping = {generated1: self.layer}
            elems = i3.get_elements_for_generated_layers(elems, mapping)
            return elems
Exemplo n.º 21
0
        def _generate_elements(self, elems):

            # Center of the structure
            (x0, y0) = self.position
            width2 = 450.0
            elems += i3.Rectangle(layer=self.layer,
                                  center=(x0 + 6500 + 2000 + 2000,
                                          600 + (1800 - width2) / 4),
                                  box_size=(3000, (1800 - width2) / 2))

            elems += i3.Rectangle(layer=self.layer,
                                  center=(x0 + 6500 + 2000 + 2000, y0 + 600 +
                                          width2 + (1800 - width2) * 3 / 4),
                                  box_size=(3000, (1800 - width2) / 2))

            elems += i3.SRef(
                reference=Interface_mmi12(pocket=self.pocket, tilt=self.tilt))

            if self.pillar:
                self.label = "NO"
                for i in range(4):
                    elems += i3.Rectangle(
                        layer=self.layer,
                        center=(10000 - 725 - i * 750 + 2000 + 550,
                                1275 + self.width / 2),
                        box_size=(self.length, self.width))
                    elems += i3.Rectangle(
                        layer=self.layer,
                        center=(10000 - 725 - i * 750 + 2000 + 550,
                                1725 - self.width / 2),  # change
                        box_size=(self.length, self.width))

                    if self.double:
                        elems += i3.Rectangle(
                            layer=self.layer,
                            center=(10000 - 725 - i * 750 + 2000 + 550 - 400,
                                    1275 + self.width / 2),
                            box_size=(self.length, self.width))
                        elems += i3.Rectangle(
                            layer=self.layer,
                            center=(10000 - 725 - i * 750 + 2000 + 550 - 400,
                                    1725 - self.width / 2),
                            # change
                            box_size=(self.length, self.width))

            if self.width > 120:
                self.label += "W"
            if self.pocket:
                self.label += "_WP"
            if self.tilt:
                self.label += "WT"
            elems += i3.PolygonText(
                layer=self.layer_bool,
                text=self.label,
                coordinate=(10800, 2600),
                # alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                font=2,
                height=400.0)

            generated1 = self.layer - self.layer_bool
            mapping = {generated1: self.layer}
            elems = i3.get_elements_for_generated_layers(elems, mapping)

            if self.pillar:
                for i in range(4):
                    elems += i3.Rectangle(
                        layer=self.layer2,
                        center=(10000 - 725 - i * 750 + 2000 + 550,
                                1275 + self.width / 2),
                        box_size=(self.length + 10, self.width + 10))
                    elems += i3.Rectangle(
                        layer=self.layer2,
                        center=(10000 - 725 - i * 750 + 2000 + 550,
                                1725 - self.width / 2),  # change
                        box_size=(self.length + 10, self.width + 10))

                    if self.double:
                        elems += i3.Rectangle(
                            layer=self.layer2,
                            center=(10000 - 725 - i * 750 + 2000 + 550 - 400,
                                    1275 + self.width / 2),
                            box_size=(self.length + 10, self.width + 10))
                        elems += i3.Rectangle(
                            layer=self.layer2,
                            center=(10000 - 725 - i * 750 + 2000 + 550 - 400,
                                    1725 - self.width / 2),
                            # change
                            box_size=(self.length + 10, self.width + 10))

            return elems
 def _generate_elements(self, elems):
     elems += i3.PolygonText(layer=i3.TECH.PPLAYER.CH2.TRENCH,
                             coordinate=(0., 0.),
                             text=self.text,
                             height=self.font_size)
     return elems
Exemplo n.º 23
0
        def _generate_elements(self, elems):

            for i in range(0, 5, 1):
                elems += i3.PolygonText(
                    layer=i3.TECH.PPLAYER.WG.TEXT,
                    text="WITDH={}_length={}*2_R=500".format(
                        str(self.width), 17000 - 4000 * i),
                    coordinate=(900, 55 + 4000 * i + 100 * self.offset),
                    font=2,
                    height=20.0,
                )
                for j in range(0, 13, 1):
                    elems += i3.PolygonText(
                        layer=i3.TECH.PPLAYER.WG.TEXT,
                        text="{}_{}".format(str(i), str(j)),
                        coordinate=(550, 63 + 4000 * i + 100 * j),
                        font=2,
                        height=30.0,
                    )
                    elems += i3.PolygonText(
                        layer=i3.TECH.PPLAYER.WG.TEXT,
                        text="{}_{}".format(str(i), str(j)),
                        # coordinate=(),
                        font=2,
                        height=30.0,
                        transformation=i3.Rotation(rotation=-90) +
                        i3.Translation(
                            (20000 - 4000 * i - 100 * j + 63, 20000 - 550)),
                    )
            for i in range(0, 6, 1):
                elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                      center=(100, 4000 * i - 1000 + 700),
                                      box_size=(100, 100))
                elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                      center=(300, 4000 * i - 1000 + 700),
                                      box_size=(100, 100))
                elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                      center=(4000 * i + 300, 19700),
                                      box_size=(100, 100))
                elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                      center=(4000 * i + 300, 19900),
                                      box_size=(100, 100))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                  center=(100, 19900),
                                  box_size=(100, 100))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                  center=(-100, 19900),
                                  box_size=(100, 100))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                  center=(500, 19900),
                                  box_size=(100, 100))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                  center=(100, 19500),
                                  box_size=(100, 100))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                  center=(100, 20100),
                                  box_size=(100, 100))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                  center=(-100, -500),
                                  box_size=(100, 100))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                  center=(100, -500),
                                  box_size=(100, 100))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                  center=(300, -500),
                                  box_size=(100, 100))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                  center=(500, -500),
                                  box_size=(100, 100))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                  center=(20500, 19500),
                                  box_size=(100, 100))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                  center=(20500, 19700),
                                  box_size=(100, 100))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                  center=(20500, 19900),
                                  box_size=(100, 100))
            elems += i3.Rectangle(layer=i3.TECH.PPLAYER.WG.TEXT,
                                  center=(20500, 20100),
                                  box_size=(100, 100))

            return elems
Exemplo n.º 24
0
        def _generate_elements(self, elems):
            # Center of the structure
            (x0, y0) = self.position
            # RELEASE

            c1 = Coupon(length=2750, nb=16)  #2750 label A no need for shrink
            elems += i3.SRef(reference=c1,
                             position=self.position,
                             transformation=i3.Translation(
                                 (0, 0)) + i3.Translation((-16000, -25000)))
            elems += i3.PolygonText(layer=i3.Layer(number=4, name="release"),
                                    text="A16",
                                    font=2,
                                    height=1000.0,
                                    transformation=i3.Translation(
                                        (45075, -12500)))
            c2 = Coupon(length=2250, shrink=500, nb=16)
            elems += i3.SRef(reference=c2,
                             position=self.position,
                             transformation=i3.Translation(
                                 (0, 23240)) + i3.Translation(
                                     (-16000, -25000)))
            elems += i3.PolygonText(layer=i3.Layer(number=4, name="release"),
                                    text="B16",
                                    font=2,
                                    height=200.0,
                                    transformation=i3.Translation(
                                        (35865, 20437.5)))

            c3 = Coupon(length=1500, shrink=1250, nb=16)
            elems += i3.SRef(reference=c3,
                             position=self.position,
                             transformation=i3.Translation(
                                 (0, 46480)) + i3.Translation(
                                     (-16000, -25000)))
            elems += i3.PolygonText(layer=i3.Layer(number=4, name="release"),
                                    text="C16",
                                    font=2,
                                    height=1000.0,
                                    transformation=i3.Translation(
                                        (-10000, 46677.5)))

            c4 = Coupon(length=2750, nb=8)
            elems += i3.SRef(reference=c4,
                             position=self.position,
                             transformation=i3.Translation((-28000, -38160)))
            elems += i3.PolygonText(layer=i3.Layer(number=4, name="release"),
                                    text="A8",
                                    font=2,
                                    height=1000.0,
                                    transformation=i3.Translation(
                                        (32650, -30000)))
            c5 = Coupon(length=2250, shrink=500, nb=12)
            elems += i3.SRef(reference=c5,
                             position=self.position,
                             transformation=i3.Rotation(rotation=90) +
                             i3.Translation((-18417.5, -23917.5)))
            elems += i3.PolygonText(layer=i3.Layer(number=4, name="release"),
                                    text="B12",
                                    font=2,
                                    height=1000.0,
                                    transformation=i3.Translation(
                                        (-27695, 29707.5)))
            c6 = Coupon(length=1500, shrink=1250, nb=10)
            elems += i3.SRef(reference=c6,
                             position=self.position,
                             transformation=i3.Rotation(rotation=90) +
                             i3.Translation((-36617.5, -23917.5)))
            elems += i3.PolygonText(layer=i3.Layer(number=4, name="release"),
                                    text="C10",
                                    font=2,
                                    height=1000.0,
                                    transformation=i3.Translation(
                                        (-40000, 18832.5)))
            c7 = Coupon(length=1500, shrink=1250, nb=10)
            elems += i3.SRef(reference=c7,
                             position=self.position,
                             transformation=i3.Translation((-22000, -53840)))
            elems += i3.PolygonText(layer=i3.Layer(number=4, name="release"),
                                    text="C10",
                                    font=2,
                                    height=1000.0,
                                    transformation=i3.Translation(
                                        (20950, -41500)))

            c8 = Coupon(length=2250, shrink=500, nb=14)
            elems += i3.SRef(reference=c8,
                             position=self.position,
                             transformation=i3.Translation((38750, -1760)))
            elems += i3.PolygonText(layer=i3.Layer(number=4, name="release"),
                                    text="B14",
                                    font=2,
                                    height=1000.0,
                                    transformation=i3.Translation(
                                        (48000, -3802.5)))
            c9 = Coupon(length=1500, shrink=1250, nb=14)
            elems += i3.SRef(reference=c9,
                             position=self.position,
                             transformation=i3.Translation((27500, 21480)))
            elems += i3.PolygonText(layer=i3.Layer(number=4, name="release"),
                                    text="C14",
                                    font=2,
                                    height=200.0,
                                    transformation=i3.Translation(
                                        (44000, 20437.5)))

            elems += i3.Circle(layer=i3.Layer(number=5, name="tether"),
                               center=(0.0, 0.0),
                               radius=50000)
            return elems
Exemplo n.º 25
0
        def _generate_elements(self, elems):

            # Center of the structure
            (x0, y0) = self.position

            shift = 0.5 * self.cross_width + self.cross_margin
            square_length = 0.5 * self.cross_length - shift

            if (self.complement == False and self.protection == False):

                # Add cross
                elems += i3.Rectangle(layer=self.layer,
                                      center=(x0, y0),
                                      box_size=(self.cross_length,
                                                self.cross_width))
                elems += i3.Rectangle(layer=self.layer,
                                      center=(x0, y0),
                                      box_size=(self.cross_width,
                                                self.cross_length))

                # Add rectangles left VERNIER
                elems += i3.Rectangle(layer=self.layer,
                                      center=(self.vernier_left_center[0],
                                              self.vernier_left_center[1]),
                                      box_size=(self.vernier_length,
                                                self.vernier_width))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0],
                            self.vernier_left_center[1] + self.vernier_period),
                    box_size=(self.vernier_length, self.vernier_width))
                elems += i3.Rectangle(layer=self.layer,
                                      center=(self.vernier_left_center[0],
                                              self.vernier_left_center[1] +
                                              2.0 * self.vernier_period),
                                      box_size=(self.vernier_length,
                                                self.vernier_width))
                elems += i3.Rectangle(layer=self.layer,
                                      center=(self.vernier_left_center[0],
                                              self.vernier_left_center[1] +
                                              3.0 * self.vernier_period),
                                      box_size=(self.vernier_length,
                                                self.vernier_width))
                elems += i3.Rectangle(layer=self.layer,
                                      center=(self.vernier_left_center[0],
                                              self.vernier_left_center[1] +
                                              4.0 * self.vernier_period),
                                      box_size=(self.vernier_length,
                                                self.vernier_width))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0],
                            self.vernier_left_center[1] - self.vernier_period),
                    box_size=(self.vernier_length, self.vernier_width))
                elems += i3.Rectangle(layer=self.layer,
                                      center=(self.vernier_left_center[0],
                                              self.vernier_left_center[1] -
                                              2.0 * self.vernier_period),
                                      box_size=(self.vernier_length,
                                                self.vernier_width))
                elems += i3.Rectangle(layer=self.layer,
                                      center=(self.vernier_left_center[0],
                                              self.vernier_left_center[1] -
                                              3.0 * self.vernier_period),
                                      box_size=(self.vernier_length,
                                                self.vernier_width))
                elems += i3.Rectangle(layer=self.layer,
                                      center=(self.vernier_left_center[0],
                                              self.vernier_left_center[1] -
                                              4.0 * self.vernier_period),
                                      box_size=(self.vernier_length,
                                                self.vernier_width))

                # Add rectangles top VERNIER
                elems += i3.Rectangle(layer=self.layer,
                                      center=(self.vernier_top_center[0],
                                              self.vernier_top_center[1]),
                                      box_size=(self.vernier_width,
                                                self.vernier_length))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] + self.vernier_period,
                            self.vernier_top_center[1]),
                    box_size=(self.vernier_width, self.vernier_length))
                elems += i3.Rectangle(layer=self.layer,
                                      center=(self.vernier_top_center[0] +
                                              2.0 * self.vernier_period,
                                              self.vernier_top_center[1]),
                                      box_size=(self.vernier_width,
                                                self.vernier_length))
                elems += i3.Rectangle(layer=self.layer,
                                      center=(self.vernier_top_center[0] +
                                              3.0 * self.vernier_period,
                                              self.vernier_top_center[1]),
                                      box_size=(self.vernier_width,
                                                self.vernier_length))
                elems += i3.Rectangle(layer=self.layer,
                                      center=(self.vernier_top_center[0] +
                                              4.0 * self.vernier_period,
                                              self.vernier_top_center[1]),
                                      box_size=(self.vernier_width,
                                                self.vernier_length))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] - self.vernier_period,
                            self.vernier_top_center[1]),
                    box_size=(self.vernier_width, self.vernier_length))
                elems += i3.Rectangle(layer=self.layer,
                                      center=(self.vernier_top_center[0] -
                                              2.0 * self.vernier_period,
                                              self.vernier_top_center[1]),
                                      box_size=(self.vernier_width,
                                                self.vernier_length))
                elems += i3.Rectangle(layer=self.layer,
                                      center=(self.vernier_top_center[0] -
                                              3.0 * self.vernier_period,
                                              self.vernier_top_center[1]),
                                      box_size=(self.vernier_width,
                                                self.vernier_length))
                elems += i3.Rectangle(layer=self.layer,
                                      center=(self.vernier_top_center[0] -
                                              4.0 * self.vernier_period,
                                              self.vernier_top_center[1]),
                                      box_size=(self.vernier_width,
                                                self.vernier_length))

                # Add TEXT
                elems += i3.PolygonText(layer=self.layer,
                                        coordinate=(x0, y0 - 100.0),
                                        text=self.layer_text,
                                        height=35.0)

            elif (self.complement == True and self.protection == False):

                # Add squares
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(x0 - 0.25 * self.cross_length - 0.5 * shift,
                            y0 + 0.25 * self.cross_length + 0.5 * shift),
                    box_size=(square_length, square_length))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(x0 + 0.25 * self.cross_length + 0.5 * shift,
                            y0 + 0.25 * self.cross_length + 0.5 * shift),
                    box_size=(square_length, square_length))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(x0 - 0.25 * self.cross_length - 0.5 * shift,
                            y0 - 0.25 * self.cross_length - 0.5 * shift),
                    box_size=(square_length, square_length))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(x0 + 0.25 * self.cross_length + 0.5 * shift,
                            y0 - 0.25 * self.cross_length - 0.5 * shift),
                    box_size=(square_length, square_length))

                # Add rectangles left VERNIER
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_long_length,
                            self.vernier_left_center[1]),
                    box_size=(self.vernier_complement_long_length,
                              self.vernier_complement_width))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_long_length,
                            self.vernier_left_center[1]),
                    box_size=(self.vernier_complement_long_length,
                              self.vernier_complement_width))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] +
                            self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] +
                            self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] +
                            2.0 * self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] +
                            2.0 * self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] +
                            3.0 * self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] +
                            3.0 * self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] +
                            4.0 * self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] +
                            4.0 * self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] -
                            self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] -
                            self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] -
                            2.0 * self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] -
                            2.0 * self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] -
                            3.0 * self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] -
                            3.0 * self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] -
                            4.0 * self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_left_center[0] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length,
                            self.vernier_left_center[1] -
                            4.0 * self.vernier_complement_period),
                    box_size=(self.vernier_complement_length,
                              self.vernier_complement_width))

                # Add rectangles top VERNIER
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0],
                            self.vernier_top_center[1] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_long_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_long_length))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0],
                            self.vernier_top_center[1] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_long_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_long_length))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] +
                            self.vernier_complement_period,
                            self.vernier_top_center[1] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] +
                            self.vernier_complement_period,
                            self.vernier_top_center[1] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] +
                            2.0 * self.vernier_complement_period,
                            self.vernier_top_center[1] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] +
                            2.0 * self.vernier_complement_period,
                            self.vernier_top_center[1] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] +
                            3.0 * self.vernier_complement_period,
                            self.vernier_top_center[1] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] +
                            3.0 * self.vernier_complement_period,
                            self.vernier_top_center[1] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] +
                            4.0 * self.vernier_complement_period,
                            self.vernier_top_center[1] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] +
                            4.0 * self.vernier_complement_period,
                            self.vernier_top_center[1] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] -
                            self.vernier_complement_period,
                            self.vernier_top_center[1] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] -
                            self.vernier_complement_period,
                            self.vernier_top_center[1] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] -
                            2.0 * self.vernier_complement_period,
                            self.vernier_top_center[1] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] -
                            2.0 * self.vernier_complement_period,
                            self.vernier_top_center[1] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] -
                            3.0 * self.vernier_complement_period,
                            self.vernier_top_center[1] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] -
                            3.0 * self.vernier_complement_period,
                            self.vernier_top_center[1] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))

                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] -
                            4.0 * self.vernier_complement_period,
                            self.vernier_top_center[1] -
                            self.vernier_complement_shift -
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))
                elems += i3.Rectangle(
                    layer=self.layer,
                    center=(self.vernier_top_center[0] -
                            4.0 * self.vernier_complement_period,
                            self.vernier_top_center[1] +
                            self.vernier_complement_shift +
                            0.5 * self.vernier_complement_length),
                    box_size=(self.vernier_complement_width,
                              self.vernier_complement_length))

            else:
                elems += i3.Rectangle(layer=self.layer,
                                      center=(x0 - 43.5, y0 + 11.5),
                                      box_size=(self.protection_length,
                                                self.protection_width))

            return elems
Exemplo n.º 26
0
        def _generate_elements(self, elems):
            # We calculate the lengths of the 2 spirals in this pcell.
            # Note that we assume that there are exactly 2 spirals in this list.
            #assert len(self.Spiral_list) == 2
            lengths = get_lengths(self)[0]
            print lengths
            Link = get_lengths(self)[1]
            print Link
            if self.tipo == 1:

                sx = 70
                for counter, (child, length) in enumerate(
                        zip(self.s_length_vec, lengths)):
                    #ip= child.ports["in"].position
                    #op= child.ports["out"].position

                    width = Link.trace_template.core_width
                    #print 'child.ports["in"].trace_template.core_width: ', child.ports["in"].trace_template.core_width
                    a = 0.5
                    #i3.TECH.PPLAYER.NONE.LOGOTXT   when using isipp50g
                    elems += i3.PolygonText(
                        layer=i3.TECH.PPLAYER.WG.TEXT,
                        text='Width={}'.format(width, ),
                        coordinate=(-self.chip_length * 0.5 + 2 * self.tlport,
                                    (self.n + a) * counter * sx - 15.0),
                        alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                        font=2,
                        height=20.0)

                    elems += i3.PolygonText(
                        layer=i3.TECH.PPLAYER.WG.TEXT,
                        text='Width={}'.format(width, ),
                        coordinate=(0.0, (self.n + a) * counter * sx - 15.0),
                        alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                        font=2,
                        height=20.0)

                    elems += i3.PolygonText(
                        layer=i3.TECH.PPLAYER.WG.TEXT,
                        text='Width={}'.format(width, ),
                        coordinate=(self.chip_length * 0.5 - 2 * self.tlport,
                                    (self.n + a) * counter * sx - 15.0),
                        alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                        font=2,
                        height=20.0)

            if self.tipo == 2:
                sx = 100
                for counter, (child, length) in enumerate(
                        zip(self.s_length_vec, lengths)):
                    #ip= child.ports["in"].position
                    #op= child.ports["out"].position

                    width = Link.trace_template.core_width
                    #print 'child.ports["in"].trace_template.core_width: ', child.ports["in"].trace_template.core_width
                    a = 7.0
                    #i3.TECH.PPLAYER.NONE.LOGOTXT   when using isipp50g
                    elems += i3.PolygonText(
                        layer=i3.TECH.PPLAYER.WG.TEXT,
                        text='Width={}_Length={}_R={}'.format(
                            width, length, self.R),
                        coordinate=(-1500,
                                    -(self.n + a) * counter * sx - 55.0),
                        alignment=(i3.TEXT_ALIGN_LEFT, i3.TEXT_ALIGN_LEFT),
                        font=2,
                        height=20.0)
            return elems