コード例 #1
0
ファイル: pj-202a.py プロジェクト: russdill/pscad
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
コード例 #2
0
ファイル: bga.py プロジェクト: russdill/pscad
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    if 'skip' in m:
        skip = lambda name: re.match(m.skip, name)
    else:
        skip = None

    bga_pad = pscad.paste_fraction(
        pscad.circle(m.pad_size / 2), m.paste_fraction)
    row = pscad.row(bga_pad, m.pitch, m.n_x, center=True)
    all = (pscad.pad(
        bga_names(m.n_x, m.no_letter), m.clearance, m.mask, skip=skip) +
           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))

    silk = pscad.silk(m.silk) + (
        patterns.placement_courtyard(all, m.placement, m.grid, 1),
        pscad.translate([-m.body_x / 2, -m.pitch * (m.n_y - 1) / 2]) +
        pscad.left(m.silk * 2) + pscad.line([0, m.pitch * 2], center=True))

    if m.invert:
        return pscad.mirror([1, 0]) + pscad.rotate(270) + (all, silk)

    return all, silk
コード例 #3
0
ファイル: cus-14b.py プロジェクト: russdill/pscad
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    pad1 = pscad.rounded_square([D("0.7"), D("1.5")], m.round_off, center=True)
    pad1_row = pscad.pad(itertools.count(1), m.clearance, m.mask) + (
                   pscad.row(pad1, D("1.5"), 6, center=True)
    )

    pad2 = pscad.rounded_square([D("0.8"), 1], m.round_off, center=True)
    pad2_row = pscad.pad("7", m.clearance, m.mask) + (
                   pscad.rotate(90) + pscad.row(pad2, D("2.1"), 2, center=True)
    )

    bore = pscad.hole(m.clearance, 0) + pscad.circle(D("0.9") / 2)
    bore_row = pscad.row(bore, 5, 2, center = True)

    pads = (
        bore_row,
        pscad.up(1 + D("1.5") / 2) + pad1_row,
        pscad.left(D("11.8") / 2) + pad2_row,
        pscad.right(D("11.8") / 2) + pad2_row
    )

    all = (
        pads,
        pscad.silk(m.silk) + pscad.square((D("11.3"), D("2.6")), center=True)
    )

    tick = pscad.line((0, D("0.5")), center=True)
    silk = pscad.silk(m.silk) + (
        patterns.placement_courtyard(all, m.placement, m.grid, 1),
        pscad.down(D("1.3")) + pscad.row(tick, D("1.5"), 5, center=True)
    )

    return all, silk
コード例 #4
0
ファイル: vesa_fpdi.py プロジェクト: russdill/pscad
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    pad1 = pscad.rounded_square([D("0.7"), D("2.0")], m.round_off, center=True)
    pad1_row1 = pscad.pad(itertools.count(1, 2), m.clearance, m.mask) + (
        pscad.row(pad1, 1, (m.n + 1) / 2, center=True)
    )

    pad1_row2 = pscad.pad(itertools.count(2, 2), m.clearance, m.mask) + (
        pscad.row(pad1, 1, (m.n - 1) / 2, center=True)
    )

    pad2 = pscad.rounded_square([D("1.3"), D("3.4")], m.round_off, center=True)
    pad2_row = pscad.pad(m.n + 1, m.clearance, m.mask) + (
        pscad.row(pad2, (m.n - 1) / D(2) + D("5.7"), 2, center=True)
    )

    bore = pscad.hole(m.clearance, 0) + pscad.circle(D("1.3") / 2)
    bore_row = pscad.row(bore, (m.n - 1) / D(2) + D("3.1"), 2, center = True)

    # Reverse up/down for plug/receptacle
    pads = (
        bore_row,
        pscad.up(D("2.5")) + pad1_row1,
        pscad.down(D("2.5")) + pad1_row2,
        pad2_row,
        bore_row
    )

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

    return all, silk
コード例 #5
0
ファイル: pj-012a.py プロジェクト: russdill/pscad
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
コード例 #6
0
ファイル: shl.py プロジェクト: russdill/pscad
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    pad1 = pscad.rounded_square([D("0.6"), D("1.25")], m.round_off, center=True)
    pad1_row = pscad.pad(itertools.count(1), m.clearance, m.mask) + (
        pscad.row(pad1, D("1.0"), m.n, center=True)
    )

    pad2 = pscad.rounded_square([D("0.9"), D("1.7")], m.round_off, center=True)
    pad2_row = pscad.pad(m.n + 1, m.clearance, m.mask) + (
        pscad.row(pad2, m.n + 1 + D("0.9"), 2, center=True)
    )

    pads = (
        pscad.up(D("3.35") + D("1.25") / 2) + pad1_row,
        pscad.up(D("1.7") / 2) + pad2_row
    )

    all = (
        pads,
        pscad.silk(m.silk) + pscad.up(D("1.45")) + pscad.square((m.n + D("2.8"), D("4.3")), center=True)
    )

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

    return all, silk
コード例 #7
0
ファイル: usb-a.py プロジェクト: russdill/pscad
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
コード例 #8
0
ファイル: mlp.py プロジェクト: bert/pscad
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    thermal_size = (m.thermal_x, m.thermal_y)
    row = mlp_row(m, m.n / (4 if m.quad else 2))

    if m.quad:
        pads = (
            row, pscad.rotate(90) + row,
            pscad.rotate(180) + row, pscad.rotate(270) + row
        )
    else:
        pads = row, pscad.rotate(180) + row

    all = pscad.pad(itertools.count(1), m.clearance, m.mask) + (
        pads,
        patterns.thermal_pad(patterns.indent_pad(thermal_size, m.indent),
                thermal_size, m.paste_fraction, m.paste_max)
    ), pscad.silk(m.silk) + patterns.corners((m.body_x, m.body_y), m.pad_l, center=True)

    silk = pscad.silk(m.silk) + (
        patterns.placement_courtyard(all, m.placement, m.grid, m.pad_w * D(2)),

        pscad.translate([-m.body_x / D(2), m.body_y / D(2)]) +
        pscad.down(m.silk * D(2)) +
        pscad.line(m.pad_l * D("0.7"))
    )

    return all, silk
コード例 #9
0
ファイル: 45558-0003.py プロジェクト: bert/pscad
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
コード例 #10
0
ファイル: solder_jumper.py プロジェクト: bert/pscad
def closed(m):
    m = pscad.wrapper(defaults.items() + m.items())

    pad = pscad.left((m.pad_l + m.space) / D(2)) + pscad.rotate(90) + mlp_pad(m)
    all = pscad.pad(itertools.count(1), m.clearance, m.mask) + (
        pad, pscad.mirror([1, 0]) + pad
    )

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

    return all, silk
コード例 #11
0
ファイル: ptd08a0x0w.py プロジェクト: russdill/pscad
def ptd08a0x0w_template(m):
    all = (
        ptd08a0x0w_pins(m),

        pscad.right(m.d) +
        common_pins(m),

        pscad.silk(m.silk) +
        pscad.translate([m.d / 2, m.a / 2]) +
        pscad.square([m.e, m.f], center=True)
    )

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

    return all, silk
コード例 #12
0
ファイル: jumper5.py プロジェクト: russdill/pscad
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
コード例 #13
0
ファイル: mlp.py プロジェクト: russdill/pscad
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    if 'pads_x' in m:
        pads_x = m.pads_x
    elif m.quad:
        pads_x = m.n / 4
    else:
        pads_x = 0
    pads_y = m.n / 2 - pads_x

    if 'width' in m:
        width = m.width
    else:
        width = m.height

    thermal_size = (m.thermal_x, m.thermal_y)
    row_y = mlp_row(m, pads_y, m.height)

    if m.quad:
        row_x = mlp_row(m, pads_x, width)
        pads = (
            row_y, pscad.rotate(90) + row_x,
            pscad.rotate(180) + row_y, pscad.rotate(270) + row_x
        )
    else:
        pads = row_y, pscad.rotate(180) + row_y

    pin_list = range(m.start_pin, m.n - m.start_pin + 3) + range(1, m.start_pin) + [int(m.n) + 1]
    all = pscad.pad(itertools.cycle(pin_list), m.clearance, m.mask) + (
        pads,
        patterns.thermal_pad(patterns.indent_pad(thermal_size, m.indent),
                thermal_size, m.paste_fraction, m.paste_max)
    ), pscad.silk(m.silk) + patterns.corners((m.body_x, m.body_y), m.pad_l, center=True)

    silk = pscad.silk(m.silk) + (
        patterns.placement_courtyard(all, m.placement, m.grid, m.pad_w * 2),

        pscad.translate([-m.body_x / 2, m.body_y / 2]) +
        pscad.down(m.silk * 2) +
        pscad.line(m.pad_l * D("0.7"))
    )

    return all, silk
コード例 #14
0
ファイル: usbmini-b.py プロジェクト: russdill/pscad
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
コード例 #15
0
ファイル: sop.py プロジェクト: bert/pscad
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    try:
        pin_count = m.n
        pin_names = itertools.count(1)
    except:
        pin_count = len(m.pins.split(','))
        pin_names = (i for i in m.pins.split(','))

    try:
        body_y = m.body_y
    except:
        body_y = m.width - m.pad_l - m.silk * D(3)

    pad_row = pscad.row(pscad.rounded_square(
        (m.pad_w, m.pad_l), m.round_off, center=True), m.pitch, pin_count / 2, center=True)

    if body_y > m.width - m.pad_l - m.silk * D(2):
        edge = m.body_x / D(2) - m.pitch * pin_count / 4
        body = patterns.brackets([m.body_x, body_y], edge, center=True)
    else:
        body = pscad.square([m.body_x, body_y], center=True)

    all = pscad.pad(pin_names, m.clearance, m.mask) + (
        pscad.down(m.width / D(2)) + pad_row,
        pscad.up(m.width / D(2)) + pscad.rotate(180) + pad_row
    ), pscad.silk(m.silk) + body
        
    silk = pscad.silk(m.silk) + (
        patterns.placement_courtyard(all, m.placement, m.grid, m.pad_w * D(2)),

        pscad.down(m.width / D(2)) +
        pscad.left(m.silk + m.pitch * pin_count / 4) +
        pscad.line([0, m.pad_l * D("0.7")], center=True)
    )

    return all, silk
コード例 #16
0
ファイル: powerpak-so8.py プロジェクト: bert/pscad
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    pitch = D("1.27")
    width = D("6.61")
    pad_size0 = [D("0.61"), D("1.27")]
    pad_size1 = [D("0.61"), D("1.02")]
    pad_size2 = [D("1.65"), D("3.81")]
    body = [D("5.0"), D("6.25")]

    thermal_pad = pscad.paste_fraction(pscad.rounded_square(pad_size2, m.round_off, center=True), D("0.5"))

    all = (
        pscad.pad(itertools.count(1), m.clearance, m.mask) +
        pscad.down((width - pad_size0[1]) / D(2)) +
        pscad.row(pscad.rounded_square(pad_size0, m.round_off, center=True), pitch, 4, center=True),

        pscad.pad((i for i in [6, 6, 5, 5]), m.clearance, m.mask) +
        pscad.up((width - pad_size1[1]) / D(2)) +
        pscad.row(pscad.rounded_square(pad_size1, m.round_off, center=True), pitch, 4, center=True),

        pscad.pad((i for i in [6, 5]), m.clearance, m.mask) +
        pscad.down(width / D(2)) +
        pscad.up(pad_size0[1] + D("0.82") + pad_size2[1] / D(2)) +
        pscad.row(thermal_pad, D("0.61") + pad_size2[0], 2, center=True),

        pscad.silk(m.silk) + patterns.brackets(body, D("0.2"), center=True)
    )

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

        pscad.down(width / D(2) + m.silk) +
        pscad.left(pitch * D("1.5")) +
        pscad.line(pad_size0[0], center=True)
    )

    return all, silk
コード例 #17
0
ファイル: kk100.py プロジェクト: russdill/pscad
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
コード例 #18
0
ファイル: shrouded-header.py プロジェクト: bert/pscad
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
コード例 #19
0
ファイル: ptd08a0x0w.py プロジェクト: russdill/pscad
def ptd08a0x0w(m):
    m = pscad.wrapper(defaults.items() + m.items())
    m10w = pscad.wrapper(defaults.items() + M10W_defaults.items() + m.items())
    m20w = pscad.wrapper(defaults.items() + M20W_defaults.items() + m.items())
    
    all = (
        ptd08a0x0w_pins(m20w),

        pscad.right(m20w.d - m10w.d) +
        ptd08a0x0w_pins(m10w),

        pscad.right(m20w.d) +
        common_pins(m),

        pscad.silk(m.silk) +
        pscad.translate([m20w.d / 2, m20w.a / 2]) +
        pscad.square([m20w.e, m20w.f], center=True)
    )

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

    return all, silk
コード例 #20
0
ファイル: sop.py プロジェクト: russdill/pscad
def part(m):
    m = pscad.wrapper(defaults.items() + m.items())

    try:
        pin_count = m.n
        pin_names = itertools.count(1)
    except:
        pin_count = len(m.pins.split(','))
        pin_names = (i for i in m.pins.split(','))

    if 'pads_x' in m:
        pads_x = m.pads_x
    elif m.quad:
        pads_x = pin_count / 4
    else:
        pads_x = 0
    pads_y = pin_count / 2 - pads_x

    try:
        body_y = m.body_y
    except:
        body_y = m.width - m.pad_l - m.silk * 3

    if 'height' in m:
        height = m.height
    else:
        height = m.width

    pad = pscad.rounded_square((m.pad_w, m.pad_l), m.round_off, center=True)

    row_y = pscad.down(m.width / 2) + pscad.row(
        pscad.paste_fraction(pad, (1,m.pad_paste_fraction)),
        m.pitch, pads_y, center=True)

    if m.quad:
        row_x = pscad.down(height / 2) + pscad.row(
            pscad.paste_fraction(pad, (1,m.pad_paste_fraction)),
            m.pitch, pads_x, center=True)
        pads = pscad.pad(pin_names, m.clearance, m.mask) + (
            row_y, pscad.rotate(90) + row_x,
            pscad.rotate(180) + row_y, pscad.rotate(270) + row_x
        )
    else:
        pads = pscad.pad(pin_names, m.clearance, m.mask) + (
            row_y, pscad.rotate(180) + row_y
        )

    try:
        if m.quad:
            raise Exception()
        if body_y > m.width - m.pad_l - m.silk * 2:
            edge = m.body_x / 2 - m.pitch * D(pin_count) / 4
            body = patterns.brackets([m.body_x, body_y], edge, center=True)
        else:
            body = pscad.square([m.body_x, body_y], center=True)
        all = pads, pscad.silk(m.silk) + body
    except:
        all = pads

    try:
        corners = m.corners
    except:
        corners = m.pad_w * 2

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

        pscad.down(m.width / 2) +
        pscad.left(m.silk + m.pitch * pads_y / 2) +
        pscad.line([0, m.pad_l * D("0.7")], center=True)
    )

    return all, silk