def pin_centres(conf):
    pins_per_row = conf['pins'] // conf['rows']
    row_length = (pins_per_row - 1) * conf['pin_pitch']

    left_row = []
    bottom_row = []
    right_row = []
    top_row = []

    x = conf['row_pitch'] / 2.0
    y = -row_length / 2.0
    for pin in range(pins_per_row):
        left_row.append((-x, y))
        right_row.insert(0, (x, y))
        top_row.insert(0, (y, -x))
        bottom_row.append((y, x))
        y += conf['pin_pitch']

    return left_row, bottom_row, right_row, top_row
Compute the locations of pin centres, (x, y).
dataset/ETHPy150Open adamgreig/agg-kicad/scripts/build_mod_ic.py/pin_centres