def top_smd_ctyd(pins):
    w = 2 * (pins - 1 + 1.45 + 1.8 + ctyd_gap)
    h = 3.0 + 5.0 + 2 * ctyd_gap
    grid = 2 * ctyd_grid
    w = grid * int(math.ceil(w / (2*ctyd_grid)))
    h = grid * int(math.ceil(h / (2*ctyd_grid)))
    centre = (0, 2.50)
    _, _, _, _, sq = draw_square(w, h, centre, "F.CrtYd", ctyd_width)
    return sq
dataset/ETHPy150Open adamgreig/agg-kicad/scripts/build_mod_jstpa.py/top_smd_ctyd/original