Example #1
0
def generate_params(num_pins,
                    series_name,
                    pin_pitch,
                    angled,
                    flanged,
                    mount_hole=False,
                    mount_hole_to_pin=None,
                    side_to_pin=None):

    return Params(series_name=series_name,
                  file_name=generate_footprint_name(series_name, num_pins,
                                                    pin_pitch, angled,
                                                    mount_hole, flanged),
                  angled=angled,
                  flanged=flanged,
                  num_pins=num_pins,
                  pin_pitch=pin_pitch,
                  mount_hole=mount_hole,
                  mount_hole_to_pin=pin_pitch
                  if mount_hole_to_pin is None else mount_hole_to_pin,
                  side_to_pin=(3 * pin_pitch if flanged else pin_pitch + 2) /
                  2.0 if side_to_pin is None else side_to_pin)