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.

kicad_footprints's People

Contributors

johnthagen avatar kasbah avatar phsilva avatar tuna-f1sh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kicad_footprints's Issues

Cloning of out-of date submodules is failing

As reported in #2. Not up-to date submodules will fail on init:

Cloning xesscorp/RPi_Hat.pretty
Cloning xesscorp/xess.pretty
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
error: no such remote ref 9f166ffe86d1f3e41b1b8ce0c034773ac0f7983b
Fetched in submodule path 'tylercrumpton/CrumpPrints.pretty', but it did not contain 9f166ffe86d1f3e41b1b8ce0c034773ac0f7983b. Direct fetching of that commit failed.
falling back to deep clone for tylercrumpton/CrumpPrints.pretty
error: no such remote ref 9f166ffe86d1f3e41b1b8ce0c034773ac0f7983b
Fetched in submodule path 'tylercrumpton/CrumpPrints.pretty', but it did not contain 9f166ffe86d1f3e41b1b8ce0c034773ac0f7983b. Direct fetching of that commit failed.
 ** Failed ** tylercrumpton/CrumpPrints.pretty

CvPcb load error on lowstar and adamjvr

Back to Ubuntu from OSX and giving your footprints compilation a good try :)

I just found this:

Errors were encountered loading footprints:
PARSE_ERROR: Expecting 'circle, rectangle, oval, or trapezoid' in input/source '/home/romanvg/dev/kicad_footprints/adamjvr/KiCAD-OnHand-Lib/OnHand-Components.pretty/C1206.kicad_mod' line 20 offset 14 from /build/kicad-lOwy61/kicad-4.0.4+dfsg1/common/dsnlexer.cpp : Expecting() : line 369
PARSE_ERROR: Expecting 'circle, rectangle, oval, or trapezoid' in input/source '/home/romanvg/dev/kicad_footprints/lowstar/IPC7351C-Nominal.pretty/LEDC160X80X65L30N.kicad_mod' line 24 offset 14 from /build/kicad-lOwy61/kicad-4.0.4+dfsg1/common/dsnlexer.cpp : Expecting() : line 369

Would it be possible to run the kicad lexer standalone or sth on travis so that those don't ever show up later on?

#idea

Adding on Windows?

Hi,

I am running KiCad on Windows. I've successfully generated a fp-lib-table file using Python with generate_table script and then moved it to C:\Users\%username%\.config\kicad directory. However, I am not seeing the footprints in CvPcb when I am loading it. Am I missing something or this is not supported?

For what it's worth, there are several fp-lib-table files in KiCad installation directory, however I am not sure what is the right one to replace if that's what is necessary.

Thanks!

Script to remove kicad 6 incompatible files

I noticed that when I run ./update there's now a bunch of files that start with (footprint that cause footprint loading to fail completely in KiCad 6.0.10 and earlier. You can reproduce this locally by running python load_all.py where you'll get an IO_ERROR.

My previous strategy was to remove repos when they use unstable features, but we lose a lot of footprints that way that are actually still compatible. It's also more work for me. Would be better to have a script to remove these files.

Parsing errors in stable KiCAD

After running ./generate-table and copying it into the OSX location for it (doing a .backup of the former first as advised in the README):

~/Library/Preferences/kicad/fp-lib-table

I'm getting this couple of footprint parsing errors while running CvPcb on KiCad 4.0.5:

Errors were encountered loading footprints:
PARSE_ERROR: Expecting 'circle, rectangle, oval, or trapezoid' in input/source '/Users/romanvg/dev/kicad_modules/kicad_footprints/lowstar/IPC7351C-Nominal.pretty/CAPC160X80X87L35N.kicad_mod' line 24 offset 14 from /Users/ansible/4.0.5/kicad-mac-packaging-4.0.0/kicad/common/dsnlexer.cpp : Expecting() : line 369
PARSE_ERROR: Expecting 'circle, rectangle, oval, or trapezoid' in input/source '/Users/romanvg/dev/kicad_modules/kicad_footprints/adamjvr/KiCAD-OnHand-Lib/OnHand-Components.pretty/BLM15HG601SN1D.kicad_mod' line 16 offset 14 from /Users/ansible/4.0.5/kicad-mac-packaging-4.0.0/kicad/common/dsnlexer.cpp : Expecting() : line 369

wiebus repo fails on OSX

I was following the installation instructions and hit this error:

(...)
Submodule 'vontrapp/vontrapp.pretty' (https://github.com/vontrapp/vontrapp.pretty.git) registered for path 'vontrapp/vontrapp.pretty'
Submodule 'wiebus/SOT23_SOT143_SOT143R_TSOT6_MK06A_SC70-6_Housing_14Mar2014.pretty' (https://github.com/wiebus/SOT23_SOT143_SOT143R_TSOT6_MK06A_SC70-6_Housing_14Mar2014.pretty.git) registered for path 'wiebus/SOT23_SOT143_SOT143R_TSOT6_MK06A_SC70-6_Housing_14Mar2014.pretty'
Submodule 'xesscorp/RPi_Hat.pretty' (https://github.com/xesscorp/RPi_Hat.pretty.git) registered for path 'xesscorp/RPi_Hat.pretty'
Submodule 'xesscorp/xess.pretty' (https://github.com/xesscorp/xess.pretty) registered for path 'xesscorp/xess.pretty'
xargs: illegal option -- i
xargs: illegal option -- i
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr]
             [-L number] [-n number [-x]] [-P maxprocs] [-s size]
             [utility [argument ...]]

Apparently gxargs the GNU version of xargs is no longer in Homebrew, so I switched to GNU parallel and it went fine.

I hesitated to file a pullrequest since I'm not sure if you want to require users to install GNU parallel.

In any case, nice collection of kicad libs, thanks a ton for this effort!

KiCAD footprint repositories that have not been added

Path is /cygdrive/c/Users instead of c:/Users

I'm using the window branch, when generating fp_lib_table using Git Bash, it becomes :-

(lib (name "digikey/digikey-footprints.pretty")(type KiCad) (uri "/cygdrive/c/Users/stanley/Documents/Github/kicad_footprints/digikey/digikey-footprints.pretty") (options "") (descr ""))

This is a Win 7 32-bit version..

I have another Win 7 64-bit version with no such issues ...
Any idea why ??

Include a config file to exclude libraries

It'd be convenient if we could ignore any number of these submodules. A simple ignore_modules file would suffice, one ignored submodule name per newline. This way I could ignore some repos, for example the official one (because I already have it in my distro).

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.