Git Product home page Git Product logo

kicad_footprints's Introduction

KiCad footprint collection

  • This is a collection of all the KiCad footprints I know of. If you know of any more, please let me know! (Ideally by opening a pull-request or at least an issue on this repo.)
  • These footprints are regularily checked with the Github Action workflow to make sure KiCad can load them.
  • After you register them with KiCad you can use the footprint filter in the footprint assignment tool to find what you want.

This repo uses git submodules. A submodule is a way of including another git repo in your repo holding it at a particular version until you want to update it. This is useful as you can keep a local copy of all the libraries and only update them when you want to.

Usage

Initialization

git clone https://github.com/kitspace/kicad_footprints
cd kicad_footprints && ./init

This downloads all the libraries in parallel but it can still take a while.

If you are stuck on KiCad version 4 or version 5 can use the kicad-4 or the kicad-5 branch. These branches are not being updated though.

Ignoring Modules

Create a file ignore_modules.txt and add a sub-string to match per line for module names to ignore. For example to ignore the official KiCad modules from this repo (since they are already included with KiCad) ignore_modules.txt would be:

kicad-official

If adding lines to ignore_modules.txt having already run ./init then run ./deinit to de-register the modules affected by the lines.

Updating

If you want to update all libraries to their latest versions do:

./update

Warning: ./update will git reset --hard the submodules so don't make changes in these folders that you want to keep. Make a separate clone of the submodule respository for that.

If you want to pull in any libraries that have been added since your initial clone:

git pull && ./init

Registering with KiCad

You can add these libraries manually through the KiCad GUI of course. You could also use generate_table to generate an fp-lib-table, the file KiCad uses as a footprint registry, with all the footprints from this repository. You can use this to replace your existing fp-lib-table. You will need to restart KiCad for this change to take effect.

Warning: This will overwrite your existing fp-lib-table, discard any customization you made to it and also switch to using our copy of the "official" libraries included with KiCad (these are henceforth prefixed with kicad-official/). In our instructions below we make a backup copy of the fp-lib-table so can restore it if you need to.

Linux

cp ~/.config/kicad/6.0/fp-lib-table ~/.config/kicad/6.0/fp-lib-table.backup
./generate_table ~/.config/kicad/6.0/fp-lib-table

Mac OS

cp ~/Library/Preferences/kicad/6.0/fp-lib-table ~/Library/Preferences/kicad/6.0/fp-lib-table.backup
./generate_table ~/Library/Preferences/kicad/6.0/fp-lib-table

Windows (using git-bash)

cp ~/AppData/Roaming/kicad/6.0/fp-lib-table ~/AppData/Roaming/kicad/6.0/fp-lib-table.backup
./generate_table ~/AppData/Roaming/kicad/6.0/fp-lib-table

Restoring original

If you don't like the new way of organizing footprint libs and want to restore your original fp-lib-table:

Linux
cp ~/.config/kicad/6.0/fp-lib-table.backup ~/.config/kicad/6.0/fp-lib-table
Mac OS
cp ~/Library/Preferences/kicad/6.0/fp-lib-table.backup ~/Library/Preferences/kicad/6.0/fp-lib-table
Windows
cp ~/AppData/Roaming/kicad/6.0/fp-lib-table.backup ~/AppData/Roaming/kicad/6.0/fp-lib-table

3D models

You can try and hack the 3D models to be correctly associated to the footprints through absolute paths by running this script:

python3 rewrite_3d_model_paths.py
  • This script uses dirty regexes to re-write the paths when it finds models of the same name in the same sub-module repository.
  • It can take up to 5 minutes on my machine.
  • If you ever run ./update you have to run rewrite_3d_model_paths.py again.

Adding submodules

If you know of any KiCad footprint repositories that have not been added please file an issue and I will add them.

If you want to maintain a private fork of this repository with some private submodules you can add them simply by:

git submodule add <git url> <folder>
git commit

They should work fine with the rest of the scripts once they are added.

License

Any scripts in this repository are MIT licensed. All the footprints have their own licenses of course.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.