Exemple #1
0
 def create_t3(self):
     cell = spira.Cell()
     tf_1 = spira.Translation(Coord(12.5, 2.5)) + spira.Rotation(60)
     tf_2 = spira.Translation(Coord(
         12.5, 2.5)) + spira.Rotation(60) + spira.Reflection(True)
     cell += spira.Rectangle(p1=(0, 0),
                             p2=(10, 50),
                             layer=spira.Layer(number=4))
     S1 = spira.SRef(cell, transformation=tf_1)
     S2 = spira.SRef(cell, transformation=tf_2)
     return [S1, S2]
Exemple #2
0
    def create_elementals(self, elems):

        c1 = PolygonCell()

        s1 = spira.SRef(c1, midpoint=(0, 0))
        elems += s1

        T = spira.Translation((0 * 1e6, -40 * 1e6)) + spira.Rotation(180)
        s2 = spira.SRef(c1, midpoint=(0, 0), transformation=T)
        elems += s2

        # port1 = s1.ports['RES_e3']
        # port2 = s2.ports['RES_e3']

        # print(port1)
        # print(port2)

        # R = spira.Route(
        #     port1=s1.ports['RES_e3'],
        #     port2=s2.ports['RES_e3'],
        #     ps_layer=RDD.PLAYER.RES
        # )
        # elems += spira.SRef(R)

        return elems
 def create_t1(self):
     T = spira.Translation(Coord(-10, 0))
     ply = spira.Rectangle(p1=(0, 0),
                           p2=(10, 50),
                           layer=spira.Layer(number=2))
     ply.transform(T)
     return ply
Exemple #4
0
    def create_elements(self, elems):

        r1 = Row()

        s1 = spira.SRef(r1)
        # s2 = spira.SRef(r1, midpoint=(2000, -1000))
        s2 = spira.SRef(r1, transformation=spira.Translation((2000, -1000)))

        elems += s1
        elems += s2

        print(s1.ports['Al:T2'])
        print(s2.ports['Al:T2'])

        d1 = spira.Port(name='Al:D1',
                        midpoint=(1000, 7000),
                        orientation=180,
                        width=20)
        # d2 = spira.Port(name='Al:D2', midpoint=(-1000, -5000), orientation=0, width=20)

        elems += spira.RouteManhattan(
            ports=[s1.ports['Al:T2'], d1, s2.ports['Al:T2']],
            width=20,
            layer=RDD.PLAYER.Al.METAL)

        elems += spira.RouteManhattan(ports=[s1.ports['Al:T1'], self.d2],
                                      width=20,
                                      layer=RDD.PLAYER.Al.METAL)

        return elems
Exemple #5
0
 def create_t1(self):
     cell = spira.Cell()
     cell += spira.Rectangle(p1=(0, 0),
                             p2=(10, 50),
                             layer=spira.Layer(number=2))
     T = spira.Translation(Coord(10, 0))
     S = spira.SRef(cell, transformation=T)
     return S
Exemple #6
0
    def distance_alignment(self, port, destination, distance):
        destination = deepcopy(destination)
        self = self.connect(port, destination)

        L = line_from_point_angle(point=destination.midpoint,
                                  angle=destination.orientation)
        dx, dy = L.get_coord_from_distance(destination, distance)

        T = spira.Translation(translation=(dx, dy))
        self.transform(T)
        return self
 def get_transforms(self):
     # T = spira.Translation(Coord(10, 0)) + spira.Rotation(rotation=60)
     T = spira.Translation(Coord(10, 0))
     T += spira.Rotation(rotation=20)
     return T
Exemple #8
0
 def get_transforms(self):
     t1 = spira.Translation(translation=(0, 0))
     t2 = spira.Translation(translation=(150, 0))
     return [t1, t2]
import spira.all as spira

R = spira.Rotation(30)
T = spira.Translation((30, 0))
F = spira.Reflection(True)

G0 = R + T + F
G1 = spira.GenericTransform(translation=spira.Coord(-10, 0), rotation=45)
G2 = spira.GenericTransform(translation=spira.Coord(-10, 0),
                            rotation=45,
                            reflection=True)
G3 = spira.GenericTransform()
G3 += R
G3 += T
G3 += F

print(R)
print(type(R))
print('')

print(T)
print(type(T))
print('')

print(F)
print(type(F))
print('')

print(G0)
print(type(G0))
print('')
Exemple #10
0
 def get_transforms(self):
     t1 = spira.Translation((0,0))
     t2 = spira.Translation((0, -40)) + spira.Rotation(180)
     return (t1, t2)