diff --git a/README.md b/README.md index 91f8e86e..b412d1bb 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ 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 DRC one last time (use [KiCad Automation Scripts](https://github.com/INTI-CMNB/kicad-automation-scripts/)) +* Check ERC/DRC one last time (using [KiCad Automation Scripts](https://github.com/INTI-CMNB/kicad-automation-scripts/)) * Gerbers, drills and drill maps for a fab in their favourite format * Fab docs for the assembler * Pick and place files @@ -21,6 +21,80 @@ 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](https://yaml.org/). 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_erc` To run the ERC (Electrical Rules Check). To ensure the schematic is electrically correct. +- `run_drc` To run the DRC (Distance Rules Check). To ensure we have a valid PCB. +- `update_xml` To 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_fills` Every time we run the DRC the zones are filled again. This option saves the PCB to disk updating the zones. +- `ignore_unconnected` Ignores 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: + +- `name` a name so you can easily identify it. +- `comment` a short description of this output. +- `type` selects which type of output will be generated. Examples are *gerbers*, *drill files* and *pick & place files* +- `dir` is the directory where this output will be stored. +- `options` contains one or more options to configure this output. +- `layers` a list of layers used for this output. Not all outputs needs this subsection. + +The available values for *type* are: +- Plot formats: +-- `gerber` the gerbers for fabrication. +-- `ps` postscript plot +--`hpgl` format for laser printers +-- `svg` scalable vector graphics +-- `pdf` portable document format +-- `dxf` mechanical CAD format +- Drill formats: +-- `excellon` data for the drilling machine +-- `gerb_drill` drilling positions in a gerber file +- Pick & place +-- `position` of the components for the pick & place machine +- Documentation +-- `pdf_sch_print` schematic in PDF format +-- `pdf_pcb_print`PDF file containing one or more layer and the page frame +- Bill of Materials +-- `kibom` BoM in HTML or CSV format generated by [KiBoM](https://github.com/INTI-CMNB/KiBoM) +-- `ibom` Interactive HTML BoM generated by [InteractiveHtmlBom](https://github.com/INTI-CMNB/InteractiveHtmlBom) + ## Using KiPlot You can call `kiplot` directly, passing a PCB file and a config file: