Exemple #1
0
def generate_parts(prefix,base_name,no_silk=False):
    for num in range(2,12+1):
        A=(num * .118+.144) * 1000
        B=((num -1) * .118) *1000
        C=(num * .118 + .051) * 1000
        print "A=" + repr(A)
        print "-B/2=" + repr(-B/2)
        print "C=" + repr(C)
        c=Component(length=A*100, width=390,no_silk=no_silk)
        p=Pad(height=115,width=50, clearance=12 , mask=50+30)
        h=Pin(thickness=95+30,drill=95, clearance=12 , mask=95+12+3)
        y0=0
        c.add_array(PinArray(pin=p, x0=-B/2, y0=y0, spacing=118, num=num, direction=1, prefix="", start_num=1))
        c.add_array(PinArray(pin=h, x0= -C/2 , y0= y0- (273 -118/2) , spacing=C, num=2, direction=1, prefix="h"))
        elmstr= c.generate()
        write(name=base_name +repr(num) + ".fp", prefix=prefix, elmstr=elmstr)
Exemple #2
0
        string += "\tElementLine [" + repr(int(
            floor(100 * self.length))) + " 0 " + repr(
                int(floor(100 * self.length))) + " " + repr(
                    int(-100 * floor(self.width))) + " 600]\n"
        string += "\tElementLine [0 " + repr(int(
            -100 * floor(self.width))) + " " + repr(
                int(floor(100 * self.length))) + " " + repr(
                    int(-100 * floor(self.width))) + " 600]\n"
        string += "\tElementLine [0 " + "-1000" + " " + repr(
            int(floor(100 * self.length))) + " " + "-1000" + " 600]\n"
        for a in self.arrays:
            string += (a.generate())
        return string + "\n)"


if __name__ == "__main__":
    prefix = argv[1]
    for num in range(2, 10 + 1):
        c = Component(length=(num - 1) * 100 + 95, width=250)
        p = Pin(thickness=40 + 30, drill=40, clearance=12, mask=40 + 12 + 3)
        c.add_array(
            PinArray(pin=p,
                     x0=95 / 2,
                     y0=123,
                     spacing=100,
                     num=num,
                     direction=1,
                     prefix=""))
        elmstr = c.generate()
        write(name="KK-100-" + repr(num) + ".fp", prefix=prefix, elmstr=elmstr)
Exemple #3
0
            PinArray(pin=p,
                     x0=-B / 2,
                     y0=y0 - 118,
                     spacing=118,
                     num=num / 2,
                     direction=1,
                     prefix=""))
        if numholes == 2:
            c.add_array(
                PinArray(pin=h,
                         x0=-C / 2,
                         y0=y0 - (170 + 118),
                         spacing=C,
                         num=numholes,
                         direction=1,
                         prefix="h"))
        elif numholes == 1:
            c.add_array(
                PinArray(pin=h,
                         x0=0,
                         y0=y0 - (170 + 118),
                         spacing=C,
                         num=numholes,
                         direction=1,
                         prefix="h"))

        elmstr = c.generate()
        write(name="MicroFit_Through-2x" + repr(num / 2) + ".fp",
              prefix=prefix,
              elmstr=elmstr)
Exemple #4
0
        string+="\tElementLine ["+ pr(-self.length/2) + " " + pr(-self.width/2) + " " + pr(-self.length/2) +  " " + pr(self.width/2) + " 1000]\n"
        string+="\tElementLine ["+ pr(self.length/2) + " " + pr(-self.width/2) + " " + pr(self.length/2) +  " " + pr(self.width/2) + " 1000]\n"

        for a in self.arrays:
            string+=(a.generate())
        return string + "\n)"

if __name__== "__main__":
    prefix=argv[1]
    for num in range(25,26): # just 25 for now
        A=2.087 * 1000
        B=1.852 * 1000
        C=1.512 *1000
        offset_1=.652*1000
        offset_2= .598*1000
        print "A=" + repr(A)
        print "-B/2=" + repr(-B/2)
        print "C=" + repr(C)
        c=Component(length=A*100, width=311*100)
        p=Pin(thickness=47+30,drill=47, clearance=12 , mask=47+30+6)
        h=Pin(thickness=120+30,drill=120, clearance=12 , mask=120+30+6)
        h2=Pin(thickness=150+30,drill=150, clearance=12 , mask=150+30+6)
        y0=0
        c.add_array(PinArray(pin=p, x0=-offset_1, y0=y0 + 112/2, spacing=109, num=num/2 +1, direction=1, prefix=""))
        c.add_array(PinArray(pin=p, x0=-offset_2, y0=y0-112/2, spacing=109, num=num/2, direction=1, prefix="", start_num=num/2 + 1 +1))
        c.add_array(PinArray(pin=h, x0= -1.852/2*1000 , y0= y0, spacing=1.852*1000, num=2, direction=1, prefix="h"))
        c.add_array(PinArray(pin=h2, x0= -2.4/2*1000 , y0= y0-30, spacing=2.4*1000, num=2, direction=1, prefix="h"))
  
        elmstr= c.generate()
        write(name="DB-25_NORCOMP" +".fp", prefix=prefix, elmstr=elmstr)    
Exemple #5
0
            + repr(int(floor(100 * self.length)))
            + " 0 "
            + repr(int(floor(100 * self.length)))
            + " "
            + repr(int(-100 * floor(self.width)))
            + " 600]\n"
        )
        string += (
            "\tElementLine [0 "
            + repr(int(-100 * floor(self.width)))
            + " "
            + repr(int(floor(100 * self.length)))
            + " "
            + repr(int(-100 * floor(self.width)))
            + " 600]\n"
        )
        string += "\tElementLine [0 " + "-1000" + " " + repr(int(floor(100 * self.length))) + " " + "-1000" + " 600]\n"
        for a in self.arrays:
            string += a.generate()
        return string + "\n)"


if __name__ == "__main__":
    prefix = argv[1]
    for num in range(2, 12 + 1):
        c = Component(length=(num - 1) * 156 + 126, width=401.5)
        p = Pin(thickness=70.86 + 30, drill=70.86, clearance=12, mask=70.86 + 12 + 3)
        c.add_array(PinArray(pin=p, x0=63, y0=181.1, spacing=156, num=num, direction=1, prefix=""))
        elmstr = c.generate()
        write(name="KK-156-" + repr(num) + ".fp", prefix=prefix, elmstr=elmstr)
Exemple #6
0
        string+="\tElementLine ["+ pr(-self.length/2) + " " + pr(-self.width/2)+ " " + pr(self.length/2)+ " " + pr(-self.width/2) + " 1000]\n"
        string+="\tElementLine ["+ pr(self.length/2) + " "+ pr(-self.width/2) + " "+ pr(self.length/2)+ " " + pr(self.width/2) + " 1000]\n"

        # draw the little half circle for showing oreientation
        string+="\tElementLine ["+ pr(-self.length/2) + " "+ pr(-self.width/2) + " "+ pr(-self.length/2)+ " " + pr(-arc_rad) + " 1000]\n"
        string+="\tElementLine ["+ pr(-self.length/2) + " "+ pr(arc_rad) + " "+ pr(-self.length/2)+ " " + pr(self.width/2)  + " 1000]\n"
        string+="\tElementArc ["+ pr(-self.length/2) + " "+ pr(0) + " "+ pr(arc_rad)+ " " + pr(arc_rad) + " " + pr(90) + " " + pr(180)+ " 1000]\n"
        for a in self.arrays:
            string+=(a.generate())
        return string + "\n)"

if __name__== "__main__":
    prefix=argv[1]
    nums=[14,16,20,24]
    As= {14:6.5, 16:6.5, 20: 7.5, 24: 8.5}
    """http://www.nalanda.nitc.ac.in/industry/appnotes/TI_logic/data/www.ti.com/sc/docs/products/logic/package/lpssop.htm"""
    for num in nums:
        width=9/25.4 *1000
        A=As[num]*1000/25.4
        pitch= .65/25.4 * 1000
        B= pitch * (num-2)/2
        row_spacing= 7.62/25.4 *1000
        c=Component(length=A*100, width=width*100)
        p=Pad(height=1.05/25.4 *1000,width=.4/25.4 *1000, clearance=12 , mask=1.05/25.4 *1000+30)
        y0=0
        c.add_array(PinArray(pin=p, x0=-B/2, y0=y0 + row_spacing/2, spacing=pitch, num=num/2, direction=1, prefix=""))
        c.add_array(PinArray(pin=p, x0=-B/2, y0=y0-row_spacing/2, spacing=pitch, num=num/2, direction=-1, prefix="", start_num=num/2 + 1))
        elmstr= c.generate()
        write(name="SSOP_DB_" +repr(num) + ".fp", prefix=prefix, elmstr=elmstr)
    
Exemple #7
0
                     num=2,
                     direction=1,
                     prefix="h"))
        c.add_array(
            PinArray(pin=h2,
                     x0=-x_offset - y_edge / 2,
                     y0=y0 - y_offset - 0,
                     spacing=y_edge,
                     num=2,
                     direction=1,
                     prefix="h"))
        c.add_array(
            PinArray(pin=h2,
                     x0=-x_offset - 0,
                     y0=y0 - y_offset - y_edge / 2,
                     spacing=y_edge,
                     num=1,
                     direction=1,
                     prefix="h"))
        c.add_array(
            PinArray(pin=h2,
                     x0=-x_offset - 0,
                     y0=y0 - y_offset + y_edge / 2,
                     spacing=y_edge,
                     num=1,
                     direction=1,
                     prefix="h"))

        elmstr = c.generate()
        write(name="Telit_GM862.fp", prefix=prefix, elmstr=elmstr)
        for a in self.arrays:
            string+=(a.generate())
        return string + "\n)"

if __name__== "__main__":
    prefix=argv[1]
    for num in range(2,24+1,2): # even pin numbers from 2 to 24
        A=(num/2 * .118+.144) * 1000
        B=((num/2 -1) * .118) *1000
        C=((num/2-3) * .118 + .067) * 1000
        print "A=" + repr(A)
        print "-B/2=" + repr(-B/2)
        print "C=" + repr(C)
        c=Component(length=A*100, width=390)
        p=Pin(thickness=40+30,drill=40, clearance=12 , mask=40+30+6)
        h=Pin(thickness=118+30,drill=118, clearance=12 , mask=118+30+6)
        y0=0
        numholes=1
        if num > 6:
            numholes=2        
        c.add_array(PinArray(pin=p, x0=-B/2, y0=y0, spacing=118, num=num/2, direction=1, prefix="", start_num=num/2 + 1))
        c.add_array(PinArray(pin=p, x0=-B/2, y0=y0-118, spacing=118, num=num/2, direction=1, prefix=""))
        if numholes ==2:
            c.add_array(PinArray(pin=h, x0= -C/2 , y0= y0- (170 +118) , spacing=C, num=numholes, direction=1, prefix="h"))
        elif numholes==1:
            c.add_array(PinArray(pin=h, x0= 0 , y0= y0- (170+118) , spacing=C, num=numholes, direction=1, prefix="h"))

        elmstr= c.generate()
        write(name="MicroFit_Through-2x" +repr(num/2) + ".fp", prefix=prefix, elmstr=elmstr)
    
Exemple #9
0
                 prefix="XY"))
    c.add_array(
        PinArray(pin=p,
                 x0=1485,
                 y0=1291,
                 spacing=50,
                 num=4,
                 direction=1,
                 prefix="AN"))
    h = Pin(thickness=86.61 + 20,
            drill=86.61,
            clearance=12,
            mask=86.61 + 20 + 3)
    c.add_array(
        PinArray(pin=h,
                 x0=78.74,
                 y0=78.74,
                 spacing=2992.12598,
                 num=2,
                 direction=1,
                 prefix="H"))
    c.add_array(
        PinArray(pin=h,
                 x0=78.74,
                 y0=1259.84252,
                 spacing=2992.12598,
                 num=2,
                 direction=1,
                 prefix="H"))
    write(name="Audiostix.fp", prefix=prefix, elmstr=c.generate())
Exemple #10
0
            + repr(int(floor(100 * self.length)))
            + " "
            + repr(int(-100 * floor(self.width)))
            + " 600]\n"
        )

        for a in self.arrays:
            string += a.generate()
        return string + "\n)"


if __name__ == "__main__":
    prefix = argv[1]
    c = Component(length=3150, width=1339)
    p = Pin(thickness=28 + 14, drill=28, clearance=12, mask=28 + 12 + 3)
    c.add_array(PinArray(pin=p, x0=178, y0=47, spacing=50, num=4, direction=1, prefix="ST"))
    c.add_array(PinArray(pin=p, x0=428, y0=47, spacing=50, num=6, direction=1, prefix="HWA"))
    c.add_array(PinArray(pin=p, x0=778, y0=47, spacing=50, num=10, direction=1, prefix="IO"))
    c.add_array(PinArray(pin=p, x0=1328, y0=47, spacing=50, num=20, direction=1, prefix="LD"))
    c.add_array(PinArray(pin=p, x0=1326, y0=724, spacing=50, num=6, direction=1, prefix="NSSP"))
    c.add_array(PinArray(pin=p, x0=1698, y0=724, spacing=50, num=4, direction=1, prefix="I2C"))
    c.add_array(PinArray(pin=p, x0=1942, y0=724, spacing=50, num=4, direction=1, prefix="FF"))
    c.add_array(PinArray(pin=p, x0=2194, y0=724, spacing=50, num=4, direction=1, prefix="HWB"))
    c.add_array(PinArray(pin=p, x0=2436, y0=724, spacing=50, num=6, direction=1, prefix="BT"))
    c.add_array(PinArray(pin=p, x0=1099, y0=1291, spacing=50, num=4, direction=1, prefix="XY"))
    c.add_array(PinArray(pin=p, x0=1485, y0=1291, spacing=50, num=4, direction=1, prefix="AN"))
    h = Pin(thickness=86.61 + 20, drill=86.61, clearance=12, mask=86.61 + 20 + 3)
    c.add_array(PinArray(pin=h, x0=78.74, y0=78.74, spacing=2992.12598, num=2, direction=1, prefix="H"))
    c.add_array(PinArray(pin=h, x0=78.74, y0=1259.84252, spacing=2992.12598, num=2, direction=1, prefix="H"))
    write(name="Audiostix.fp", prefix=prefix, elmstr=c.generate())
Exemple #11
0
        )
        c.add_array(
            PinArray(
                pin=h2,
                x0=-x_offset - y_edge / 2,
                y0=y0 - y_offset - x_start,
                spacing=y_edge,
                num=2,
                direction=1,
                prefix="h",
            )
        )
        c.add_array(
            PinArray(
                pin=h2, x0=-x_offset - y_edge / 2, y0=y0 - y_offset - 0, spacing=y_edge, num=2, direction=1, prefix="h"
            )
        )
        c.add_array(
            PinArray(
                pin=h2, x0=-x_offset - 0, y0=y0 - y_offset - y_edge / 2, spacing=y_edge, num=1, direction=1, prefix="h"
            )
        )
        c.add_array(
            PinArray(
                pin=h2, x0=-x_offset - 0, y0=y0 - y_offset + y_edge / 2, spacing=y_edge, num=1, direction=1, prefix="h"
            )
        )

        elmstr = c.generate()
        write(name="Telit_GM862.fp", prefix=prefix, elmstr=elmstr)
Exemple #12
0
    def add_array(self, array):
        self.arrays.append(array)
    def generate(self):
        string="Element[ \"\" \"\" \"\" \"\" 1000 1000 0 0 0 100 \"\"] (\n"
        string+="\tElementLine ["+ pr(-self.length/2) + " -57700 " + pr(self.length/2) + " -57700" + " 1000]\n"
        string+="\tElementLine ["+ pr(-self.length/2) + " -57700 " + pr(-self.length/2) + " -24600" + " 1000]\n"
        string+="\tElementLine ["+ pr(self.length/2) + " -57700 " + pr(self.length/2) + " -24600" + " 1000]\n"
        for a in self.arrays:
            string+=(a.generate())
        return string + "\n)"

if __name__== "__main__":
    prefix=argv[1]
    for num in range(2,24+1,2): # even pin numbers from 2 to 24
        A=(num/2 * .118+.144) * 1000
        B=((num/2 -1) * .118) *1000
        C=(num/2 * .118 + .051) * 1000
        print "A=" + repr(A)
        print "-B/2=" + repr(-B/2)
        print "C=" + repr(C)
        c=Component(length=A*100, width=390)
        p=Pad(height=115,width=50, clearance=12 , mask=50+30)
        h=Pin(thickness=95+30,drill=95, clearance=12 , mask=95+12+3)
        y0=0
        c.add_array(PinArray(pin=p, x0=-B/2, y0=y0, spacing=118, num=num/2, direction=1, prefix="", start_num=num/2 + 1))
        c.add_array(PinArray(pin=p, x0=-B/2, y0=y0-182, spacing=118, num=num/2, direction=1, prefix=""))
        c.add_array(PinArray(pin=h, x0= -C/2 , y0= y0- (455 -118/2) , spacing=C, num=2, direction=1, prefix="h"))
        elmstr= c.generate()
        write(name="MicroFit_SMT_Press-2x" +repr(num/2) + ".fp", prefix=prefix, elmstr=elmstr)