pcb-rnd knowledge pool
pcblib: the minimalism of our footprint lib
pcblib by Tibor 'Igor2' Palinkas on 2015-07-25
Tags: insight, footprint, library, lib, file, system, filesystem, menufile
Abstract: Rationale on how the footprint library shipped with pcb-rnd is designed and organized and why it should be a minimal library. Plus historical notes on where pcb-rnd came from.
The footprint library shipped with gEDA/PCB is cluttered with special purpose parts. I believe pcb-rnd encourages the user from an early stage to build his own library. Thus the purpose of the library shipped with pcb-rnd should be to provide a minimal collection of real essential footprints ...
- ... for the very beginning of the learning curve;
- ... and to be the core of the user's own library later.
The effort to clean up the footprint situation included:
- replace lib/ and newlib/ with pcblib/, a library that tries to provide common footprints only
- clear the syntax: if a footprint name contains parenthesis, it's generated (parametric footprint), else it's the name of a static footprint file
parametric footprints: replace m4 with a generic, language-independent footprint generator framework
- implement plug_fs, which modularizes searching and loading footprints
- fork gsch2pcb to gsch2pcb-rnd that does not have any m4 references hardwired
- fork gnet_gsch2pcb.scm (the gnetlist backend) to remove m4 heuristics
ExampleInteractive parametric footprint selection in pcb-rnd:
An online footprint generator web1.0 version is also available.
pcblib is a replacement of newlib/ and lib/ and the m4 macros with such an essential core library of static footprints ("file elements") and easier-to-use parametric footprints.
There is an online map of the library and an online interface to the parametric footprint generators.
Parts are sorted only in a few directories: smd, thru-hole, connector and parametric. I believe there are so many orthogonal properties of footprints that there's no obvious hierarchy. Also, pcblib contains much fewer footprints than newlib so it should be still easy to navigate.
Parametric footprints are in a separate directory for now, even tho they would fit under smd, thru-hole or connector. The reason is purely historical and the layout may change in the future.
Footprint selection dialog on pcblib, with the smd directory open. Note how few smd parts are there. Still, smd/ is the most crowded subdirectory!
As of version 1.0.10, the footprint list/search/load of footprints is a plugin. The original code that handles local file system footprint libraries (e.g. pcblib or newlib) is now a plugin. Alternative plugins can be provided that work from databases or from the web . In extreme situations the file system based footprint plugin can even be disabled.