All Projects → pointhi → Kicad Footprint Generator

pointhi / Kicad Footprint Generator

Licence: gpl-3.0
creating kicad footprints using python scripts

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Kicad Footprint Generator

Kcores Flexiblelom Adapter
KCORES FlexibleLOM to PCIe x8 adapter and baffle model
Stars: ✭ 103 (-38.69%)
Mutual labels:  kicad
Arduino Kicad Library
Arduino Shield schematic and footprint library for KiCad
Stars: ✭ 130 (-22.62%)
Mutual labels:  kicad
Ocp2pcie
OCP Mezzanine card V2.0 to standard PCIe slot adapter design
Stars: ✭ 161 (-4.17%)
Mutual labels:  kicad
Kicad Action Scripts
Some KiCad plugins in Python
Stars: ✭ 111 (-33.93%)
Mutual labels:  kicad
Goldfish
A small, thin, USB-C, Pro Micro compatible microcontroller
Stars: ✭ 120 (-28.57%)
Mutual labels:  kicad
Vna
Under development open hardware microwave vector network analyzer
Stars: ✭ 140 (-16.67%)
Mutual labels:  kicad
Minikbd
Stars: ✭ 97 (-42.26%)
Mutual labels:  kicad
Yardstick
Yet Another Radio Dongle
Stars: ✭ 165 (-1.79%)
Mutual labels:  kicad
Fmcw
FMCW radar design files
Stars: ✭ 123 (-26.79%)
Mutual labels:  kicad
Teensy library
KiCAD library for Teensy microcontrollers
Stars: ✭ 158 (-5.95%)
Mutual labels:  kicad
Interactivehtmlbom
Interactive HTML BOM generation plugin for KiCad
Stars: ✭ 1,924 (+1045.24%)
Mutual labels:  kicad
Ergotravel
A Portable Ergonomic Split Keyboard inspired from the ErgoDox, Let's Split and Minidox
Stars: ✭ 120 (-28.57%)
Mutual labels:  kicad
Plotkicadsch
This project aims at being able to export Kicad Sch files to structured picture files
Stars: ✭ 153 (-8.93%)
Mutual labels:  kicad
Kicad 3d Models In Freecad
kicad 3d models in freecad
Stars: ✭ 104 (-38.1%)
Mutual labels:  kicad
Raemixx500
Open Hardware Remake of the Commodore Amiga 500+ Mainboard
Stars: ✭ 161 (-4.17%)
Mutual labels:  kicad
Wiggle Spine
Board design for a 7-module power and data hub, with USB 2.0 and ice40 FPGA.
Stars: ✭ 99 (-41.07%)
Mutual labels:  kicad
Lc kicad lib
kicad production symbol and footprint library auto convert from JLC's integrate Altium Designer library
Stars: ✭ 140 (-16.67%)
Mutual labels:  kicad
Esp32 Kicad Footprints
Footprints for the Espressif ESP32 WiFi/BLE Chip and ESP3212 module, for KiCAD EDA
Stars: ✭ 166 (-1.19%)
Mutual labels:  kicad
Soicbite
A compact PCB footprint which allows SOIC test clips to be used as a space-efficient programming and debugging connector
Stars: ✭ 161 (-4.17%)
Mutual labels:  kicad
Jlckicadtools
Tool for using JLCPCB assembly service with KiCad
Stars: ✭ 155 (-7.74%)
Mutual labels:  kicad

⚠️ 301 Moved Permanently

Location: https://gitlab.com/kicad/libraries/kicad-footprint-generator


This repository contains scripts to generate custom KiCAD footprints using python, and a framework which allows us to create custom KiCAD footprint. A big bunch of footprints of the KiCad library was developed using this framework.

KicadModTree

Licence: GNU GPLv3+

Maintainer: Thomas Pointhuber

Build Status Code Climate Documentation Status

Supports: Python 2.7 and 3.3+

About

I started drawing a bunch of similar footprints for KiCAD, like connectors which are mainly one base shape, and different amount of pins. To be able to update/improve those footprints quickly I decided to write my own footprint generator Framework, to allow simple creation of easy as well complex shapes.

This is my second approach (the first one can be found in the git history). This solution should be able to be easy to use, to read and also be easy to expand with custom nodes.

Overview

This framework is mainly based on the idea of scripted CAD systems (for example OpenSCAD). This means, everything is a node, and can be structured like a tree. In other words, you can group parts of the footprint, and translate them in any way you want. Also cloning & co. is no problem anymore because of this concept.

To be able to create custom Nodes, I separated the system in two parts. Base nodes, which represents simple structures and also be used by KiCAD itself, and specialized nodes which alter the behaviour of base nodes (for example positioning), or represent a specialized usage of base nodes (for example RectLine).

When you serialize your footprint, the serialize command only has to handle base nodes, because all other nodes are based upon the base nodes. This allows us to write specialized nodes without worrying about the FileHandlers or other core systems. You simply create your special node, and the framework knows how to handle it seamlessly.

Please look into the Documentation for further details

KicadModTree        - The KicadModTree framework which is used for footprint generation
docs                - Files required to generate a sphinx documentation
scripts             - scripts which are generating footprints based on this library

Development

Install development Dependencies

manage.sh update_dev_packages

run tests

manage.sh tests

Example Script

from KicadModTree import *

footprint_name = "example_footprint"

# init kicad footprint
kicad_mod = Footprint(footprint_name)
kicad_mod.setDescription("A example footprint")
kicad_mod.setTags("example")

# set general values
kicad_mod.append(Text(type='reference', text='REF**', at=[0, -3], layer='F.SilkS'))
kicad_mod.append(Text(type='value', text=footprint_name, at=[1.5, 3], layer='F.Fab'))

# create silscreen
kicad_mod.append(RectLine(start=[-2, -2], end=[5, 2], layer='F.SilkS'))

# create courtyard
kicad_mod.append(RectLine(start=[-2.25, -2.25], end=[5.25, 2.25], layer='F.CrtYd'))

# create pads
kicad_mod.append(Pad(number=1, type=Pad.TYPE_THT, shape=Pad.SHAPE_RECT,
                     at=[0, 0], size=[2, 2], drill=1.2, layers=Pad.LAYERS_THT))
kicad_mod.append(Pad(number=2, type=Pad.TYPE_THT, shape=Pad.SHAPE_CIRCLE,
                     at=[3, 0], size=[2, 2], drill=1.2, layers=Pad.LAYERS_THT))

# add model
kicad_mod.append(Model(filename="example.3dshapes/example_footprint.wrl",
                       at=[0, 0, 0], scale=[1, 1, 1], rotate=[0, 0, 0]))

# output kicad model
file_handler = KicadFileHandler(kicad_mod)
file_handler.writeFile('example_footprint.kicad_mod')

Usage Steps

  1. Navigate into the scripts directory, and look for the type of footprint you would like to generate. For example, if you wish to generate an SMD inductor footprint, cd into scripts/Inductor_SMD.
  2. Open the *.yaml (or *.yml) file in a text editor. Study a few of the existing footprint definitions to get an idea of how your new footprint entry should be structured.
  3. Add your new footprint by inserting your own new section in the file. An easy way to do this is by simply copying an existing footprint definition, and modifying it to suit your part. Note: You may have to add or remove additional parameters that are not listed.
  4. Save your edits and close the text editor.
  5. Run the python script, passing the *.yaml or (*.yml) file as a parameter, e.g. python3 Inductor_SMD.py Inductor_SMD.yml. This will generate the *.kicad_mod files for each footprint defined in the *.yaml (or *.yml).
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].