Exemple #1
0
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    pin1 = pscad.donut(D("1.83"), D("2.43"))
    pin23 = pscad.donut(D("1.59"), D("2.19"))

    pins = pscad.up(D("14.4") / 2 - D("10.7")) + (
        pscad.left(D("4.7")) + pscad.pin("3", m.clearance, m.mask) + pin23,
        pscad.up(3) + pscad.pin("2", m.clearance, m.mask) + pin23,
        pscad.down(3) + pscad.pin("1", m.clearance, m.mask) + pin1,
    )

    all = (
        pins,
        pscad.silk(m.silk) + pscad.up(D("14.4") / 2) + pscad.left(D("9.0") / 2) + pscad.polygon([
            (0, 0),
            (0, D("10.7") - D("2.19") - D("0.2")),
            (0, D("10.7") + D("2.19") + D("0.2")),
            (0, D("14.4")),
            (D("4.5") - D("2.43") - D("0.2"), D("14.4")),
            (D("4.5") + D("2.43") + D("0.2"), D("14.4")),
            (D("9.0"), D("14.4")),
            (D("9.0"), 0)], [
            (0, 1), (2, 3), (3, 4), (5, 6), (6, 7), (7, 0)])
    )

    silk = pscad.silk(m.silk) + (
        patterns.placement_courtyard(all, m.placement, m.grid, 1),
    )

    return all, silk
Exemple #2
0
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    pin2 = pscad.donut(D("0.65"), D("0.85"))
    pin13 = pscad.donut(D("0.5"), D("0.7"))

    pins = pscad.down(D("11.5") / 2) + pscad.right(D("11.0") / 2) + pscad.left(D("4.5")) + (
        pscad.up(D("8.6")) + (
            pscad.left(D("3.8")) + pscad.pin("1", m.clearance, m.mask) + pin13,
            pscad.left(D("0.5")) + pscad.pin("3", m.clearance, m.mask) + pin13,
        ),
        pscad.up(D("9.0")) + (
            pscad.right(D("3.5")) + pscad.pin("2", m.clearance, m.mask) + pin2,
        ),
        pscad.up(D("1.5")) + (
            pscad.hole(m.clearance, 0) + pscad.circle(D("0.9"))
        ),
    )

    all = (
        pins,
        pscad.silk(m.silk) + pscad.square((D("11.0"), D("11.5")), center=True)
    )

    silk = pscad.silk(m.silk) + (
        patterns.placement_courtyard(all, m.placement, m.grid, 1),
    )

    return all, silk
Exemple #3
0
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    p_m = dict()

    p_m['n_x'] = 2
    p_m['n_y'] = 23
    p_m['prefix'] = "P8-"
    p_m['annulus'] = "0.3"
    p_m['drill_d'] = "40 mil"
    p_m['pitch'] = "0.1 in"
    p8 = header(pscad.wrapper(m.items() + p_m.items()))

    p_m['prefix'] = "P9-"
    p9 = header(pscad.wrapper(m.items() + p_m.items()))

    p_m['n_x'] = 1
    p_m['n_y'] = 6
    p_m['prefix'] = "J1-"
    j1 = header(pscad.wrapper(m.items() + p_m.items()))

    mhole = pscad.donut(I("0.125") / 2, I("0.125") / 2 + I("0.03125"))

    all = (
        pscad.left(I("3.4") / 2 - I("0.775") - I("0.1") * 11) + (
            pscad.up(I("1.9") / 2) + p8,
            pscad.down(I("1.9") / 2) + p9 + pscad.up(I("0.175")) + pscad.right(I("0.050")) + j1
        ),
        pscad.pin(itertools.count(1), m.clearance, m.mask) + pscad.left(I("3.4") / 2) + pscad.down(I("2.15") / 2) + (
            pscad.right(I("3.175")) + (pscad.up(I("0.25")) + mhole, pscad.up(I("1.9")) + mhole),
            pscad.right(I("0.575")) + (pscad.up(I("0.125")) + mhole, pscad.up(I("2.025")) + mhole)
        )
    )

    return all
Exemple #4
0
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    pad = pscad.rounded_square((D("0.8"), D("2.82")), m.round_off, center=True)

    pad_row = (pscad.left(D("3.5")) + pad + pscad.right(D("2.5")) + pad +
        pscad.right(2) + pad + pscad.right(D("2.5")) + pad)

    gnd_pin = pscad.donut(D("1.15"), D("1.40"))

    side = (
        pscad.pin("5", m.clearance, m.mask, square=True) + (
            pscad.up(D("14.15") / 2 - D("10.3")) +
     	    pscad.left(D("13.14") / 2) + gnd_pin
        ),

        pscad.silk(m.silk) + (
            pscad.up(D("14.15") / 2) + pscad.line(D("13.90") / 2) +
            pscad.right(D("13.90") / 2) + pscad.line((0, D("10.30") - D("1.55")))
        )
    )

    all = (
        pscad.mirror([1, 0]) + pscad.pad(itertools.count(1), m.clearance, m.mask) + (
            pscad.up(D("14.15") / 2 - D("10.3") - D("3.71")) + pad_row
        ),

        side + pscad.mirror([1, 0]) + side,
    )

    silk = pscad.silk(m.silk) + (
        patterns.placement_courtyard(all, m.placement, m.grid, 1),
    )

    return all, silk
Exemple #5
0
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    row = pscad.row(pscad.donut(D("1.8") / D(2), D("1.8") / D(2) + D("0.5")), D("4.2"), 3)
    all = (
        pscad.pin(itertools.count(1), m.clearance, m.mask) + (
            row,
            pscad.down(D("4.2")) + row
        ),
        pscad.hole(m.clearance, 0) + (
            pscad.up(D("7.30")) +
            pscad.row(pscad.circle(D("3.0") / D(2)), D("8.4"), 2)
        ),
        pscad.silk(m.silk) + (
            pscad.right(D("4.2")) +
            pscad.up(D("7.3") + D("6.6") - D("12.8") / D("2")) +
            pscad.square((D("13.8"), D("12.8")), center=True)
        )
    )

    silk = pscad.silk(m.silk) + (
        patterns.placement_courtyard(all, m.placement, m.grid, 1),
        
        pscad.right(D("4.2") - D("4") / D(2)) +
        pscad.up(D("7.3") + D("6.6")) +
        pscad.square((D("4"), D("3.5")))
    )

    return all, silk
Exemple #6
0
def common_pins(m):
    sig_pin = pscad.donut(I("0.028") / 2, I("0.028") / 2 + D("0.18"))
    return pscad.pin(itertools.count(5), m.clearance, m.mask) + (
        pscad.down(I("0.350")) +
        pscad.rotate(90) +
        pscad.row(sig_pin, I("0.050"), 8)
    )
Exemple #7
0
def ptd08a0x0w_pins(m):
    pwr_pin = pscad.donut(I("0.055") / 2, I("0.055") / 2 + D("0.5"))
    return pscad.pin(itertools.count(1), m.clearance, m.mask) + (
        pwr_pin,
        pscad.down(m.a) + pwr_pin +
        pscad.right(m.b) + pwr_pin +
        pscad.right(m.c) + pwr_pin
    )
Exemple #8
0
def header(m):
    def names(prefix):
        return (prefix + str(i) for i in itertools.count(1))

    row = pscad.row(pscad.donut(m.drill_d / 2, m.drill_d / 2 + m.annulus), m.pitch, m.n_x, center=True)
    all = pscad.pin(names(m.prefix), m.clearance, m.mask) + (
        pscad.rotate(270) + pscad.row(pscad.rotate(90) + row, m.pitch, m.n_y, center=True)
    )

    return (pscad.rotate(90) + all,)
Exemple #9
0
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    row = pscad.row(pscad.donut(m.drill_d / D(2), m.drill_d / D(2) + m.annulus), m.pitch, m.n_x, center=True)
    all = pscad.pin(itertools.count(1), m.clearance, m.mask) + (
        pscad.rotate(270) + pscad.row(pscad.rotate(90) + row, m.pitch, m.n_y, center=True)
    )

    silk = pscad.silk(m.silk) + (
        patterns.corners((m.n_x * m.pitch, m.n_y * m.pitch), m.pitch / D(4), center=True)
    )

    return all, silk
Exemple #10
0
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    pin_row = pscad.row(pscad.donut(m.drill_r, m.drill_r + m.annulus), m.pitch, m.n / 2, center=True)

    pins = pscad.pin(itertools.count(1), m.clearance, m.mask, square=True) + (
        pscad.down(m.width / 2) + pin_row,
        pscad.up(m.width / 2) + pscad.rotate(180) + pin_row
    )

    length = m.pitch * (m.n + 1) / 2
    silk = pscad.silk(m.silk) + (
        pscad.square([length, m.width - (m.drill_r + m.annulus) * 2 - m.silk * 4], center=True),
        pscad.left(length / 2) + pscad.rotate(270) + pscad.circle(m.width / D(10), sweep=180)
    )

    return pins, silk
Exemple #11
0
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    pin = pscad.donut(m.drill_d / 2, m.drill_d / 2 + m.annulus)
    all = pscad.pin(itertools.count(1), m.clearance, m.mask) + (
        pscad.left(m.pitch) + pin,
        pscad.up(m.pitch) + pin,
	pin,
	pscad.right(m.pitch) + pin,
	pscad.down(m.pitch) + pin
    )

    silk = pscad.silk(m.silk) + (
        patterns.placement_courtyard(all, m.placement, m.grid, I("0.05"))
        #patterns.corners((3 * m.pitch, 3 * m.pitch), m.pitch / 4, center=True)
    )

    return all, silk
Exemple #12
0
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    pad_row = pscad.rotate(180) + pscad.row(pscad.rounded_square(
        (D("0.5"), D("2.0")), m.round_off, center=True), D("0.8"), 5, center=True)

    gnd_row = pscad.row(pscad.donut(I("0.034"), I("0.045")), D("5.3"), 2)

    side = (
        pscad.pin("G", m.clearance, m.mask, square=True) + (
	    pscad.left(D("3.6")) + pscad.up(2) +
            pscad.rotate(-90) + gnd_row,
        ),

        pscad.hole(m.clearance, 0) + (
            pscad.left(D("1.7")) + pscad.down(D("1.3")) +
            pscad.circle(I("0.018"))
        ),

        pscad.silk(m.silk) + (
            pscad.left(D("3.6")) + pscad.up(D("4.6")) +
            pscad.polygon([(0, 0), (0, D("1.3")), (0, D("3.9")), (0, D("6.6"))],
                          [(0, 1), (2, 3)])
        )
    )

    all = (
        pscad.pad(itertools.count(1), m.clearance, m.mask) + (
            pscad.down(D("3.5")) + pad_row
        ),

        side + pscad.mirror([1, 0]) + side,

        pscad.silk(m.silk) + (
            pscad.up(D("4.6")) + pscad.line(D("7.2"), center=True),
        )
    )

    silk = pscad.silk(m.silk) + (
        patterns.placement_courtyard(all, m.placement, m.grid, 1),
    )

    return all, silk
Exemple #13
0
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    row = pscad.row(pscad.donut(m.drill_d / 2, m.drill_d / 2 + m.annulus),
        m.pitch, m.n, center=True)

    all = (
        pscad.pin(itertools.count(1), m.clearance, m.mask) +
        row,

        pscad.silk(m.silk) +
        pscad.square((m.pitch * m.n, m.body_y), center=True)
    )

    silk = pscad.silk(m.silk) + (
        patterns.placement_courtyard(all, m.placement, m.grid, 1),
        
        pscad.up(m.body_y / 2) +
        pscad.left(m.pitch) +
        pscad.square((m.pitch * 2, m.body_y / 4))
    )

    return all, silk
Exemple #14
0
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    row = pscad.row(pscad.donut(m.drill_d / D(2), m.drill_d / D(2) + m.annulus), m.pitch, m.n_x, center=True)

    all = (
        pscad.pin(itertools.count(1), m.clearance, m.mask) + 
        pscad.rotate(270) +
        pscad.row(pscad.rotate(90) + row, m.pitch, m.n_y, center=True),

        pscad.silk(m.silk) + (
            pscad.square((m.body_x, m.body_y), center=True),
            pscad.square((m.body_x - m.thickness * D(2), m.body_y - m.thickness * D(2)), center=True),

            pscad.left((m.body_x - m.thickness) / D(2)) +
            pscad.square((m.thickness, m.key), center=True)
        )
    )

    silk = pscad.silk(m.silk) + (
        patterns.placement_courtyard(all, m.placement, m.grid, D("0.5")),
    )

    return all, silk