Example #1
0
def SC70(profile, num_pins):
    """Construct a land pattern for an SC70 device.
    
    Supports 5, 6 and 8-pin devices, with dimensions from JEDEC
    MO-203.
    """
    A = ipc.Dimension.from_nominal(1.25, 0.15)
    B = ipc.Dimension.from_nominal(2, 0.15)
    L = ipc.Dimension.from_nominal(2.1, 0.3)
    T = ipc.Dimension(0.26, 0.46)
    W = ipc.Dimension(0.15, 0.3)
    if num_pins == 5:
        # MO-203-C variant AA
        return ipc.sot23_5(
            A, B, L, T, W, 0.65,
            ipc.LandPatternSize.SOT(profile, A, L, T, 0.65))
    elif num_pins == 6:
        # MO-203-C variant AB
        return ipc.in_line_pin_device(
            A, B, L, B, T, W, 0.65, 3, 0,
            ipc.LandPatternSize.SOT(profile, A, L, T, 0.65))
    elif num_pins == 8:
        # MO-203-C variant BA
        W = ipc.Dimension(0.15, 0.27)
        spec = ipc.LandPatternSize.SOT(profile, A, L, T, 0.5)
        return ipc.in_line_pin_device(
            A, B, L, B, T, W, 0.5, 4, 0, spec)
    else:
        raise ValueError("No known standard dimensions for SOT23-{0}".format(num_pins))
Example #2
0
def SC70(profile, num_pins):
    """Construct a land pattern for an SC70 device.
    
    Supports 5, 6 and 8-pin devices, with dimensions from JEDEC
    MO-203.
    """
    A = ipc.Dimension.from_nominal(1.25, 0.15)
    B = ipc.Dimension.from_nominal(2, 0.15)
    L = ipc.Dimension.from_nominal(2.1, 0.3)
    T = ipc.Dimension(0.26, 0.46)
    W = ipc.Dimension(0.15, 0.3)
    if num_pins == 5:
        # MO-203-C variant AA
        return ipc.sot23_5(A, B, L, T, W, 0.65,
                           ipc.LandPatternSize.SOT(profile, A, L, T, 0.65))
    elif num_pins == 6:
        # MO-203-C variant AB
        return ipc.in_line_pin_device(
            A, B, L, B, T, W, 0.65, 3, 0,
            ipc.LandPatternSize.SOT(profile, A, L, T, 0.65))
    elif num_pins == 8:
        # MO-203-C variant BA
        W = ipc.Dimension(0.15, 0.27)
        spec = ipc.LandPatternSize.SOT(profile, A, L, T, 0.5)
        return ipc.in_line_pin_device(A, B, L, B, T, W, 0.5, 4, 0, spec)
    else:
        raise ValueError(
            "No known standard dimensions for SOT23-{0}".format(num_pins))
Example #3
0
def SOT23(profile, num_pins):
    """Construct a land pattern for a SOT23 device.
    
    Supports 3, 5, 6 and 8-pin devices, with dimensions from JEDEC
    TO-236 and MO-178.
    """
    if num_pins == 3:
        # Dimensions from JEDEC TO-236-A[AB]
        A = ipc.Dimension(1.2, 1.4)
        B = ipc.Dimension(2.8, 3.04)
        L = ipc.Dimension(2.1, 2.64)
        T = ipc.Dimension(0.4, 0.6)
        W = ipc.Dimension(0.3, 0.5)
        return ipc.sot23_3(
            A, B, L, T, W, 0.95,
            ipc.LandPatternSize.SOT(profile, A, L, T, 0.95))
    elif num_pins == 5:
        # Dimensions from JEDEC MO-178-C variant AA
        A = ipc.Dimension.from_nominal(1.6, 0.1)
        B = ipc.Dimension.from_nominal(2.9, 0.1)
        L = ipc.Dimension.from_nominal(2.8, 0.2)
        T = ipc.Dimension(0.3, 0.6)
        W = ipc.Dimension(0.3, 0.5)
        return ipc.sot23_5(
            A, B, L, T, W, 0.95,
            ipc.LandPatternSize.SOT(profile, A, L, T, 0.95))
    elif num_pins == 6:
        # Dimensions from JEDEC MO-178-C variant AB
        A = ipc.Dimension.from_nominal(1.6, 0.1)
        B = ipc.Dimension.from_nominal(2.9, 0.1)
        L = ipc.Dimension.from_nominal(2.8, 0.2)
        T = ipc.Dimension(0.3, 0.6)
        W = ipc.Dimension(0.3, 0.5)
        return ipc.in_line_pin_device(
            A, B, L, B, T, W, 0.95, 3, 0,
            ipc.LandPatternSize.SOT(profile, A, L, T, 0.95))
    elif num_pins == 8:
        # Dimensions from JEDEC MO-178-C variant BA
        A = ipc.Dimension.from_nominal(1.6, 0.1)
        B = ipc.Dimension.from_nominal(2.9, 0.1)
        L = ipc.Dimension.from_nominal(2.8, 0.2)
        T = ipc.Dimension(0.3, 0.6)
        W = ipc.Dimension(0.22, 0.38)
        # SOT23-8 is almost at the threshold where IPC switches to
        # much smaller side fillets. This causes overlap violations
        # with the Most profile. As such, we force the narrower pitch
        # profile here by using a smaller pitch.
        spec = ipc.LandPatternSize.SOT(profile, A, L, T, 0.6)
        return ipc.in_line_pin_device(
            A, B, L, B, T, W, 0.65, 4, 0, spec)
    else:
        raise ValueError("No known standard dimensions for SOT23-{0}".format(num_pins))
Example #4
0
def SOT23(profile, num_pins):
    """Construct a land pattern for a SOT23 device.
    
    Supports 3, 5, 6 and 8-pin devices, with dimensions from JEDEC
    TO-236 and MO-178.
    """
    if num_pins == 3:
        # Dimensions from JEDEC TO-236-A[AB]
        A = ipc.Dimension(1.2, 1.4)
        B = ipc.Dimension(2.8, 3.04)
        L = ipc.Dimension(2.1, 2.64)
        T = ipc.Dimension(0.4, 0.6)
        W = ipc.Dimension(0.3, 0.5)
        return ipc.sot23_3(
            A, B, L, T, W, 0.95,
            ipc.LandPatternSize.SOT(profile, A, L, T, 0.95))
    elif num_pins == 5:
        # Dimensions from JEDEC MO-178-C variant AA
        A = ipc.Dimension.from_nominal(1.6, 0.1)
        B = ipc.Dimension.from_nominal(2.9, 0.1)
        L = ipc.Dimension.from_nominal(2.8, 0.2)
        T = ipc.Dimension(0.3, 0.6)
        W = ipc.Dimension(0.3, 0.5)
        return ipc.sot23_5(
            A, B, L, T, W, 0.95,
            ipc.LandPatternSize.SOT(profile, A, L, T, 0.95))
    elif num_pins == 6:
        # Dimensions from JEDEC MO-178-C variant AB
        A = ipc.Dimension.from_nominal(1.6, 0.1)
        B = ipc.Dimension.from_nominal(2.9, 0.1)
        L = ipc.Dimension.from_nominal(2.8, 0.2)
        T = ipc.Dimension(0.3, 0.6)
        W = ipc.Dimension(0.3, 0.5)
        return ipc.in_line_pin_device(
            A, B, L, B, T, W, 0.95, 3, 0,
            ipc.LandPatternSize.SOT(profile, A, L, T, 0.95))
    elif num_pins == 8:
        # Dimensions from JEDEC MO-178-C variant BA
        A = ipc.Dimension.from_nominal(1.6, 0.1)
        B = ipc.Dimension.from_nominal(2.9, 0.1)
        L = ipc.Dimension.from_nominal(2.8, 0.2)
        T = ipc.Dimension(0.3, 0.6)
        W = ipc.Dimension(0.22, 0.38)
        # SOT23-8 is almost at the threshold where IPC switches to
        # much smaller side fillets. This causes overlap violations
        # with the Most profile. As such, we force the narrower pitch
        # profile here by using a smaller pitch.
        spec = ipc.LandPatternSize.SOT(profile, A, L, T, 0.6)
        return ipc.in_line_pin_device(
            A, B, L, B, T, W, 0.65, 4, 0, spec)
    else:
        raise ValueError("No known standard dimensions for SOT23-{0}".format(num_pins))
Example #5
0
def SOIC(profile, A, B, L, T, W, num_pins, pitch=1.27):
    """Construct a land pattern for a SOIC device.

    SOIC unfortunately lacks standardized dimensions (or rather, there
    are 3-4 "standard" dimensions to pick from). Because of this, the
    only default dimension provided is the one everyone seems to agree
    on, 1.27mm pitch - but check that, some ICs are sold as SOIC with
    finer pitch.
    """
    if num_pins % 2 != 0:
        raise ValueError('num_pins must be even for SOIC devices')
    return ipc.in_line_pin_device(A=A,
                                  B=B,
                                  LA=L,
                                  LB=B,
                                  T=T,
                                  W=W,
                                  pitch=pitch,
                                  pins_leftright=num_pins / 2,
                                  pins_updown=0,
                                  spec=ipc.LandPatternSize.SOIC(
                                      profile=profile,
                                      A=A,
                                      L=L,
                                      T=T,
                                      pitch=pitch))
Example #6
0
def dfn(profile):
    """PIC12F609"""
    A = ipc.Dimension.from_nominal(3, 0.1)
    T = ipc.Dimension(0.2, 0.55)
    W = ipc.Dimension(0.25, 0.35)
    pitch = 0.65

    return ipc.in_line_pin_device(
        A=A, B=A, LA=A, LB=A, T=T, W=W, pitch=pitch,
        pins_leftright=4, pins_updown=0,
        spec=ipc.LandPatternSize.DFN(profile))
Example #7
0
def QFP(profile, A, L, T, W, pitch, num_pins):
    """Construct a land pattern for a QFP device.

    This builder assumes a square device with an equal number of pins
    on all sides. If you have an asymmetric package, use the lower
    level primitives to construct it.
    """
    if num_pins % 4 != 0:
        raise ValueError('num_pins must be a multiple of 4 for QFP devices')
    return ipc.in_line_pin_device(
        A, A, L, L, T, W, pitch, num_pins/4, num_pins/4,
        ipc.LandPatternSize.QFP(profile, A, L, T, pitch))
Example #8
0
def tsopj(profile):
    """AAT1232 step-up converter"""
    A = ipc.Dimension.from_nominal(2.4, 0.1)
    B = ipc.Dimension.from_nominal(3, 0.1)
    L = ipc.Dimension.from_nominal(2.85, 0.2)
    T = ipc.Dimension.from_nominal(0.45, 0.15)
    W = ipc.Dimension.from_nominal(0.2, 0.1, 0.05)
    pitch = 0.5
    spec = ipc.LandPatternSize.SOJ(profile)
    return ipc.in_line_pin_device(
        A=A, B=B, LA=L, LB=B, T=T, W=W, pitch=pitch,
        pins_leftright=6, pins_updown=0, spec=spec)
Example #9
0
def sc70(profile):
    """SCJW-8"""
    A = ipc.Dimension.from_nominal(1.75, 0.1)
    B = ipc.Dimension.from_nominal(2, 0.2)
    L = ipc.Dimension.from_nominal(2.1, 0.2)
    T = ipc.Dimension.from_nominal(0.45, 0.1)
    W = ipc.Dimension.from_nominal(0.225, 0.075)
    pitch = 0.5
    spec = ipc.LandPatternSize.SOJ(profile)
    return ipc.in_line_pin_device(
        A=A, B=B, LA=L, LB=B, T=T, W=W, pitch=pitch,
        pins_leftright=4, pins_updown=0, spec=spec)
Example #10
0
def pqfn(profile):
    """QFN with pulled back leads"""
    A = ipc.Dimension(3.9, 4.1)
    L = ipc.Dimension(3.4, 3.6)
    T = ipc.Dimension(0.3, 0.5)
    W = ipc.Dimension(0.18, 0.30)
    pitch = 0.5

    return ipc.in_line_pin_device(
        A=A, B=A, LA=L, LB=L, T=T, W=W, pitch=pitch,
        pins_leftright=5, pins_updown=5,
        spec=ipc.LandPatternSize.QFN(profile))
Example #11
0
def QFP(profile, A, L, T, W, pitch, num_pins):
    """Construct a land pattern for a QFP device.

    This builder assumes a square device with an equal number of pins
    on all sides. If you have an asymmetric package, use the lower
    level primitives to construct it.
    """
    if num_pins % 4 != 0:
        raise ValueError('num_pins must be a multiple of 4 for QFP devices')
    return ipc.in_line_pin_device(
        A, A, L, L, T, W, pitch, num_pins / 4, num_pins / 4,
        ipc.LandPatternSize.QFP(profile, A, L, T, pitch))
Example #12
0
def SOIC(profile, A, B, L, T, W, num_pins, pitch=1.27):
    """Construct a land pattern for a SOIC device.

    SOIC unfortunately lacks standardized dimensions (or rather, there
    are 3-4 "standard" dimensions to pick from). Because of this, the
    only default dimension provided is the one everyone seems to agree
    on, 1.27mm pitch - but check that, some ICs are sold as SOIC with
    finer pitch.
    """
    if num_pins % 2 != 0:
        raise ValueError('num_pins must be even for SOIC devices')
    return ipc.in_line_pin_device(
        A=A, B=B, LA=L, LB=B, T=T, W=W, pitch=pitch,
        pins_leftright=num_pins/2, pins_updown=0,
        spec=ipc.LandPatternSize.SOIC(
            profile=profile, A=A, L=L, T=T, pitch=pitch))
Example #13
0
    def testInLineFourSides(self):
        A = ipc.Dimension.from_nominal(5, 0)
        B = ipc.Dimension.from_nominal(5, 0)
        LA = ipc.Dimension.from_nominal(7, 0)
        LB = ipc.Dimension.from_nominal(7, 0)
        T = ipc.Dimension.from_nominal(0.5, 0)
        W = ipc.Dimension.from_nominal(0.5, 0)
        pitch = 1
        spec = ipc.LandPatternSize(toe=0, heel=0, side=0, courtyard=0)

        expected = '''
PAD 1 (-3.25 0.50) (0.65 0.65)
PAD 2 (-3.25 -0.50) (0.65 0.65)
PAD 3 (-0.50 -3.25) (0.65 0.65)
PAD 4 (0.50 -3.25) (0.65 0.65)
PAD 5 (3.25 -0.50) (0.65 0.65)
PAD 6 (3.25 0.50) (0.65 0.65)
PAD 7 (0.50 3.25) (0.65 0.65)
PAD 8 (-0.50 3.25) (0.65 0.65)

LINE Silkscreen 0.15 (-2.50 -2.50) (2.50 -2.50)
LINE Silkscreen 0.15 (-2.50 2.50) (-2.50 -2.50)
LINE Silkscreen 0.15 (-2.50 2.50) (2.50 2.50)
LINE Silkscreen 0.15 (2.50 2.50) (2.50 -2.50)
CIRCLE Silkscreen (-3.88 0.50) 0.10

LINE Assembly 0.07 (-0.25 2.50) (-0.25 3.00) (-0.75 3.00) (-0.75 2.50)
LINE Assembly 0.07 (-0.25 3.00) (-0.25 3.50) (-0.75 3.50) (-0.75 3.00) (-0.25 3.00)
LINE Assembly 0.07 (-0.75 -2.50) (-0.75 -3.00) (-0.25 -3.00) (-0.25 -2.50)
LINE Assembly 0.07 (-0.75 -3.00) (-0.75 -3.50) (-0.25 -3.50) (-0.25 -3.00) (-0.75 -3.00)
LINE Assembly 0.07 (-2.50 -0.25) (-3.00 -0.25) (-3.00 -0.75) (-2.50 -0.75)
LINE Assembly 0.07 (-2.50 0.75) (-3.00 0.75) (-3.00 0.25) (-2.50 0.25)
LINE Assembly 0.07 (-3.00 -0.25) (-3.50 -0.25) (-3.50 -0.75) (-3.00 -0.75) (-3.00 -0.25)
LINE Assembly 0.07 (-3.00 0.75) (-3.50 0.75) (-3.50 0.25) (-3.00 0.25) (-3.00 0.75)
LINE Assembly 0.07 (0.25 -2.50) (0.25 -3.00) (0.75 -3.00) (0.75 -2.50)
LINE Assembly 0.07 (0.25 -3.00) (0.25 -3.50) (0.75 -3.50) (0.75 -3.00) (0.25 -3.00)
LINE Assembly 0.07 (0.75 2.50) (0.75 3.00) (0.25 3.00) (0.25 2.50)
LINE Assembly 0.07 (0.75 3.00) (0.75 3.50) (0.25 3.50) (0.25 3.00) (0.75 3.00)
LINE Assembly 0.07 (2.50 -0.75) (3.00 -0.75) (3.00 -0.25) (2.50 -0.25)
LINE Assembly 0.07 (2.50 0.25) (3.00 0.25) (3.00 0.75) (2.50 0.75)
LINE Assembly 0.07 (2.50 2.50) (2.50 -2.50) (-2.50 -2.50) (-2.50 2.50) (2.50 2.50)
LINE Assembly 0.07 (3.00 -0.75) (3.50 -0.75) (3.50 -0.25) (3.00 -0.25) (3.00 -0.75)
LINE Assembly 0.07 (3.00 0.25) (3.50 0.25) (3.50 0.75) (3.00 0.75) (3.00 0.25)

LINE Documentation 0.15 (0.00 0.62) (0.00 -0.62)
LINE Documentation 0.15 (0.62 0.00) (-0.62 0.00)

LINE Courtyard 0.15 (-3.98 -3.58) (3.58 -3.58) (3.58 3.58) (-3.98 3.58) (-3.98 -3.58)
'''
        self._check_drawing(
            ipc.in_line_pin_device(
                A, B, LA, LB, T, W, pitch, 2, 2, spec), expected)

        LA = ipc.Dimension.from_nominal(5, 0)
        LB = ipc.Dimension.from_nominal(5, 0)
        expected = '''
PAD 1 (-2.25 0.50) (0.65 0.65)
PAD 2 (-2.25 -0.50) (0.65 0.65)
PAD 3 (-0.50 -2.25) (0.65 0.65)
PAD 4 (0.50 -2.25) (0.65 0.65)
PAD 5 (2.25 -0.50) (0.65 0.65)
PAD 6 (2.25 0.50) (0.65 0.65)
PAD 7 (0.50 2.25) (0.65 0.65)
PAD 8 (-0.50 2.25) (0.65 0.65)

LINE Silkscreen 0.15 (-2.50 -2.50) (-1.15 -2.50)
LINE Silkscreen 0.15 (-2.50 -2.50) (-2.50 -1.15)
LINE Silkscreen 0.15 (-2.50 2.50) (-1.15 2.50)
LINE Silkscreen 0.15 (-2.50 2.50) (-2.50 1.15)
LINE Silkscreen 0.15 (2.50 -2.50) (1.15 -2.50)
LINE Silkscreen 0.15 (2.50 -2.50) (2.50 -1.15)
LINE Silkscreen 0.15 (2.50 2.50) (1.15 2.50)
LINE Silkscreen 0.15 (2.50 2.50) (2.50 1.15)
CIRCLE Silkscreen (-2.87 0.50) 0.10

LINE Assembly 0.07 (-0.25 2.00) (-0.25 2.50) (-0.75 2.50) (-0.75 2.00) (-0.25 2.00)
LINE Assembly 0.07 (-0.75 -2.00) (-0.75 -2.50) (-0.25 -2.50) (-0.25 -2.00) (-0.75 -2.00)
LINE Assembly 0.07 (-2.00 -0.25) (-2.50 -0.25) (-2.50 -0.75) (-2.00 -0.75) (-2.00 -0.25)
LINE Assembly 0.07 (-2.00 0.75) (-2.50 0.75) (-2.50 0.25) (-2.00 0.25) (-2.00 0.75)
LINE Assembly 0.07 (0.25 -2.00) (0.25 -2.50) (0.75 -2.50) (0.75 -2.00) (0.25 -2.00)
LINE Assembly 0.07 (0.75 2.00) (0.75 2.50) (0.25 2.50) (0.25 2.00) (0.75 2.00)
LINE Assembly 0.07 (2.00 -0.75) (2.50 -0.75) (2.50 -0.25) (2.00 -0.25) (2.00 -0.75)
LINE Assembly 0.07 (2.00 0.25) (2.50 0.25) (2.50 0.75) (2.00 0.75) (2.00 0.25)
LINE Assembly 0.07 (2.50 2.50) (2.50 -2.50) (-2.50 -2.50) (-2.50 2.50) (2.50 2.50)

LINE Documentation 0.15 (0.00 0.62) (0.00 -0.62)
LINE Documentation 0.15 (0.62 0.00) (-0.62 0.00)

LINE Courtyard 0.15 (-2.97 -2.58) (2.58 -2.58) (2.58 2.58) (-2.97 2.58) (-2.97 -2.58)
'''
        self._check_drawing(
            ipc.in_line_pin_device(
                A, B, LA, LB, T, W, pitch, 2, 2, spec), expected)
Example #14
0
    def testInLineFourSides(self):
        A = ipc.Dimension.from_nominal(5, 0)
        B = ipc.Dimension.from_nominal(5, 0)
        LA = ipc.Dimension.from_nominal(7, 0)
        LB = ipc.Dimension.from_nominal(7, 0)
        T = ipc.Dimension.from_nominal(0.5, 0)
        W = ipc.Dimension.from_nominal(0.5, 0)
        pitch = 1
        spec = ipc.LandPatternSize(toe=0, heel=0, side=0, courtyard=0)

        expected = '''
PAD 1 (-3.25 0.50) (0.65 0.65)
PAD 2 (-3.25 -0.50) (0.65 0.65)
PAD 3 (-0.50 -3.25) (0.65 0.65)
PAD 4 (0.50 -3.25) (0.65 0.65)
PAD 5 (3.25 -0.50) (0.65 0.65)
PAD 6 (3.25 0.50) (0.65 0.65)
PAD 7 (0.50 3.25) (0.65 0.65)
PAD 8 (-0.50 3.25) (0.65 0.65)

LINE Silkscreen 0.15 (-2.50 -2.50) (2.50 -2.50)
LINE Silkscreen 0.15 (-2.50 2.50) (-2.50 -2.50)
LINE Silkscreen 0.15 (-2.50 2.50) (2.50 2.50)
LINE Silkscreen 0.15 (2.50 2.50) (2.50 -2.50)
CIRCLE Silkscreen (-3.88 0.50) 0.10

LINE Assembly 0.07 (-0.25 2.50) (-0.25 3.00) (-0.75 3.00) (-0.75 2.50)
LINE Assembly 0.07 (-0.25 3.00) (-0.25 3.50) (-0.75 3.50) (-0.75 3.00) (-0.25 3.00)
LINE Assembly 0.07 (-0.75 -2.50) (-0.75 -3.00) (-0.25 -3.00) (-0.25 -2.50)
LINE Assembly 0.07 (-0.75 -3.00) (-0.75 -3.50) (-0.25 -3.50) (-0.25 -3.00) (-0.75 -3.00)
LINE Assembly 0.07 (-2.50 -0.25) (-3.00 -0.25) (-3.00 -0.75) (-2.50 -0.75)
LINE Assembly 0.07 (-2.50 0.75) (-3.00 0.75) (-3.00 0.25) (-2.50 0.25)
LINE Assembly 0.07 (-3.00 -0.25) (-3.50 -0.25) (-3.50 -0.75) (-3.00 -0.75) (-3.00 -0.25)
LINE Assembly 0.07 (-3.00 0.75) (-3.50 0.75) (-3.50 0.25) (-3.00 0.25) (-3.00 0.75)
LINE Assembly 0.07 (0.25 -2.50) (0.25 -3.00) (0.75 -3.00) (0.75 -2.50)
LINE Assembly 0.07 (0.25 -3.00) (0.25 -3.50) (0.75 -3.50) (0.75 -3.00) (0.25 -3.00)
LINE Assembly 0.07 (0.75 2.50) (0.75 3.00) (0.25 3.00) (0.25 2.50)
LINE Assembly 0.07 (0.75 3.00) (0.75 3.50) (0.25 3.50) (0.25 3.00) (0.75 3.00)
LINE Assembly 0.07 (2.50 -0.75) (3.00 -0.75) (3.00 -0.25) (2.50 -0.25)
LINE Assembly 0.07 (2.50 0.25) (3.00 0.25) (3.00 0.75) (2.50 0.75)
LINE Assembly 0.07 (2.50 2.50) (2.50 -2.50) (-2.50 -2.50) (-2.50 2.50) (2.50 2.50)
LINE Assembly 0.07 (3.00 -0.75) (3.50 -0.75) (3.50 -0.25) (3.00 -0.25) (3.00 -0.75)
LINE Assembly 0.07 (3.00 0.25) (3.50 0.25) (3.50 0.75) (3.00 0.75) (3.00 0.25)

LINE Documentation 0.15 (0.00 0.62) (0.00 -0.62)
LINE Documentation 0.15 (0.62 0.00) (-0.62 0.00)

LINE Courtyard 0.15 (-3.98 -3.58) (3.58 -3.58) (3.58 3.58) (-3.98 3.58) (-3.98 -3.58)
'''
        self._check_drawing(
            ipc.in_line_pin_device(A, B, LA, LB, T, W, pitch, 2, 2, spec),
            expected)

        LA = ipc.Dimension.from_nominal(5, 0)
        LB = ipc.Dimension.from_nominal(5, 0)
        expected = '''
PAD 1 (-2.25 0.50) (0.65 0.65)
PAD 2 (-2.25 -0.50) (0.65 0.65)
PAD 3 (-0.50 -2.25) (0.65 0.65)
PAD 4 (0.50 -2.25) (0.65 0.65)
PAD 5 (2.25 -0.50) (0.65 0.65)
PAD 6 (2.25 0.50) (0.65 0.65)
PAD 7 (0.50 2.25) (0.65 0.65)
PAD 8 (-0.50 2.25) (0.65 0.65)

LINE Silkscreen 0.15 (-2.50 -2.50) (-1.15 -2.50)
LINE Silkscreen 0.15 (-2.50 -2.50) (-2.50 -1.15)
LINE Silkscreen 0.15 (-2.50 2.50) (-1.15 2.50)
LINE Silkscreen 0.15 (-2.50 2.50) (-2.50 1.15)
LINE Silkscreen 0.15 (2.50 -2.50) (1.15 -2.50)
LINE Silkscreen 0.15 (2.50 -2.50) (2.50 -1.15)
LINE Silkscreen 0.15 (2.50 2.50) (1.15 2.50)
LINE Silkscreen 0.15 (2.50 2.50) (2.50 1.15)
CIRCLE Silkscreen (-2.87 0.50) 0.10

LINE Assembly 0.07 (-0.25 2.00) (-0.25 2.50) (-0.75 2.50) (-0.75 2.00) (-0.25 2.00)
LINE Assembly 0.07 (-0.75 -2.00) (-0.75 -2.50) (-0.25 -2.50) (-0.25 -2.00) (-0.75 -2.00)
LINE Assembly 0.07 (-2.00 -0.25) (-2.50 -0.25) (-2.50 -0.75) (-2.00 -0.75) (-2.00 -0.25)
LINE Assembly 0.07 (-2.00 0.75) (-2.50 0.75) (-2.50 0.25) (-2.00 0.25) (-2.00 0.75)
LINE Assembly 0.07 (0.25 -2.00) (0.25 -2.50) (0.75 -2.50) (0.75 -2.00) (0.25 -2.00)
LINE Assembly 0.07 (0.75 2.00) (0.75 2.50) (0.25 2.50) (0.25 2.00) (0.75 2.00)
LINE Assembly 0.07 (2.00 -0.75) (2.50 -0.75) (2.50 -0.25) (2.00 -0.25) (2.00 -0.75)
LINE Assembly 0.07 (2.00 0.25) (2.50 0.25) (2.50 0.75) (2.00 0.75) (2.00 0.25)
LINE Assembly 0.07 (2.50 2.50) (2.50 -2.50) (-2.50 -2.50) (-2.50 2.50) (2.50 2.50)

LINE Documentation 0.15 (0.00 0.62) (0.00 -0.62)
LINE Documentation 0.15 (0.62 0.00) (-0.62 0.00)

LINE Courtyard 0.15 (-2.97 -2.58) (2.58 -2.58) (2.58 2.58) (-2.97 2.58) (-2.97 -2.58)
'''
        self._check_drawing(
            ipc.in_line_pin_device(A, B, LA, LB, T, W, pitch, 2, 2, spec),
            expected)
Example #15
0
    fp.Line(start=(4, -2.85), end=(-4, -2.85), layer=fp.Layer.TopAssembly),
    fp.Line(start=(-4, -2.85), end=(-4, 2.15), layer=fp.Layer.TopAssembly),
]
l.devices.append(kidraw.Device(s, [f]))

# Switch
A, L, T, W = (
    ipc.Dimension.from_nominal(6, 0.2),
    ipc.Dimension.from_nominal(10, 0.2),
    ipc.Dimension.from_nominal(0.8, 0.1),
    ipc.Dimension.from_nominal(0.7, 0.1))
pitch = 4.5
spec = ipc.LandPatternSize.gullwing_leads(
    ipc.LandPatternSize.Nominal, A, L, T, pitch)
f = fp.Footprint(name='TL3301NF160QG', description='SMT Tactile switch')
f.from_ipc(ipc.in_line_pin_device(A, A, L, L, T, W, pitch, 2, 0, spec))
f.features.append(fp.Circle(radius=3.5/2))
f.features.append(fp.Circle(radius=3.5/2, layer=fp.Layer.TopAssembly))
s = sch.Schematic(name='Switch SPST', refdes='S', show_pin_text=False, show_name=False)
s.features = [
    sch.Pin(numbers=[1, 2], pos=(-100, 0), len=50, dir=sch.Pin.Right, type=sch.Pin.Passive),
    sch.Pin(numbers=[3, 4], pos=(100, 0), len=50, dir=sch.Pin.Left, type=sch.Pin.Passive),
    sch.Line(points=[(-50, 0), (50, 50)]),
]
l.devices.append(kidraw.Device(s, [f]))

# Fuse
s = slib.fuse()
s.features.append(sch.Pin(numbers=3, type=sch.Pin.NotConnected, shape=sch.Pin.Hidden))
f = fp.Footprint(name='Block', description='5x20mm cartridge fuse holder')
f.features = [