Skip to main content
Footprint libraries contain the physical PCB land patterns for components. Each footprint defines pad locations, silkscreen, courtyard, and 3D model associations required for PCB layout.

Overview

Footprints are managed separately from schematic symbols, allowing one symbol to be used with multiple package variants. The footprint system is built around the FOOTPRINT class (source/pcbnew/footprint.h:25).

Footprint Structure

FOOTPRINT Class

// Source: pcbnew/footprint.h:25
class FOOTPRINT : public BOARD_ITEM_CONTAINER, public EMBEDDED_FILES
{
    LIB_ID m_libId;                        // Library reference
    std::vector<PAD*> m_pads;              // Solder pads
    std::vector<FP_ZONE*> m_zones;         // Copper zones
    std::vector<PCB_FIELD*> m_fields;      // Text fields
    std::vector<FP_3DMODEL> m_3D_Drawings; // 3D models
    
    VECTOR2I m_pos;                        // Position on board
    EDA_ANGLE m_orient;                    // Rotation angle
    int m_attributes;                      // SMD/THT/DNP flags
    LSET m_LayerSet;                       // Allowed layers
};

Footprint Components

Solderable connection points:
class PAD
{
    wxString m_number;        // Pad number (matches symbol pin)
    PAD_SHAPE m_padShape;     // Circle, rectangle, oval, etc.
    VECTOR2I m_size;          // Pad dimensions
    VECTOR2I m_drill;         // Drill hole size (THT)
    LSET m_layerMask;         // Copper layers
    PAD_ATTRIB m_attribute;   // PTH, SMD, NPTH, connector
};

SMD

Surface mount pads

Through-Hole

Plated holes

NPTH

Non-plated holes

Connector

Edge connectors

Creating Footprints

1

Open Footprint Editor

Launch the Footprint Editor from Pcbnew or the main KiCad window.
2

Set Grid and Units

Configure appropriate grid settings:
  • Imperial: 50 mils or 25 mils for THT
  • Metric: 0.5mm or 0.25mm for SMD
  • Match datasheet measurement units
3

Add Pads

Place pads according to package dimensions:For SMD components:
PAD_ATTRIB::SMD              // Surface mount
PAD_SHAPE::ROUNDRECT         // Rounded rectangle (typical)
// Set size from datasheet
// Place on F.Cu layer only
For through-hole:
PAD_ATTRIB::PTH              // Plated through-hole
PAD_SHAPE::CIRCLE            // Round pad (typical)
// Set pad size and drill diameter
// Present on all copper layers
4

Draw Silkscreen

Add component outline on F.SilkS (or B.SilkS for bottom):
  • Keep silkscreen clear of pads (0.2mm minimum)
  • Add pin 1 indicator (dot, notch, or line)
  • Draw component body outline
  • Avoid placing over copper
5

Define Courtyard

Draw courtyard on F.CrtYd layer:
  • 0.25mm clearance for standard components
  • 0.5mm for large components
  • Must be continuous closed polygon
  • Used for placement collision detection
6

Add Fab Layer Graphics

Create manufacturing reference on F.Fab:
  • Exact component dimensions
  • All pad numbers
  • True component outline
  • Pin 1 indicator
7

Set Attributes

Configure footprint properties:
enum FOOTPRINT_ATTR_T
{
    FP_THROUGH_HOLE = 0x0001,    // Has THT pads
    FP_SMD = 0x0002,             // Surface mount
    FP_EXCLUDE_FROM_POS_FILES = 0x0004,
    FP_EXCLUDE_FROM_BOM = 0x0008,
    FP_BOARD_ONLY = 0x0010,      // Mechanical only
    FP_DNP = 0x0040              // Do not populate
};
8

Associate 3D Model

Link 3D model for visualization:
struct FP_3DMODEL
{
    wxString m_Filename;    // Path to STEP/WRL file
    VECTOR3D m_Scale;       // Model scaling
    VECTOR3D m_Rotation;    // X, Y, Z rotation (degrees)
    VECTOR3D m_Offset;      // Position offset (mm)
};

Pad Properties

Pad Shapes

Circle

Round pads for THT and vias

Rectangle

Square pads, often for pin 1

Oval

Elongated pads for pin headers

Rounded Rectangle

Modern SMD style with rounded corners

Trapezoid

Angled pads for specialized packages

Custom

Arbitrary polygon shapes

Pad Types

PTH
Plated Through-Hole
Standard through-hole component pad with copper on all layers and plated drill hole.
SMD
Surface Mount Device
Pad on surface layer only, no drill hole. Used for SMT components.
NPTH
Non-Plated Through-Hole
Mechanical mounting hole without copper plating.
Connector
Edge Connector
Pad at board edge for card-edge connectors.

Thermal Relief

Pads in copper pours can use thermal relief patterns:
  • Solid: Full connection to plane (hard to solder)
  • Thermal Relief: Spoke pattern (easier soldering, standard)
  • None: No connection to plane

Footprint Variants

Footprints can store variant-specific information:
// Source: pcbnew/footprint.h:145
class FOOTPRINT_VARIANT
{
    wxString m_name;              // Variant name
    bool m_dnp;                   // Do not populate flag
    std::map<wxString, wxString> m_fieldValues;  // Custom field values
};
Variants allow the same footprint to have different properties in different assembly configurations, synchronized with schematic variants.

Library Management

Library Tables

Footprint libraries are defined in fp-lib-table files:
# Location: ~/.config/kicad/8.0/fp-lib-table
(fp_lib_table
  (lib (name Resistor_SMD)(type KiCad)(uri ${KICAD8_FOOTPRINT_DIR}/Resistor_SMD.pretty))
  (lib (name Capacitor_SMD)(type KiCad)(uri ${KICAD8_FOOTPRINT_DIR}/Capacitor_SMD.pretty))
  (lib (name Package_SO)(type KiCad)(uri ${KICAD8_FOOTPRINT_DIR}/Package_SO.pretty))
)

Pretty Format

Footprints are stored in .kicad_mod files within .pretty directories:
(footprint "R_0805_2012Metric" (version 20231120)
  (layer "F.Cu")
  (attr smd)
  (fp_text reference "REF**" (at 0 -1.65) (layer "F.SilkS")
    (effects (font (size 1 1) (thickness 0.15))))
  (fp_text value "R_0805_2012Metric" (at 0 1.65) (layer "F.Fab")
    (effects (font (size 1 1) (thickness 0.15))))
  (fp_line (start -0.227064 0.735) (end 0.227064 0.735)
    (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
  (fp_rect (start -1 0.625) (end 1 -0.625)
    (stroke (width 0.1) (type solid)) (layer "F.Fab"))
  (fp_rect (start -1.68 0.95) (end 1.68 -0.95)
    (stroke (width 0.05) (type solid)) (layer "F.CrtYd"))
  (pad "1" smd roundrect (at -0.9125 0) (size 1.025 1.4)
    (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.243902))
  (pad "2" smd roundrect (at 0.9125 0) (size 1.025 1.4)
    (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.243902))
)

Footprint Wizards

Automate footprint generation for standard packages:
// Source: pcbnew/footprint_wizard.h
class FOOTPRINT_WIZARD
{
    // Generate footprints from parameters
    // Supports: QFP, BGA, DIP, SOIC, etc.
    virtual FOOTPRINT* BuildFootprint() = 0;
};
Use footprint wizards for ICs with many pins. They ensure consistent pad spacing and reduce manual errors.

IPC Standards

Follow IPC-7351 standards for land pattern design:
  • IPC-7351A: Surface mount land patterns
  • IPC-7251: Through-hole land patterns
  • IPC-2221: Generic PCB design standards

Density Levels

Maximum land pattern for hand assembly
  • Larger pads for easier soldering
  • Relaxed tolerances
  • Better thermal relief

Best Practices

  • Match pad numbers to schematic pin numbers exactly
  • Use IPC-7351 calculator for SMD pad sizes
  • Add 10-15% to drill size for plating allowance on PTH
  • Use rounded rectangle pads for modern SMD footprints
  • Ensure paste layer coverage for good solder joints
  • Minimum line width: 0.15mm (0.006”)
  • Minimum text height: 0.8mm (0.031”)
  • Keep 0.2mm clearance from pads
  • Add clear pin 1 indicator
  • Include reference designator
  • Always draw continuous closed polygon
  • Use 0.25mm grid for courtyard lines
  • Standard clearance: 0.25mm for small parts, 0.5mm for large
  • Include component height in 3D view
  • Add datasheet link in footprint properties
  • Include package name in description
  • Note any special requirements (orientation, height limits)
  • Document pin numbering scheme for complex packages

Footprint Testing

Validate footprints before use:
  1. Visual inspection in 3D viewer
  2. Courtyard check for overlaps
  3. DRC compliance with your design rules
  4. Print to scale and compare with actual component
  5. Test assembly on prototype board

Source Code References

// Footprint container class
// Location: source/pcbnew/footprint.h:25  
class FOOTPRINT : public BOARD_ITEM_CONTAINER

Next Steps

PCB Layout

Use footprints in your PCB design

3D Models

Associate 3D models with footprints

Symbol Libraries

Link symbols to footprints

Design Rules

Configure footprint constraints

Build docs developers (and LLMs) love