|
|
||
|---|---|---|
| debian | ||
| docs/samples | ||
| kiplot | ||
| src | ||
| tests | ||
| .gitignore | ||
| LICENSE | ||
| MANIFEST.in | ||
| Makefile | ||
| README.md | ||
| setup.cfg | ||
| setup.py | ||
README.md
KiPlot
KiPlot is a program which helps you to plot your KiCad PCBs to output formats easily, repeatable, and most of all, scriptably. This means you can use a Makefile to export your KiCad PCBs just as needed.
For example, it's common that you might want for each board rev:
- Check ERC/DRC one last time (using KiCad Automation Scripts)
- Gerbers, drills and drill maps for a fab in their favourite format
- Fab docs for the assembler
- Pick and place files
You want to do this in a one-touch way, and make sure everything you need to do so it securely saved in version control, not on the back of an old datasheet.
KiPlot lets you do this.
As a side effect of providing a scriptable plot driver for KiCad, KiPlot also allows functional testing of KiCad plot functions, which would otherwise be somewhat unwieldy to write.
The configuration file
Kiplot uses a configuration file where you can specify what outputs to generate. By default you'll generate all of them, but you can specify which ones from the command line.
The configuration file should be named *.kiplot.yaml. The format used is YAML. This is basically a text file with some structure.
The header
All configuration files must start with:
kiplot:
version: 1
This tells to Kiplot that this file is using version 1 of the format.
The preflight section
This section is used to specify tasks that will executed before generating any output. The available tasks are:
run_ercTo run the ERC (Electrical Rules Check). To ensure the schematic is electrically correct.run_drcTo run the DRC (Distance Rules Check). To ensure we have a valid PCB.update_xmlTo update the XML version of the BoM (Bill of Materials). To ensure our generated BoM is up to date.
The run_drc command has the following options:
check_zone_fillsEvery time we run the DRC the zones are filled again. This option saves the PCB to disk updating the zones.ignore_unconnectedIgnores the unconnected nets. Useful if you didn't finish the routing.
Here is an example of a preflight section:
preflight:
run_erc: true
update_xml: true
run_drc: true
check_zone_fills: true
ignore_unconnected: false
The outputs section
In this section you put all the things that you want to generate. This section contains one or more outputs. Each output contain the following data:
namea name so you can easily identify it.commenta short description of this output.typeselects which type of output will be generated. Examples are gerbers, drill files and pick & place filesdiris the directory where this output will be stored.optionscontains one or more options to configure this output.layersa list of layers used for this output. Not all outputs needs this subsection.
The available values for type are:
- Plot formats:
--
gerberthe gerbers for fabrication. --pspostscript plot --hpglformat for laser printers --svgscalable vector graphics --pdfportable document format --dxfmechanical CAD format - Drill formats:
--
excellondata for the drilling machine --gerb_drilldrilling positions in a gerber file - Pick & place
--
positionof the components for the pick & place machine - Documentation
--
pdf_sch_printschematic in PDF format --pdf_pcb_printPDF file containing one or more layer and the page frame - Bill of Materials
--
kibomBoM in HTML or CSV format generated by KiBoM --ibomInteractive HTML BoM generated by InteractiveHtmlBom
Using KiPlot
You can call kiplot directly, passing a PCB file and a config file:
kiplot -b $(PCB) -c $(KIPLOT_CFG) -v
A simple target can be added to your makefile, so you can just run
make pcb_files or integrate into your current build process.
pcb_files:
kiplot -b $(PCB) -c $(KIPLOT_CFG) -v
Installing
Installation on Ubuntu/Debian:
Get the Debian package from the releases section and run:
sudo apt install ./kiplot.inti-cmnb_*_all.deb