3.2.1. Scope
The most important thing to consider when creating a Package is the scope of it. Since LibrePCB handles footprints differently than other EDA tools, special attention is required here.
Think about the appearance of the part (the mechanical shape, dimension and color). If two parts look exactly (or almost) equal, they can use the same Package. If they look different, two separate Packages must be created.
Don’t think about the land pattern (i.e. footprint) of the part — it’s not relevant for this decision. Even if a package can be mounted differently on a PCB (e.g. a THT resistor can be mount horizontally or vertically) and thus require different footprints, only one Package is needed. Similarly, two different-looking parts that have the same land pattern (e.g. a SMD resistor and a SMD LED) should still be two separate Packages. |
Example 1. Color (e.g. 0805 LED)
Even if a 0805 LED with a transparent lens has exactly the same footprint as a 0805 LED with a red lens, they should have separate Packages because of the different color. This way a Device can link to the Package with the proper color, and thus it will appear with the proper color in the 3D PCB preview (once LibrePCB supports 3D models).
Example 2. Height (e.g. SO-8)
Some packages are available in different heights. For instance, SO-8 is available with heights of 1.2mm and 1.4mm. As the 3D models would be different, separate Packages are needed.
Note: To avoid creating too many Packages, a small tolerance is allowed. So for a device with a height of 1.3mm you might want to use the Package with a height of 1.4mm.
Example 3. Mounting variants (e.g. TO220)
Many packages can be mounted either vertically or horizontally, for example the TO220. If mounted horizontally, there might be a hole in the PCB to screw the metal tab down to the PCB, or you may want to solder the tab to the PCB without a hole in it. For all these cases only one Package is needed — the different mounting variants should be handled by different footprint variants inside the Package.