diff options
Diffstat (limited to 'share/doc/kicad/help/en/pcbnew.html')
-rw-r--r-- | share/doc/kicad/help/en/pcbnew.html | 7544 |
1 files changed, 7544 insertions, 0 deletions
diff --git a/share/doc/kicad/help/en/pcbnew.html b/share/doc/kicad/help/en/pcbnew.html new file mode 100644 index 0000000..5398742 --- /dev/null +++ b/share/doc/kicad/help/en/pcbnew.html @@ -0,0 +1,7544 @@ +<!DOCTYPE html> +<html lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<meta name="generator" content="AsciiDoc 8.6.8"> +<title>Pcbnew</title> +<style type="text/css"> +/* Shared CSS for AsciiDoc xhtml11 and html5 backends */ + +/* Default font. */ +body { + font-family: Georgia,serif; +} + +/* Title font. */ +h1, h2, h3, h4, h5, h6, +div.title, caption.title, +thead, p.table.header, +#toctitle, +#author, #revnumber, #revdate, #revremark, +#footer { + font-family: Arial,Helvetica,sans-serif; +} + +body { + margin: 1em 5% 1em 5%; +} + +a { + color: blue; + text-decoration: underline; +} +a:visited { + color: fuchsia; +} + +em { + font-style: italic; + color: navy; +} + +strong { + font-weight: bold; + color: #083194; +} + +h1, h2, h3, h4, h5, h6 { + color: #527bbd; + margin-top: 1.2em; + margin-bottom: 0.5em; + line-height: 1.3; +} + +h1, h2, h3 { + border-bottom: 2px solid silver; +} +h2 { + padding-top: 0.5em; +} +h3 { + float: left; +} +h3 + * { + clear: left; +} +h5 { + font-size: 1.0em; +} + +div.sectionbody { + margin-left: 0; +} + +hr { + border: 1px solid silver; +} + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +ul, ol, li > p { + margin-top: 0; +} +ul > li { color: #aaa; } +ul > li > * { color: black; } + +pre { + padding: 0; + margin: 0; +} + +#author { + color: #527bbd; + font-weight: bold; + font-size: 1.1em; +} +#email { +} +#revnumber, #revdate, #revremark { +} + +#footer { + font-size: small; + border-top: 2px solid silver; + padding-top: 0.5em; + margin-top: 4.0em; +} +#footer-text { + float: left; + padding-bottom: 0.5em; +} +#footer-badges { + float: right; + padding-bottom: 0.5em; +} + +#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} +div.imageblock, div.exampleblock, div.verseblock, +div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, +div.admonitionblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +div.admonitionblock { + margin-top: 2.0em; + margin-bottom: 2.0em; + margin-right: 10%; + color: #606060; +} + +div.content { /* Block element content. */ + padding: 0; +} + +/* Block element titles. */ +div.title, caption.title { + color: #527bbd; + font-weight: bold; + text-align: left; + margin-top: 1.0em; + margin-bottom: 0.5em; +} +div.title + * { + margin-top: 0; +} + +td div.title:first-child { + margin-top: 0.0em; +} +div.content div.title:first-child { + margin-top: 0.0em; +} +div.content + div.title { + margin-top: 0.0em; +} + +div.sidebarblock > div.content { + background: #ffffee; + border: 1px solid #dddddd; + border-left: 4px solid #f0f0f0; + padding: 0.5em; +} + +div.listingblock > div.content { + border: 1px solid #dddddd; + border-left: 5px solid #f0f0f0; + background: #f8f8f8; + padding: 0.5em; +} + +div.quoteblock, div.verseblock { + padding-left: 1.0em; + margin-left: 1.0em; + margin-right: 10%; + border-left: 5px solid #f0f0f0; + color: #777777; +} + +div.quoteblock > div.attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock > pre.content { + font-family: inherit; + font-size: inherit; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ +div.verseblock + div.attribution { + text-align: left; +} + +div.admonitionblock .icon { + vertical-align: top; + font-size: 1.1em; + font-weight: bold; + text-decoration: underline; + color: #527bbd; + padding-right: 0.5em; +} +div.admonitionblock td.content { + padding-left: 0.5em; + border-left: 3px solid #dddddd; +} + +div.exampleblock > div.content { + border-left: 3px solid #dddddd; + padding-left: 0.5em; +} + +div.imageblock div.content { padding-left: 0; } +span.image img { border-style: none; } +a.image:visited { color: white; } + +dl { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +dt { + margin-top: 0.5em; + margin-bottom: 0; + font-style: normal; + color: navy; +} +dd > *:first-child { + margin-top: 0.1em; +} + +ul, ol { + list-style-position: outside; +} +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { + list-style-type: lower-alpha; +} +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} + +tfoot { + font-weight: bold; +} +td > div.verse { + white-space: pre; +} + +div.hdlist { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +div.hdlist tr { + padding-bottom: 15px; +} +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { + vertical-align: top; + font-style: normal; + padding-right: 0.8em; + color: navy; +} +td.hdlist2 { + vertical-align: top; +} +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} + +.footnote, .footnoteref { + font-size: 0.8em; +} + +span.footnote, span.footnoteref { + vertical-align: super; +} + +#footnotes { + margin: 20px 0 20px 0; + padding: 7px 0 0 0; +} + +#footnotes div.footnote { + margin: 0 0 5px 0; +} + +#footnotes hr { + border: none; + border-top: 1px solid silver; + height: 1px; + text-align: left; + margin-left: 0; + width: 20%; + min-width: 100px; +} + +div.colist td { + padding-right: 0.5em; + padding-bottom: 0.3em; + vertical-align: top; +} +div.colist td img { + margin-top: 0.3em; +} + +@media print { + #footer-badges { display: none; } +} + +#toc { + margin-bottom: 2.5em; +} + +#toctitle { + color: #527bbd; + font-size: 1.1em; + font-weight: bold; + margin-top: 1.0em; + margin-bottom: 0.1em; +} + +div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { + margin-top: 0; + margin-bottom: 0; +} +div.toclevel2 { + margin-left: 2em; + font-size: 0.9em; +} +div.toclevel3 { + margin-left: 4em; + font-size: 0.9em; +} +div.toclevel4 { + margin-left: 6em; + font-size: 0.9em; +} + +span.aqua { color: aqua; } +span.black { color: black; } +span.blue { color: blue; } +span.fuchsia { color: fuchsia; } +span.gray { color: gray; } +span.green { color: green; } +span.lime { color: lime; } +span.maroon { color: maroon; } +span.navy { color: navy; } +span.olive { color: olive; } +span.purple { color: purple; } +span.red { color: red; } +span.silver { color: silver; } +span.teal { color: teal; } +span.white { color: white; } +span.yellow { color: yellow; } + +span.aqua-background { background: aqua; } +span.black-background { background: black; } +span.blue-background { background: blue; } +span.fuchsia-background { background: fuchsia; } +span.gray-background { background: gray; } +span.green-background { background: green; } +span.lime-background { background: lime; } +span.maroon-background { background: maroon; } +span.navy-background { background: navy; } +span.olive-background { background: olive; } +span.purple-background { background: purple; } +span.red-background { background: red; } +span.silver-background { background: silver; } +span.teal-background { background: teal; } +span.white-background { background: white; } +span.yellow-background { background: yellow; } + +span.big { font-size: 2em; } +span.small { font-size: 0.6em; } + +span.underline { text-decoration: underline; } +span.overline { text-decoration: overline; } +span.line-through { text-decoration: line-through; } + + +/* + * xhtml11 specific + * + * */ + +tt { + font-family: monospace; + font-size: inherit; + color: navy; +} + +div.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +div.tableblock > table { + border: 3px solid #527bbd; +} +thead, p.table.header { + font-weight: bold; + color: #527bbd; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} + + +/* + * html5 specific + * + * */ + +.monospaced { + font-family: monospace; + font-size: inherit; + color: navy; +} + +table.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +thead, p.tableblock.header { + font-weight: bold; + color: #527bbd; +} +p.tableblock { + margin-top: 0; +} +table.tableblock { + border-width: 3px; + border-spacing: 0px; + border-style: solid; + border-color: #527bbd; + border-collapse: collapse; +} +th.tableblock, td.tableblock { + border-width: 1px; + padding: 4px; + border-style: solid; + border-color: #527bbd; +} + +table.tableblock.frame-topbot { + border-left-style: hidden; + border-right-style: hidden; +} +table.tableblock.frame-sides { + border-top-style: hidden; + border-bottom-style: hidden; +} +table.tableblock.frame-none { + border-style: hidden; +} + +th.tableblock.halign-left, td.tableblock.halign-left { + text-align: left; +} +th.tableblock.halign-center, td.tableblock.halign-center { + text-align: center; +} +th.tableblock.halign-right, td.tableblock.halign-right { + text-align: right; +} + +th.tableblock.valign-top, td.tableblock.valign-top { + vertical-align: top; +} +th.tableblock.valign-middle, td.tableblock.valign-middle { + vertical-align: middle; +} +th.tableblock.valign-bottom, td.tableblock.valign-bottom { + vertical-align: bottom; +} + + +/* + * manpage specific + * + * */ + +body.manpage h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +body.manpage h2 { + border-style: none; +} +body.manpage div.sectionbody { + margin-left: 3em; +} + +@media print { + body.manpage div#toc { display: none; } +} + + +/* + * Theme specific overrides of the preceding (asciidoc.css) CSS. + * + */ +body { + font-family: Garamond, Georgia, serif; + font-size: 17px; + color: #3E4349; + line-height: 1.3em; +} +h1, h2, h3, h4, h5, h6, +div.title, caption.title, +thead, p.table.header, +#toctitle, +#author, #revnumber, #revdate, #revremark, +#footer { + font-family: Garmond, Georgia, serif; + font-weight: normal; + border-bottom-width: 0; + color: #3E4349; +} +div.title, caption.title { color: #596673; font-weight: bold; } +h1 { font-size: 240%; } +h2 { font-size: 180%; } +h3 { font-size: 150%; } +h4 { font-size: 130%; } +h5 { font-size: 115%; } +h6 { font-size: 100%; } +#header h1 { margin-top: 0; } +#toc { + color: #444444; + line-height: 1.5; + padding-top: 1.5em; +} +#toctitle { + font-size: 20px; +} +#toc a { + border-bottom: 1px dotted #999999; + color: #444444 !important; + text-decoration: none !important; +} +#toc a:hover { + border-bottom: 1px solid #6D4100; + color: #6D4100 !important; + text-decoration: none !important; +} +div.toclevel1 { margin-top: 0.2em; font-size: 16px; } +div.toclevel2 { margin-top: 0.15em; font-size: 14px; } +em, dt, td.hdlist1 { color: black; } +strong { color: #3E4349; } +a { color: #004B6B; text-decoration: none; border-bottom: 1px dotted #004B6B; } +a:visited { color: #615FA0; border-bottom: 1px dotted #615FA0; } +a:hover { color: #6D4100; border-bottom: 1px solid #6D4100; } +div.tableblock > table, table.tableblock { border: 3px solid #E8E8E8; } +th.tableblock, td.tableblock { border: 1px solid #E8E8E8; } +ul > li > * { color: #3E4349; } +pre, tt, .monospaced { font-family: Consolas,Menlo,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace; } +tt, .monospaced { font-size: 0.9em; color: black; +} +div.exampleblock > div.content, div.sidebarblock > div.content, div.listingblock > div.content { border-width: 0 0 0 3px; border-color: #E8E8E8; } +div.verseblock { border-left-width: 0; margin-left: 3em; } +div.quoteblock { border-left-width: 3px; margin-left: 0; margin-right: 0;} +div.admonitionblock td.content { border-left: 3px solid #E8E8E8; } + + +@media screen { + body { + max-width: 50em; /* approximately 80 characters wide */ + margin-left: 16em; + } + + #toc { + position: fixed; + top: 0; + left: 0; + bottom: 0; + width: 13em; + padding: 0.5em; + padding-bottom: 1.5em; + margin: 0; + overflow: auto; + border-right: 3px solid #f8f8f8; + background-color: white; + } + + #toc .toclevel1 { + margin-top: 0.5em; + } + + #toc .toclevel2 { + margin-top: 0.25em; + display: list-item; + color: #aaaaaa; + } + + #toctitle { + margin-top: 0.5em; + } +} +</style> +<script type="text/javascript"> +/*<+'])'); + // Function that scans the DOM tree for header elements (the DOM2 + // nodeIterator API would be a better technique but not supported by all + // browsers). + var iterate = function (el) { + for (var i = el.firstChild; i != null; i = i.nextSibling) { + if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { + var mo = re.exec(i.tagName); + if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { + result[result.length] = new TocEntry(i, getText(i), mo[1]-1); + } + iterate(i); + } + } + } + iterate(el); + return result; + } + + var toc = document.getElementById("toc"); + if (!toc) { + return; + } + + // Delete existing TOC entries in case we're reloading the TOC. + var tocEntriesToRemove = []; + var i; + for (i = 0; i < toc.childNodes.length; i++) { + var entry = toc.childNodes[i]; + if (entry.nodeName.toLowerCase() == 'div' + && entry.getAttribute("class") + && entry.getAttribute("class").match(/^toclevel/)) + tocEntriesToRemove.push(entry); + } + for (i = 0; i < tocEntriesToRemove.length; i++) { + toc.removeChild(tocEntriesToRemove[i]); + } + + // Rebuild TOC entries. + var entries = tocEntries(document.getElementById("content"), toclevels); + for (var i = 0; i < entries.length; ++i) { + var entry = entries[i]; + if (entry.element.id == "") + entry.element.id = "_toc_" + i; + var a = document.createElement("a"); + a.href = "#" + entry.element.id; + a.appendChild(document.createTextNode(entry.text)); + var div = document.createElement("div"); + div.appendChild(a); + div.className = "toclevel" + entry.toclevel; + toc.appendChild(div); + } + if (entries.length == 0) + toc.parentNode.removeChild(toc); +}, + + +///////////////////////////////////////////////////////////////////// +// Footnotes generator +///////////////////////////////////////////////////////////////////// + +/* Based on footnote generation code from: + * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html + */ + +footnotes: function () { + // Delete existing footnote entries in case we're reloading the footnodes. + var i; + var noteholder = document.getElementById("footnotes"); + if (!noteholder) { + return; + } + var entriesToRemove = []; + for (i = 0; i < noteholder.childNodes.length; i++) { + var entry = noteholder.childNodes[i]; + if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") + entriesToRemove.push(entry); + } + for (i = 0; i < entriesToRemove.length; i++) { + noteholder.removeChild(entriesToRemove[i]); + } + + // Rebuild footnote entries. + var cont = document.getElementById("content"); + var spans = cont.getElementsByTagName("span"); + var refs = {}; + var n = 0; + for (i=0; i<spans.length; i++) { + if (spans[i].className == "footnote") { + n++; + var note = spans[i].getAttribute("data-note"); + if (!note) { + // Use [\s\S] in place of . so multi-line matches work. + // Because JavaScript has no s (dotall) regex flag. + note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; + spans[i].innerHTML = + "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + + "' title='View footnote' class='footnote'>" + n + "</a>]"; + spans[i].setAttribute("data-note", note); + } + noteholder.innerHTML += + "<div class='footnote' id='_footnote_" + n + "'>" + + "<a href='#_footnoteref_" + n + "' title='Return to text'>" + + n + "</a>. " + note + "</div>"; + var id =spans[i].getAttribute("id"); + if (id != null) refs["#"+id] = n; + } + } + if (n == 0) + noteholder.parentNode.removeChild(noteholder); + else { + // Process footnoterefs. + for (i=0; i<spans.length; i++) { + if (spans[i].className == "footnoteref") { + var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); + href = href.match(/#.*/)[0]; // Because IE return full URL. + n = refs[href]; + spans[i].innerHTML = + "[<a href='#_footnote_" + n + + "' title='View footnote' class='footnote'>" + n + "</a>]"; + } + } + } +}, + +install: function(toclevels) { + var timerId; + + function reinstall() { + asciidoc.footnotes(); + if (toclevels) { + asciidoc.toc(toclevels); + } + } + + function reinstallAndRemoveTimer() { + clearInterval(timerId); + reinstall(); + } + + timerId = setInterval(reinstall, 500); + if (document.addEventListener) + document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); + else + window.onload = reinstallAndRemoveTimer; +} + +} +asciidoc.install(2); +/*]]>*/ +</script> +</head> +<body class="book"> +<div id="header"> +<h1>Pcbnew</h1> +<span id="author">The KiCad Team</span><br> +<div id="toc"> + <div id="toctitle">Table of Contents</div> + <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript> +</div> +</div> +<div id="content"> +<div id="preamble"> +<div class="sectionbody"> +<div class="paragraph"><p><em>Reference manual</em></p></div> +<div class="paragraph" id="copyright"><p><strong>Copyright</strong></p></div> +<div class="paragraph"><p>This document is Copyright © 2010-2015 by its contributors as listed +below. You may distribute it and/or modify it under the terms of either +the GNU General Public License (<a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a>), +version 3 or later, or the Creative Commons Attribution License +(<a href="http://creativecommons.org/licenses/by/3.0/">http://creativecommons.org/licenses/by/3.0/</a>), version 3.0 or later.</p></div> +<div class="paragraph"><p>All trademarks within this guide belong to their legitimate owners.</p></div> +<div class="paragraph" id="contributors"><p><strong>Contributors</strong></p></div> +<div class="paragraph"><p>Jean-Pierre Charras, Fabrizio Tappero.</p></div> +<div class="paragraph" id="feedback"><p><strong>Feedback</strong></p></div> +<div class="paragraph"><p>Please direct any bug reports, suggestions or new versions to here:</p></div> +<div class="ulist"><ul> +<li> +<p> +About KiCad document: <a href="https://github.com/KiCad/kicad-doc/issues">https://github.com/KiCad/kicad-doc/issues</a> +</p> +</li> +<li> +<p> +About KiCad software: <a href="https://bugs.launchpad.net/kicad">https://bugs.launchpad.net/kicad</a> +</p> +</li> +<li> +<p> +About KiCad software i18n: <a href="https://github.com/KiCad/kicad-i18n/issues">https://github.com/KiCad/kicad-i18n/issues</a> +</p> +</li> +</ul></div> +<div class="paragraph" id="publication_date_and_software_version"><p><strong>Publication date and software version</strong></p></div> +<div class="paragraph"><p>2014, march 17.</p></div> +</div> +</div> +<div class="sect1"> +<h2 id="_introduction_to_pcbnew">1. Introduction to Pcbnew</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_description">1.1. Description</h3> +<div class="paragraph"><p>Pcbnew is a powerful printed circuit board software tool available +for the Linux, Microsoft Windows and Apple OS X operating systems. +Pcbnew is used in association with the schematic capture +program Eeschema to create printed circuit boards.</p></div> +<div class="paragraph"><p>Pcbnew manages libraries of footprints. Each footprint is a drawing of the +physical component including its land pattern (the layout of pads +on the circuit board). The required footprints are +automatically loaded during the reading of the Netlist. Any changes to footprint +selection or annotation can be changed in the schematic and updated in pcbnew +by regenerating the netlist and reading it in pcbnew again.</p></div> +<div class="paragraph"><p>Pcbnew provides a design rules check (DRC) tool which prevents track and pad clearance +issues as well as preventing nets from being connected that aren’t connected +in the netlist/schematic. When using the interactive router it continuously +runs the design rules check and will help automatically route individual traces.</p></div> +<div class="paragraph"><p>Pcbnew provides a rats nest display, a hairline connecting the pads +of footprints which are connected on the schematic. These connections +move dynamically as track and footprint movements are made.</p></div> +<div class="paragraph"><p>Pcbnew has a simple but effective autorouter to assist in the +production of the circuit board. An Export/Import in SPECCTRA dsn format +allows the use of more advanced auto-routers.</p></div> +<div class="paragraph"><p>Pcbnew provides options specifically provided for the production of ultra +high frequency microwave circuits (such as pads of trapezoidal and complex +form, automatic layout of coils on the printed circuit, etc).</p></div> +</div> +<div class="sect2"> +<h3 id="_principal_design_features">1.2. Principal design features</h3> +<div class="paragraph"><p>The smallest unit in pcbnew is 1 nanometer. All dimensions are stored as integer +nanometers.</p></div> +<div class="paragraph"><p>Pcbnew can generate up to 32 layers of copper, 14 technical layers (silk screen, +solder mask, component adhesive, solder paste and edge cuts) plus +4 auxiliary layers (drawings and comments) and manages in real time +the hairline indication (rats nest) of missing tracks.</p></div> +<div class="paragraph"><p>The display of the PCB elements (tracks, pads, text, drawings…) +is customizable:</p></div> +<div class="ulist"><ul> +<li> +<p> +In full or outline. +</p> +</li> +<li> +<p> +With or without track clearance. +</p> +</li> +</ul></div> +<div class="paragraph"><p>For complex circuits, the display of layers, zones, and components +can be hidden in a selective way for clarity on screen. Nets of traces can be +highlighted to provide high contrast as well.</p></div> +<div class="paragraph"><p>Footprints can be rotated to any angle, with a resolution of 0.1 degree.</p></div> +<div class="paragraph"><p>Pcbnew includes a Footprint Editor that allows editing of individual footprints +that have been on a pcb or editing a footprint in a library.</p></div> +<div class="paragraph"><p>The Footprint Editor provides many time saving tools such as:</p></div> +<div class="ulist"><ul> +<li> +<p> +Fast pad numbering by simply dragging the mouse over pads in the order you + want them numbered. +</p> +</li> +<li> +<p> +Easy generation of rectangular and circular arrays of pads for LGA/BGA + or circular footprints. +</p> +</li> +<li> +<p> +Semi-automatic aligning of rows or columns of pads. +</p> +</li> +</ul></div> +<div class="paragraph"><p>Footprint pads have a variety of properties that can be adjusted. The pads can be +round, rectangular, oval or trapezoidal. For through-hole parts drills can be offset +inside the pad and be round or a slot. Individual pads can also be rotated and have +unique soldermask, net, or paste clearance. Pads can also have a solid connection +or a thermal relief connection for easier manufacturing. Any combination of unique +pads can be placed within a footprint.</p></div> +<div class="paragraph"><p>Pcbnew easily generates all the documents necessary for production:</p></div> +<div class="ulist"><ul> +<li> +<p> +Fabrication outputs: +</p> +<div class="ulist"><ul> +<li> +<p> +Files for Photoplotters in GERBER RS274X format. +</p> +</li> +<li> +<p> +Files for drilling in EXCELLON format. +</p> +</li> +</ul></div> +</li> +<li> +<p> +Plot files in HPGL, SVG and DXF format. +</p> +</li> +<li> +<p> +Plot and drilling maps in POSTSCRIPT format. +</p> +</li> +<li> +<p> +Local Printout. +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_general_remarks">1.3. General remarks</h3> +<div class="paragraph"><p>Due to the degree of control necessary it is highly suggested to use a 3-button +mouse with pcbnew. Many features such as panning and zooming require a 3-button +mouse.</p></div> +<div class="paragraph"><p>In the new release of KiCad, pcbnew has seen wide sweeping changes from developers +at CERN. This includes features such as a new renderer (OpenGL and Cairo view modes), +an interative push and shove router, differential and meander trace routing and tuning, +a reworked Footprint Editor, and many other features. Please note that most of +these new features <strong>only</strong> exist in the new OpenGL and Cairo view modes.</p></div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_installation">2. Installation</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_installation_of_the_software">2.1. Installation of the software</h3> +<div class="paragraph"><p>The installation procedure is described in the KiCad documentation.</p></div> +</div> +<div class="sect2"> +<h3 id="_modifying_the_default_configuration">2.2. Modifying the default configuration</h3> +<div class="paragraph"><p>A default configuration file <span class="monospaced">kicad.pro</span> is provided in +<span class="monospaced">kicad/share/template</span>. This file is used as the initial +configuration for all new projects.</p></div> +<div class="paragraph"><p>This configuration file can be modified to change the libraries to be +loaded.</p></div> +<div class="paragraph"><p>To do this:</p></div> +<div class="ulist"><ul> +<li> +<p> +Launch Pcbnew using kicad or directly. On Windows it is in + <span class="monospaced">C:\kicad\bin\pcbnew.exe</span> and on Linux you can run + <span class="monospaced">/usr/local/kicad/bin/kicad</span> or <span class="monospaced">/usr/local/kicad/bin/pcbnew</span> if the + binaries are located in <span class="monospaced">/usr/local/kicad/bin</span>. +</p> +</li> +<li> +<p> +Select Preferences - Libs and Dir. +</p> +</li> +<li> +<p> +Edit as required. +</p> +</li> +<li> +<p> +Save the modified configuration (Save Cfg) to + <span class="monospaced">kicad/share/template/kicad.pro</span>. +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_managing_footprint_libraries_legacy_versions">2.3. Managing Footprint Libraries: legacy versions</h3> +<div class="paragraph"><p>You can have access to the library list initialization from the +Preferences menu:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Library_list_menu_item.png" alt="images/Library_list_menu_item.png"> +</div> +</div> +<div class="paragraph"><p>The image below shows the dialog which allows you to set the +footprint library list:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Footprint_library_list.png" alt="images/Footprint_library_list.png"> +</div> +</div> +<div class="paragraph"><p>You can use this to add all the libraries that contain the footprints required +for your project. You should also remove unused libraries from new +projects to prevent footprint name clashes. Please note, there is an +issue with the footprint library list when duplicate footprint names +exist in more than one library. When this occurs, the footprint +will be loaded from the first library found in the list. If this is an +issue (you cannot load the footprint you want), either change the +library list order using the "Up" and "Down" buttons in the dialog +above or give the footprint a unique name using the footprint +editor.</p></div> +</div> +<div class="sect2"> +<h3 id="_managing_footprint_libraries_pretty_repositories">2.4. Managing Footprint Libraries: .pretty repositories</h3> +<div class="paragraph"><p>As of release 4.0, Pcbnew uses the new footprint library table +implementation to manage footprint libraries. The information in +the previous section is no longer valid. The library table manager is +accessible by:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Library_tables_menu_item.png" alt="images/Library_tables_menu_item.png"> +</div> +</div> +<div class="paragraph"><p>The image below shows the footprint library table editing dialog +which can be opened by invoking the "Footprint Libraries Manager" +entry from the "Preferences" menu.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Footprint_tables_list.png" alt="images/Footprint_tables_list.png"> +</div> +</div> +<div class="paragraph"><p>The footprint library table is used to map a footprint library of +any supported library type to a library nickname. This nickname is +used to look up footprints instead of the previous method which +depended on library search path ordering. This allows Pcbnew to +access footprints with the same name in different libraries by +ensuring that the correct footprint is loaded from the appropriate +library. It also allows Pcbnew to support loading libraries from +different PCB editors such as Eagle and gEDA.</p></div> +<div class="sect3"> +<h4 id="_global_footprint_library_table">2.4.1. Global Footprint Library Table</h4> +<div class="paragraph"><p>The global footprint library table contains the list of libraries +that are always available regardless of the currently loaded +project file. The table is saved in the file <span class="monospaced">fp-lib-table</span> in the +user’s home folder. The location of this folder is dependent on the +operating system.</p></div> +</div> +<div class="sect3"> +<h4 id="_project_specific_footprint_library_table">2.4.2. Project Specific Footprint Library Table</h4> +<div class="paragraph"><p>The project specific footprint library table contains the list of +libraries that are available specifically for the currently loaded +project file. The project specific footprint library table can only +be edited when it is loaded along with the project board file. If +no project file is loaded or there is no footprint library table +file in the project path, an empty table is created which can be +edited and later saved along with the board file.</p></div> +</div> +<div class="sect3"> +<h4 id="_initial_configuration">2.4.3. Initial Configuration</h4> +<div class="paragraph"><p>The first time CvPcb or Pcbnew is run and the global footprint table +file <span class="monospaced">fp-lib-table</span> is not found in the user’s home folder, Pcbnew +will attempt to copy the default footprint table file +fp_global_table stored in the system’s KiCad template folder to the +file <span class="monospaced">fp-lib-table</span> in the user’s home folder. If fp_global_table +cannot be found, an empty footprint library table will be created in +the user’s home folder. If this happens, the user can either copy +fp_global_table manually or configure the table by hand. The +default footprint library table includes all of the standard +footprint libraries that are installed as part of KiCad.</p></div> +</div> +<div class="sect3"> +<h4 id="_adding_table_entries">2.4.4. Adding Table Entries</h4> +<div class="paragraph"><p>In order to use a footprint library, it must first be added to +either the global table or the project specific table. The project +specific table is only applicable when a board file is open. Each +library entry must have a unique nickname. This does not have to be +related in any way to the actual library file name or path. The +colon <span class="monospaced">:</span> character cannot be used anywhere in the nickname. Each +library entry must have a valid path and/or file name depending on +the type of library. Paths can be defined as absolute, relative, or +by environment variable substitution. The +appropriate plug in type must be selected in order for the library +to be properly read. Pcbnew currently supports reading KiCad +legacy, KiCad Pretty, Eagle, and gEDA footprint libraries. There +is also a description field to add a description of the library +entry. The option field is not used at this time so adding options +will have no effect when loading libraries. Please note that you +cannot have duplicate library nicknames in the same table. However, +you can have duplicate library nicknames in both the global and +project specific footprint library table. The project specific +table entry will take precedence over the global table entry when +duplicated names occur. When entries are defined in the project +specific table, an fp-lib-table file containing the entries will be +written into the folder of the currently open netlist.</p></div> +</div> +<div class="sect3"> +<h4 id="_environment_variable_substitution">2.4.5. Environment Variable Substitution</h4> +<div class="paragraph"><p>One of the most powerful features of the footprint library table is +environment variable substitution. This allows you to define custom +paths to where your libraries are stored in environment variables. +Environment variable substitution is supported by using the syntax +<span class="monospaced">${ENV_VAR_NAME}</span> in the footprint library path. By default, at run +time Pcbnew defines the <span class="monospaced">$KISYSMOD</span> environment variable. This points +to where the default footprint libraries that were installed with +KiCad are located. You can override <span class="monospaced">$KISYSMOD</span> by defining it +yourself which allows you to substitute your own libraries in place +of the default KiCad footprint libraries. When a board file is +loaded, Pcbnew also defines the <span class="monospaced">$KPRJMOD</span> using the board file path. +This allows you to create libraries in the project path without +having to define the absolute path to the library in the project +specific footprint library table.</p></div> +</div> +<div class="sect3"> +<h4 id="_using_the_github_plugin">2.4.6. Using the GitHub Plugin</h4> +<div class="paragraph"><p>The GitHub plugin is a special plugin that provides an interface for +read-only access to a remote GitHub repository consisting of pretty +(Pretty is name of the KiCad footprint file format) footprints and +optionally provides "Copy-On-Write" (COW) support for editing +footprints read from the GitHub repo and saving them locally. +Therefore the "GitHub" plugin is for <strong>read-only for accessing remote +pretty footprint libraries</strong> at <a href="https://github.com">https://github.com</a>. To add a GitHub +entry to the footprint library table the "Library Path" in the +footprint library table entry must be set to a valid GitHub URL.</p></div> +<div class="paragraph"><p>For example:</p></div> +<div class="literalblock"> +<div class="content monospaced"> +<pre>https://github.com/liftoff-sr/pretty_footprints</pre> +</div></div> +<div class="paragraph"><p>Typically GitHub URLs take the form:</p></div> +<div class="literalblock"> +<div class="content monospaced"> +<pre>https://github.com/user_name/repo_name</pre> +</div></div> +<div class="paragraph"><p>The "Plugin Type" must be set to "Github". To enable the "Copy-On-Write" +feature the option <span class="monospaced">allow_pretty_writing_to_this_dir</span> must be +added to the "Options" setting of the footprint library table entry. +This option is the "Library Path" for local storage of modified +copies of footprints read from the GitHub repo. The footprints +saved to this path are combined with the read-only part of the +GitHub repository to create the footprint library. If this option +is missing, then the GitHub library is read-only. If the option is +present for a GitHub library, then any writes to this hybrid library +will go to the local <span class="monospaced">*.pretty</span> directory. Note that the github.com +resident portion of this hybrid COW library is always read-only, +meaning you cannot delete anything or modify any footprint in the +specified GitHub repository directly. The aggregate library type +remains "Github" in all further discussions, but it consists of both +the local read/write portion and the remote read-only portion.</p></div> +<div class="paragraph"><p>The table below shows a footprint library table entry without the +option <span class="monospaced">allow_pretty_writing_to_this_dir</span>:</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:20%;"> +<col style="width:20%;"> +<col style="width:20%;"> +<col style="width:20%;"> +<col style="width:20%;"> +<thead> +<tr> +<th class="tableblock halign-left valign-top" > Nickname </th> +<th class="tableblock halign-left valign-top" > Library Path </th> +<th class="tableblock halign-left valign-top" > Plugin Type </th> +<th class="tableblock halign-left valign-top" > Options </th> +<th class="tableblock halign-left valign-top" > Description</th> +</tr> +</thead> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">github</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><a href="https://github.com/liftoff-sr/pretty_footprints">https://github.com/liftoff-sr/pretty_footprints</a></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Github</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Liftoff’s GH footprints</p></td> +</tr> +</tbody> +</table> +<div class="paragraph"><p>The table below shows a footprint library table entry with the COW +option given. Note the use of the environment variable <span class="monospaced">${HOME}</span> as +an example only. The github.pretty directory is located in +<span class="monospaced">${HOME}/pretty/path</span>. Anytime you use the option +<span class="monospaced">allow_pretty_writing_to_this_dir</span>, you will need to create that +directory manually in advance and it must end with the extension +<span class="monospaced">.pretty</span>.</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:20%;"> +<col style="width:20%;"> +<col style="width:20%;"> +<col style="width:20%;"> +<col style="width:20%;"> +<thead> +<tr> +<th class="tableblock halign-left valign-top" > Nickname </th> +<th class="tableblock halign-left valign-top" > Library Path </th> +<th class="tableblock halign-left valign-top" > Plugin Type </th> +<th class="tableblock halign-left valign-top" > Options </th> +<th class="tableblock halign-left valign-top" > Description</th> +</tr> +</thead> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">github</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><a href="https://github.com/liftoff-sr/pretty_footprints">https://github.com/liftoff-sr/pretty_footprints</a></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Github</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Liftoff’s GH footprints</p></td> +</tr> +</tbody> +</table> +<div class="paragraph"><p>Footprint loads will always give precedence to the local footprints +found in the path given by the option +<span class="monospaced">allow_pretty_writing_to_this_dir</span>. Once you have saved a footprint +to the COW library’s local directory by doing a footprint save in +the Footprint Editor, no GitHub updates will be seen when loading a +footprint with the same name as one for which you’ve saved locally.</p></div> +<div class="paragraph"><p>Always keep a separate local <span class="monospaced">*.pretty</span> directory for each GitHub +library, never combine them by referring to the same directory more +than once. Also, do not use the same COW (<span class="monospaced">*.pretty</span>) directory in +a footprint library table entry. This would likely create a mess. +The value of the option <span class="monospaced">allow_pretty_writing_to_this_dir</span> will +expand any environment variable using the <span class="monospaced">${}</span> notation to create +the path in the same way as the "Library Path" setting.</p></div> +<div class="paragraph"><p>What’s the point of COW? It is to turbo-charge the sharing of +footprints. If you periodically email your COW pretty footprint +modifications to the GitHub repository maintainer, you can help +update the GitHub copy. Simply email the individual <span class="monospaced">*.kicad_mod</span> +files you find in your COW directories to the maintainer of the +GitHub repository. After you’ve received confirmation that your +changes have been committed, you can safely delete your COW file(s) +and the updated footprint from the read-only part of GitHub library +will flow down. Your goal should be to keep the COW file set as +small as possible by contributing frequently to the shared master +copies at <a href="https://github.com">https://github.com</a>.</p></div> +<div class="paragraph"><p>Finally, Nginx can be used as a cache to the github server to speed +up the loading of footprints. It can be installed locally or on a +network server. There is an example configuration in KiCad sources +at pcbnew/github/nginx.conf. The most straightforward way to get +this working is to overwrite the default nginx.conf with this one +and <span class="monospaced">export KIGITHUB=http://my_server:54321/KiCad</span>, where +<span class="monospaced">my_server</span> is the IP or domain name of the machine running nginx.</p></div> +</div> +<div class="sect3"> +<h4 id="_usage_patterns">2.4.7. Usage Patterns</h4> +<div class="paragraph"><p>Footprint libraries can be defined either globally or specifically +to the currently loaded project. Footprint libraries defined in the +user’s global table are always available and are stored in the +<span class="monospaced">fp-lib-table</span> file in the user’s home folder. Global footprint +libraries can always be accessed even when there is no project net +list file opened. The project specific footprint table is active +only for the currently open net list file. The project specific +footprint library table is saved in the file fp-lib-table in the +path of the currently open board file. You are free to define +libraries in either table.</p></div> +<div class="paragraph"><p>There are advantages and disadvantages to each method:</p></div> +<div class="ulist"><ul> +<li> +<p> +You can define all of your libraries in the global table which means + they will always be available when you need them. +</p> +<div class="ulist"><ul> +<li> +<p> +The disadvantage of this is that you may have to search through a lot + of libraries to find the footprint you are looking for. +</p> +</li> +</ul></div> +</li> +<li> +<p> +You can define all your libraries on a project specific basis. +</p> +<div class="ulist"><ul> +<li> +<p> +The advantage of this is that you only need to define the libraries + you actually need for the project which cuts down on searching. +</p> +</li> +<li> +<p> +The disadvantage is that you always have to remember to add each + footprint library that you need for every project. +</p> +</li> +</ul></div> +</li> +<li> +<p> +You can also define footprint libraries both globally and project + specifically. +</p> +</li> +</ul></div> +<div class="paragraph"><p>One usage pattern would be to define your most commonly used +libraries globally and the library only required for the project in +the project specific library table. There is no restriction on how +you define your libraries.</p></div> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_general_operations">3. General operations</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_toolbars_and_commands">3.1. Toolbars and commands</h3> +<div class="paragraph"><p>In Pcbnew it is possible to execute commands using various means:</p></div> +<div class="ulist"><ul> +<li> +<p> +Text-based menu at the top of the main window. +</p> +</li> +<li> +<p> +Top toolbar menu. +</p> +</li> +<li> +<p> +Right toolbar menu. +</p> +</li> +<li> +<p> +Left toolbar menu. +</p> +</li> +<li> +<p> +Mouse buttons (menu options). Specifically: +</p> +<div class="ulist"><ul> +<li> +<p> +The right mouse button reveals a pop-up menu the content of + which depends on the element under the mouse arrow. +</p> +</li> +</ul></div> +</li> +<li> +<p> +Keyboard (Function keys <span class="monospaced">F1</span>, <span class="monospaced">F2</span>, <span class="monospaced">F3</span>, <span class="monospaced">F4</span>, <span class="monospaced">Shift</span>, <span class="monospaced">Delete</span>, <span class="monospaced">+</span>, <span class="monospaced">-</span>, <span class="monospaced">Page Up</span>, + <span class="monospaced">Page Down</span> and <span class="monospaced">Space bar</span>). The <span class="monospaced">Escape</span> key generally cancels an + operation in progress. +</p> +</li> +</ul></div> +<div class="paragraph"><p>The screenshot below illustrates some of the possible accesses to these +operations:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Right-click_legacy_menu.png" alt="images/Right-click_legacy_menu.png"> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_mouse_commands">3.2. Mouse commands</h3> +<div class="sect3"> +<h4 id="_basic_commands">3.2.1. Basic commands</h4> +<div class="ulist"><ul> +<li> +<p> +Left button +</p> +<div class="ulist"><ul> +<li> +<p> +Single-click displays the characteristics of the footprint or text under + the cursor in the lower status bar. +</p> +</li> +<li> +<p> +Double-click displays the editor (if the element is editable) of the + element under the cursor. +</p> +</li> +</ul></div> +</li> +<li> +<p> +Centre button/wheel +</p> +<div class="ulist"><ul> +<li> +<p> +Rapid zoom and some commands in layer manager. +</p> +</li> +<li> +<p> +Hold down the centre button and draw a rectangle to zoom to the + described area. Rotation of the mouse wheel will allow you to zoom + in and zoom out. +</p> +</li> +</ul></div> +</li> +<li> +<p> +Right button +</p> +<div class="ulist"><ul> +<li> +<p> +Displays a pop-up menu +</p> +</li> +</ul></div> +</li> +</ul></div> +</div> +<div class="sect3"> +<h4 id="_operations_on_blocks">3.2.2. Operations on blocks</h4> +<div class="paragraph"><p>Operations to move, invert (mirror), copy, rotate and delete a block +are all available via the pop-up menu. In addition, the view can zoom +to the area described by the block.</p></div> +<div class="paragraph"><p>The framework of the block is traced by moving the mouse while +holding down the left mouse button. The operation is executed when +the button is released.</p></div> +<div class="paragraph"><p>By holding down one of the hotkeys <span class="monospaced">Shift</span> or <span class="monospaced">Ctrl</span>, or both keys +<span class="monospaced">Shift</span> and <span class="monospaced">Ctrl</span> together, while the block is drawn the operation +invert, rotate or delete is automatically selected as shown in the +table below:</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:50%;"> +<col style="width:50%;"> +<thead> +<tr> +<th class="tableblock halign-left valign-top" > Action </th> +<th class="tableblock halign-left valign-top" > Effect</th> +</tr> +</thead> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Left mouse button held down</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Trace framework to move block</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">Shift</span> + Left mouse button held down</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Trace framework for invert block</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">Ctrl</span> + Left mouse button held down</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Trace framework for rotating block 90°</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">Shift</span> + <span class="monospaced">Ctrl</span> + Left mouse button held down</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Trace framework to delete the block</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Centre mouse button held down</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Trace framework to zoom to block</p></td> +</tr> +</tbody> +</table> +<div class="paragraph"><p>When moving a block:</p></div> +<div class="ulist"><ul> +<li> +<p> +Move block to new position and operate left mouse button to place + the elements. +</p> +</li> +<li> +<p> +To cancel the operation use the right mouse button + and select Cancel Block from the menu (or press the <span class="monospaced">Esc</span> key). +</p> +</li> +</ul></div> +<div class="paragraph"><p>Alternatively if no key is pressed when drawing the block use the +right mouse button to display the pop-up menu and select the +required operation.</p></div> +<div class="paragraph"><p>For each block operation a selection window enables the action to be +limited to only some elements.</p></div> +</div> +</div> +<div class="sect2"> +<h3 id="_selection_of_grid_size">3.3. Selection of grid size</h3> +<div class="paragraph"><p>During element layout the cursor moves on a grid. The grid can be turned on or off using the icon on the left toolbar.</p></div> +<div class="paragraph"><p>Any of the pre-defined grid sizes, or a User Defined grid, can be +chosen using the pop-up window, or the drop-down selector on the +toolbar at the top of the screen. The size of the User Defined grid +is set using the menu bar option Dimensions → User Grid Size.</p></div> +</div> +<div class="sect2"> +<h3 id="_adjustment_of_the_zoom_level">3.4. Adjustment of the zoom level</h3> +<div class="paragraph"><p>The zoom level can be changed using any of the following methods:</p></div> +<div class="ulist"><ul> +<li> +<p> +Open the pop-up window (using the right mouse button) and then select the desired zoom. +</p> +</li> +<li> +<p> +Use the following function keys: +</p> +<div class="ulist"><ul> +<li> +<p> +<span class="monospaced">F1</span>: Enlarge (zoom in) +</p> +</li> +<li> +<p> +<span class="monospaced">F2</span>: Reduce (zoom out) +</p> +</li> +<li> +<p> +<span class="monospaced">F3</span>: Redraw the display +</p> +</li> +<li> +<p> +<span class="monospaced">F4</span>: Centre view at the current cursor position +</p> +</li> +</ul></div> +</li> +<li> +<p> +Rotate the mouse wheel. +</p> +</li> +<li> +<p> +Hold down the middle mouse button and draw a rectangle to zoom to the described area. +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_displaying_cursor_coordinates">3.5. Displaying cursor coordinates</h3> +<div class="paragraph"><p>The cursor coordinates are displayed in inches or millimetres as selected using the <em>In</em> or <em>mm</em> icons on the left hand side toolbar.</p></div> +<div class="paragraph"><p>Whichever unit is selected Pcbnew always works to a precision of 1/10,000 of inch.</p></div> +<div class="paragraph"><p>The status bar at the bottom of the screen gives:</p></div> +<div class="ulist"><ul> +<li> +<p> +The current zoom setting. +</p> +</li> +<li> +<p> +The absolute position of the cursor. +</p> +</li> +<li> +<p> +The relative position of the cursor. Note the relative coordinates (x,y) can be set to (0,0) at any position by pressing the space bar. The cursor position is then displayed relative to this new datum. +</p> +</li> +</ul></div> +<div class="paragraph"><p>In addition the relative position of the cursor can be displayed using its polar co-ordinates (ray + angle). This can be turned on and off using the icon in the left hand side toolbar.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_coordinate_status_display.png" alt="images/Pcbnew_coordinate_status_display.png"> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_keyboard_commands_hotkeys">3.6. Keyboard commands - hotkeys</h3> +<div class="paragraph"><p>Many commands are accessible directly with the keyboard. Selection can be either upper or lower case. Most hot keys are shown in menus. Some hot keys that do not appear are:</p></div> +<div class="ulist"><ul> +<li> +<p> +<span class="monospaced">Delete</span>: deletes a footprint or a track. (<em>Available only if the Footprint mode or the Track mode is active</em>) +</p> +</li> +<li> +<p> +<span class="monospaced">V</span>: if the track tool is active switches working layer or place via, if a track is in progress. +</p> +</li> +<li> +<p> +<span class="monospaced">+</span> and <span class="monospaced">-</span>: select next or previous layer. +</p> +</li> +<li> +<p> +<span class="monospaced">?</span>: display the list of all hot keys. +</p> +</li> +<li> +<p> +<span class="monospaced">Space</span>: reset relative coordinates. +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_operation_on_blocks">3.7. Operation on blocks</h3> +<div class="paragraph"><p>Operations to move, invert (mirror), copy, rotate and delete a block +are all available from the pop-up menu. In addition, the view can +zoom to that described by the block.</p></div> +<div class="paragraph"><p>The framework of the block is traced by moving the mouse while +holding down the left mouse button. The operation is executed when +the button is released.</p></div> +<div class="paragraph"><p>By holding down one of the keys <span class="monospaced">Shift</span> or <span class="monospaced">Ctrl</span>, both <span class="monospaced">Shift</span> and +<span class="monospaced">Ctrl</span> together, or <span class="monospaced">Alt</span>, while the block is drawn the operation +invert, rotate, delete or copy is automatically selected as shown in +the table below:</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:50%;"> +<col style="width:50%;"> +<thead> +<tr> +<th class="tableblock halign-left valign-top" > Action </th> +<th class="tableblock halign-left valign-top" > Effect</th> +</tr> +</thead> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Left mouse button held down</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Move block</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">Shift</span> + Left mouse button held down</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Invert (mirror) block</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">Ctrl</span> + Left mouse button held down</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Rotate block 90°</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">Shift</span> + <span class="monospaced">Ctrl</span> + Left mouse button held down</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Delete the block</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">Alt</span> + Left mouse button held down</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Copy the block</p></td> +</tr> +</tbody> +</table> +<div class="paragraph"><p>When a block command is made, a dialog window is displayed, and +items involved in this command can be chosen.</p></div> +<div class="paragraph"><p>Any of the commands above can be cancelled via the same pop-up menu +or by pressing the Escape key (<span class="monospaced">Esc</span>).</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_legacy_block_selection_dialog.png" alt="images/Pcbnew_legacy_block_selection_dialog.png"> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_units_used_in_dialogs">3.8. Units used in dialogs</h3> +<div class="paragraph"><p>Units used to display dimensions values are inch and mm. The desired +unit can be selected by pressing the icon located in left toolbar: +<span class="image"> +<img src="images/icons/unit_inch.png" alt="images/icons/unit_inch.png"> +</span> <span class="image"> +<img src="images/icons/unit_mm.png" alt="images/icons/unit_mm.png"> +</span> +However one can enter the unit used to define a value, when entering +a new value.</p></div> +<div class="paragraph"><p>Accepted units are:</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:50%;"> +<col style="width:50%;"> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">1 <strong>in</strong></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">1 inch</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">1 <strong>"</strong></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">1 inch</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">25 <strong>th</strong></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">25 thou</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">25 <strong>mi</strong></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">25 mils, same as thou</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">6 <strong>mm</strong></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">6 mm</p></td> +</tr> +</tbody> +</table> +<div class="paragraph"><p>The rules are:</p></div> +<div class="ulist"><ul> +<li> +<p> +Spaces between the number and the unit are accepted. +</p> +</li> +<li> +<p> +Only the first two letters are significant. +</p> +</li> +<li> +<p> +In countries using an alternative decimal separator than the period, the period (<span class="monospaced">.</span>) can be used as well. Therefore <span class="monospaced">1,5</span> and <span class="monospaced">1.5</span> are the same in French. +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_top_menu_bar">3.9. Top menu bar</h3> +<div class="paragraph"><p>The top menu bar provides access to the files (loading and saving), configuration options, printing, plotting and the help files.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_top_menu_bar.png" alt="images/Pcbnew_top_menu_bar.png"> +</div> +</div> +<div class="sect3"> +<h4 id="_the_file_menu">3.9.1. The File menu</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_file_menu.png" alt="images/Pcbnew_file_menu.png"> +</div> +</div> +<div class="paragraph"><p>The File menu allows the loading and saving of printed circuits files, as well as printing and plotting the circuit board. It enables the export (with the format GenCAD 1.4) of the circuit for use with automatic testers.</p></div> +</div> +<div class="sect3"> +<h4 id="_edit_menu">3.9.2. Edit menu</h4> +<div class="paragraph"><p>Allows some global edit actions:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_edit_menu.png" alt="images/Pcbnew_edit_menu.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_view_menu">3.9.3. View menu</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_view_menu.png" alt="images/Pcbnew_view_menu.png"> +</div> +</div> +<div class="paragraph"><p>Zoom functions and 3D board display.</p></div> +<div class="sect4"> +<h5 id="_3d_viewer">3D Viewer</h5> +<div class="paragraph"><p>Opens the 3D Viewer. Here is a sample:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Sample_3D_board.png" alt="images/Sample_3D_board.png"> +</div> +</div> +</div> +<div class="sect4"> +<h5 id="_switch_canvas">Switch canvas</h5> +<div class="paragraph"><p>Allows switching canvas.</p></div> +<div class="ulist"><ul> +<li> +<p> +default +</p> +</li> +<li> +<p> +OpenGL +</p> +</li> +<li> +<p> +Cairo +</p> +</li> +</ul></div> +</div> +</div> +<div class="sect3"> +<h4 id="_place_menu">3.9.4. Place menu</h4> +<div class="paragraph"><p>Same function as the right-hand toolbar.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_place_menu.png" alt="images/Pcbnew_place_menu.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_route_menu">3.9.5. Route menu</h4> +<div class="paragraph"><p>Routing function.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_route_menu.png" alt="images/Pcbnew_route_menu.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_the_preferences_menu">3.9.6. The Preferences menu</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_preferences_menu.png" alt="images/Pcbnew_preferences_menu.png"> +</div> +</div> +<div class="paragraph"><p>Allows:</p></div> +<div class="ulist"><ul> +<li> +<p> +Selection of the footprint libraries. +</p> +</li> +<li> +<p> +Hide/Show the Layers manager (colors selection for displaying layers and other elements. Also enables the display of elements to be turned on and off). +</p> +</li> +<li> +<p> +Management of general options (units, etc.). +</p> +</li> +<li> +<p> +The management of other display options. +</p> +</li> +<li> +<p> +Creation, editing (and re-read) of the hot keys file. +</p> +</li> +</ul></div> +</div> +<div class="sect3"> +<h4 id="_dimensions_menu">3.9.7. Dimensions menu</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_dimensions_menu.png" alt="images/Pcbnew_dimensions_menu.png"> +</div> +</div> +<div class="paragraph"><p>An important menu. Allows adjustment of:</p></div> +<div class="ulist"><ul> +<li> +<p> +User grid size. +</p> +</li> +<li> +<p> +Size of texts and the line width for drawings. +</p> +</li> +<li> +<p> +Dimensions and characteristic of pads. +</p> +</li> +<li> +<p> +Setting the global values for solder mask and solder paste layers +</p> +</li> +</ul></div> +</div> +<div class="sect3"> +<h4 id="_tools_menu">3.9.8. Tools menu</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_tools_menu.png" alt="images/Pcbnew_tools_menu.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_the_design_rules_menu">3.9.9. The Design Rules menu</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_design_rules_menu.png" alt="images/Pcbnew_design_rules_menu.png"> +</div> +</div> +<div class="paragraph"><p>Provides access to 2 dialogs:</p></div> +<div class="ulist"><ul> +<li> +<p> +Setting Design Rules (tracks and vias sizes, clerances). +</p> +</li> +<li> +<p> +Setting Layers (number, enabled and layers names) +</p> +</li> +</ul></div> +</div> +<div class="sect3"> +<h4 id="_the_help_menu">3.9.10. The Help menu</h4> +<div class="paragraph"><p>Provides access to the user manuals and to the version information +menu (Pcbnew About).</p></div> +</div> +</div> +<div class="sect2"> +<h3 id="_using_icons_on_the_top_toolbar">3.10. Using icons on the top toolbar</h3> +<div class="paragraph"><p>This toolbar gives access to the principal functions of Pcbnew.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_top_toolbar.png" alt="images/Pcbnew_top_toolbar.png"> +</div> +</div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:28%;"> +<col style="width:71%;"> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/new.png" alt="images/icons/new.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Creation of a new printed circuit.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/open_brd_file.png" alt="images/icons/open_brd_file.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Opening of an old printed circuit.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/save.png" alt="images/icons/save.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Save printed circuit.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/sheetset.png" alt="images/icons/sheetset.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Selection of the page size and modification of the file properties.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/module_editor.png" alt="images/icons/module_editor.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Opens Footprint Editor to edit library or pcb footprint.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/modview_icon.png" alt="images/icons/modview_icon.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Opens Footprint Viewer to display library or pcb footprint.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/undo.png" alt="images/icons/undo.png"> +</span> <span class="image"> +<img src="images/icons/redo.png" alt="images/icons/redo.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Undo/Redo last commands (10 levels)</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/print_button.png" alt="images/icons/print_button.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Display print menu.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/plot.png" alt="images/icons/plot.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Display plot menu.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/zoom_in.png" alt="images/icons/zoom_in.png"> +</span> <span class="image"> +<img src="images/icons/zoom_out.png" alt="images/icons/zoom_out.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Zoom in and Zoom out (relative to the centre of screen).</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/zoom_redraw.png" alt="images/icons/zoom_redraw.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Redraw the screen</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/zoom_fit_in_page.png" alt="images/icons/zoom_fit_in_page.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Fit to page</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/find.png" alt="images/icons/find.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Find footprint or text.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/netlist.png" alt="images/icons/netlist.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Netlist operations (selection, reading, testing and compiling).</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/drc.png" alt="images/icons/drc.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">DRC (Design Rule Check): Automatic check of the tracks.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/Pcbnew_toolbar_layer_select_dropdown.png" alt="images/Pcbnew_toolbar_layer_select_dropdown.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Selection of the working layer.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/Pcbnew_layer_pair_indicator.png" alt="images/Pcbnew_layer_pair_indicator.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Selection of layer pair (for vias)</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/mode_module.png" alt="images/icons/mode_module.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Footprint mode: when active this enables footprint options in the + pop-up window.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/mode_track.png" alt="images/icons/mode_track.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Routing mode: when active this enables routing options in the + pop-up window</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/web_support.png" alt="images/icons/web_support.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Direct access to the router Freerouter</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/py_script.png" alt="images/icons/py_script.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Show / Hide the Python scripting console</p></td> +</tr> +</tbody> +</table> +<div class="sect3"> +<h4 id="_auxiliary_toolbar">3.10.1. Auxiliary toolbar</h4> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:28%;"> +<col style="width:71%;"> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/Pcbnew_track_thickness_dropdown.png" alt="images/Pcbnew_track_thickness_dropdown.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Selection of thickness of track already in use.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/Pcbnew_via_size_dropdown.png" alt="images/Pcbnew_via_size_dropdown.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Selection of a dimension of via already in use.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/auto_track_width.png" alt="images/icons/auto_track_width.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Automatic track width: if enabled when creating a new track, + when starting on an existing track, the width of the new track + is set to the width of the existing track.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/Pcbnew_grid_size_dropdown.png" alt="images/Pcbnew_grid_size_dropdown.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Selection of the grid size.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/Pcbnew_zoom_factor_dropdown.png" alt="images/Pcbnew_zoom_factor_dropdown.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Selection of the zoom.</p></td> +</tr> +</tbody> +</table> +<div style="page-break-after:always"></div> +</div> +</div> +<div class="sect2"> +<h3 id="_right_hand_side_toolbar">3.11. Right-hand side toolbar</h3> +<div class="paragraph"><p>This toolbar gives access to the editing tool to change the PCB +shown in Pcbnew.</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:10%;"> +<col style="width:5%;"> +<col style="width:85%;"> +<tbody> +<tr> +<td class="tableblock halign-center valign-middle" rowspan="16" ><p class="tableblock"><span class="image"> +<img src="images/Pcbnew_right_toolbar.png" alt="images/Pcbnew_right_toolbar.png" width="80%"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/cursor.png" alt="images/icons/cursor.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Select the standard mouse mode.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/net_highlight.png" alt="images/icons/net_highlight.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Highlight net selected by clicking on a track or pad.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/tool_ratsnest.png" alt="images/icons/tool_ratsnest.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Display local ratsnest (Pad or Footprint).</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/module.png" alt="images/icons/module.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Add a footprint from a library.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/add_tracks.png" alt="images/icons/add_tracks.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Placement of tracks and vias.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/add_zone.png" alt="images/icons/add_zone.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Placement of zones (copper planes).</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/add_keepout_area.png" alt="images/icons/add_keepout_area.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Placement of keepout areas ( on copper layers ).</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/add_dashed_line.png" alt="images/icons/add_dashed_line.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Draw Lines on technical layers (i.e. not a copper layer).</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/add_circle.png" alt="images/icons/add_circle.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Draw Circles on technical layers (i.e. not a copper layer).</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/add_arc.png" alt="images/icons/add_arc.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Draw Arcs on technical layers (i.e. not a copper layer).</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/add_text.png" alt="images/icons/add_text.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Placement of text.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/add_dimension.png" alt="images/icons/add_dimension.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Draw Dimensions on technical layers (i.e. not the copper layer).</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/add_mires.png" alt="images/icons/add_mires.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Draw Alignment Marks (appearing on all layers).</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/delete.png" alt="images/icons/delete.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Delete element pointed to by the cursor</p> +<p class="tableblock"> <strong>Note:</strong> + When Deleting, if several superimposed elements are + pointed to, priority is given to the smallest (in the decreasing + set of priorities tracks, text, footprint). The function "Undelete" + of the upper toolbar allows the cancellation of the last item + deleted.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/pcb_offset.png" alt="images/icons/pcb_offset.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Offset adjust for drilling and place files.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/grid_select_axis.png" alt="images/icons/grid_select_axis.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Grid origin. (grid offset). Useful mainly for editing and + placement of footprints. Can also be set in Dimensions/Grid menu.</p></td> +</tr> +</tbody> +</table> +<div class="ulist"><ul> +<li> +<p> +Placement of footprints, tracks, zones of copper, texts, etc. +</p> +</li> +<li> +<p> +Net Highlighting. +</p> +</li> +<li> +<p> +Creating notes, graphic elements, etc. +</p> +</li> +<li> +<p> +Deleting elements. +</p> +</li> +</ul></div> +<div style="page-break-after:always"></div> +</div> +<div class="sect2"> +<h3 id="_left_hand_side_toolbar">3.12. Left-hand side toolbar</h3> +<div class="paragraph"><p>The left hand-side toolbar provides display and control options that +affect Pcbnew’s interface.</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:10%;"> +<col style="width:5%;"> +<col style="width:85%;"> +<tbody> +<tr> +<td class="tableblock halign-center valign-middle" rowspan="17" ><p class="tableblock"><span class="image"> +<img src="images/Pcbnew_left_toolbar.png" alt="images/Pcbnew_left_toolbar.png" width="80%"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/drc_off.png" alt="images/icons/drc_off.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Turns DRC (Design Rule Checking) on/off. <strong>Caution:</strong> when DRC + is off incorrect connections can be made.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/grid.png" alt="images/icons/grid.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Turn grid display on/off <strong>Note:</strong> a small grid may not be displayed + unless zoomed in far enough</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/polar_coord.png" alt="images/icons/polar_coord.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Polar display of the relative co-ordinates on the status bar on/off.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/unit_inch.png" alt="images/icons/unit_inch.png"> +</span> <span class="image"> +<img src="images/icons/unit_mm.png" alt="images/icons/unit_mm.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Display/entry of coordinates or dimensions in inches or millimeters.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/cursor_shape.png" alt="images/icons/cursor_shape.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Change cursor display shape.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/general_ratsnest.png" alt="images/icons/general_ratsnest.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Display general rats nest (incomplete connections between footprints).</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/local_ratsnest.png" alt="images/icons/local_ratsnest.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Display footprint rats nest dynamically as it is moved.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/auto_delete_track.png" alt="images/icons/auto_delete_track.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Enable/Disable automatic deletion of a track when it is redrawn.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/show_zone.png" alt="images/icons/show_zone.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Show filled areas in zones</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/show_zone_disable.png" alt="images/icons/show_zone_disable.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Do not show filled areas in zones</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/show_zone_outline_only.png" alt="images/icons/show_zone_outline_only.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Show only outlines of filled areas in zones</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/pad_sketch.png" alt="images/icons/pad_sketch.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Display of pads in outline mode on/off.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/via_sketch.png" alt="images/icons/via_sketch.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Display of vias in outline mode on/off.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/showtrack.png" alt="images/icons/showtrack.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Display of tracks in outline mode on/off.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/contrast_mode.png" alt="images/icons/contrast_mode.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">High contrast display mode on/off. In this mode the active + layer is displayed normally, all the other layers are displayed + in gray. Useful for working on multi-layer circuits.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/layers_manager.png" alt="images/icons/layers_manager.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Hide/Show the Layers manager</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/mw_toolbar.png" alt="images/icons/mw_toolbar.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Access to microwaves tools. Under development</p></td> +</tr> +</tbody> +</table> +</div> +<div class="sect2"> +<h3 id="_pop_up_windows_and_fast_editing">3.13. Pop-up windows and fast editing</h3> +<div class="paragraph"><p>A right-click of the mouse opens a pop-up window. Its contents +depends on the element pointed at by the cursor.</p></div> +<div class="paragraph"><p>This gives immediate access to:</p></div> +<div class="ulist"><ul> +<li> +<p> +Changing the display (centre display on cursor, zoom in or out or + selecting the zoom). +</p> +</li> +<li> +<p> +Setting the grid size. +</p> +</li> +<li> +<p> +Additionally a right-click on an element enables editing of the most + commonly modified element parameters. +</p> +</li> +</ul></div> +<div class="paragraph"><p>The screenshots below show what the pop-up windows looks like.</p></div> +</div> +<div class="sect2"> +<h3 id="_available_modes">3.14. Available modes</h3> +<div class="paragraph"><p>There are 3 modes when using pop-up menus. In the pop-up menus, +these modes add or remove some specific commands.</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:28%;"> +<col style="width:71%;"> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/mode_module.png" alt="images/icons/mode_module.png"> +</span> and + <span class="image"> +<img src="images/icons/mode_track.png" alt="images/icons/mode_track.png"> +</span> disabled</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Normal mode</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/mode_module.png" alt="images/icons/mode_module.png"> +</span> enabled</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Footprint mode</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/mode_track.png" alt="images/icons/mode_track.png"> +</span> enabled</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Tracks mode</p></td> +</tr> +</tbody> +</table> +<div class="sect3"> +<h4 id="_normal_mode">3.14.1. Normal mode</h4> +<div class="ulist"><ul> +<li> +<p> +Pop-up menu with no selection: +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_popup_normal_mode.png" alt="images/Pcbnew_popup_normal_mode.png"> +</div> +</div> +<div class="ulist"><ul> +<li> +<p> +Pop-up menu with track selected: +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_popup_normal_mode_track.png" alt="images/Pcbnew_popup_normal_mode_track.png"> +</div> +</div> +<div class="ulist"><ul> +<li> +<p> +Pop-up menu with footprint selected: +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_popup_normal_mode_footprint.png" alt="images/Pcbnew_popup_normal_mode_footprint.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_footprint_mode">3.14.2. Footprint mode</h4> +<div class="paragraph"><p>Same cases in Footprint Mode (<span class="image"> +<img src="images/icons/mode_module.png" alt="images/icons/mode_module.png"> +</span> enabled)</p></div> +<div class="ulist"><ul> +<li> +<p> +Pop-up menu with no selection: +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_popup_footprint_mode.png" alt="images/Pcbnew_popup_footprint_mode.png"> +</div> +</div> +<div class="ulist"><ul> +<li> +<p> +Pop-up menu with track selected: +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_popup_footprint_mode_track.png" alt="images/Pcbnew_popup_footprint_mode_track.png"> +</div> +</div> +<div class="ulist"><ul> +<li> +<p> +Pop-up menu with footprint selected: +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_popup_footprint_mode_footprint.png" alt="images/Pcbnew_popup_footprint_mode_footprint.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_tracks_mode">3.14.3. Tracks mode</h4> +<div class="paragraph"><p>Same cases in Track Mode (<span class="image"> +<img src="images/icons/mode_track.png" alt="images/icons/mode_track.png"> +</span> enabled)</p></div> +<div class="ulist"><ul> +<li> +<p> +Pop-up menu with no selection: +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_popup_track_mode.png" alt="images/Pcbnew_popup_track_mode.png"> +</div> +</div> +<div class="ulist"><ul> +<li> +<p> +Pop-up menu with track selected: +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_popup_track_mode_track.png" alt="images/Pcbnew_popup_track_mode_track.png"> +</div> +</div> +<div class="ulist"><ul> +<li> +<p> +Pop-up menu with footprint selected: +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_popup_track_mode_footprint.png" alt="images/Pcbnew_popup_track_mode_footprint.png"> +</div> +</div> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_schematic_implementation">4. Schematic Implementation</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_linking_a_schematic_to_a_printed_circuit_board">4.1. Linking a schematic to a printed circuit board</h3> +<div class="paragraph"><p>Generally speaking, a schematic sheet is linked to its printed +circuit board by means of the netlist file, which is normally +generated by the schematic editor used to make the schematic. Pcbnew +accepts netlist files made with Eeschema or Orcad PCB 2. The netlist +file, generated from the schematic is usually missing the footprints +that correspond to the various components. Consequently an +intermediate stage is necessary. During this intermediate process +the association of components with footprints is performed. In KiCad, CvPcb is +used to create this association and a file named <span class="monospaced">*.cmp</span> is +produced. CvPcb also updates the netlist file using this information.</p></div> +<div class="paragraph"><p>CvPcb can also output a "stuff file" <span class="monospaced">*.stf</span> which can be back +annotated into the schematic file as the F2 field for each +component, saving the task of re-assigning footprints in each +schematic edit pass. In Eeschema copying a component will also copy +the footprint assignment and set the reference designator as +unassigned for later auto-incremental annotation.</p></div> +<div class="paragraph"><p>Pcbnew reads the modified netlist file <span class="monospaced">.net</span> and, if it exists, the +<span class="monospaced">.cmp</span> file. In the event of a footprint being changed directly in Pcbnew +the <span class="monospaced">.cmp</span> file is automatically updated avoiding the +requirement to run CvPcb again.</p></div> +<div class="paragraph"><p>Refer to the figure of "Getting Started in KiCad" manual +in the section <em>KiCad Workflow</em> that illustrates the work-flow of KiCad +and how intermediate files are obtained and used by the different +software tools that comprise KiCad.</p></div> +</div> +<div class="sect2"> +<h3 id="_procedure_for_creating_a_printed_circuit_board">4.2. Procedure for creating a printed circuit board</h3> +<div class="paragraph"><p>After having created your schematic in Eeschema:</p></div> +<div class="ulist"><ul> +<li> +<p> +Generate the netlist using Eeschema. +</p> +</li> +<li> +<p> +Assign each component in your netlist file to the corresponding land + pattern (often called footprint) used on the printed circuit using + Cvpcb. +</p> +</li> +<li> +<p> +Launch Pcbnew and read the modified Netlist. This will also read the + file with the footprint selections. +</p> +</li> +</ul></div> +<div class="paragraph"><p>Pcbnew will then load automatically all the necessary footprints. +Footprints can now be placed manually or automatically on the board and +tracks can be routed.</p></div> +</div> +<div class="sect2"> +<h3 id="_procedure_for_updating_a_printed_circuit_board">4.3. Procedure for updating a printed circuit board</h3> +<div class="paragraph"><p>If the schematic is modified (after a printed circuit board has been +generated), the following steps must be repeated:</p></div> +<div class="ulist"><ul> +<li> +<p> +Generate a new netlist file using Eeschema. +</p> +</li> +<li> +<p> +If the changes to the schematic involve new components, the + corresponding footprints must be assigned using Cvpcb. +</p> +</li> +<li> +<p> +Launch Pcbnew and re-read the modified netlist (this will also re-read + the file with the footprint selections). +</p> +</li> +</ul></div> +<div class="paragraph"><p>Pcbnew will then load automatically any new footprints, add the new +connections and remove redundant connections. This process is called +forward annotation and is a very common procedure when a PCB is made +and updated.</p></div> +</div> +<div class="sect2"> +<h3 id="_reading_netlist_file_loading_footprints">4.4. Reading netlist file - loading footprints</h3> +<div class="sect3"> +<h4 id="_dialog_box">4.4.1. Dialog box</h4> +<div class="paragraph"><p>Accessible from the icon <span class="image"> +<img src="images/icons/netlist.png" alt="images/icons/netlist.png"> +</span></p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/en/Pcbnew_netlist_dialog.png" alt="images/en/Pcbnew_netlist_dialog.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_available_options">4.4.2. Available options</h4> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:50%;"> +<col style="width:50%;"> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Footprint Selection</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Components and corresponding footprints on board link: +normal link is Reference (normal option +Timestamp can be used after reannotation of schematic, if the previous +annotation was destroyed (special option)</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Exchange Footprint:</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">If a footprint has changed in the netlist: keep old footprint or +change to the new one.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Unconnected Tracks</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Keep all existing tracks, or delete erroneous tracks</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Extra Footprints</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Remove footprints which are on board but not in the netlist. +Footprint with attribute "Locked" will not be removed.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Single Pad Nets</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Remove single pad nets.</p></td> +</tr> +</tbody> +</table> +</div> +<div class="sect3"> +<h4 id="_loading_new_footprints">4.4.3. Loading new footprints</h4> +<div class="paragraph"><p>With the GAL backend when new footprints are found in the netlist file, +they will be loaded, spread out, and be ready for you to place as a group where you would like.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_import_spread_footprints.png" alt="images/Pcbnew_import_spread_footprints.png" height="300"> +</div> +</div> +<div class="paragraph"><p>With the legacy backend when new footprints are found in the netlist file, they will be +automatically loaded and placed at coordinate (0,0).</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_stacked_footprints.png" alt="images/Pcbnew_stacked_footprints.png"> +</div> +</div> +<div class="paragraph"><p>New footprints can be moved and arranged one by one. A better way is to automatically move (unstack) them:</p></div> +<div class="paragraph"><p>Activate footprint mode (<span class="image"> +<img src="images/icons/mode_module.png" alt="images/icons/mode_module.png"> +</span>)</p></div> +<div class="paragraph"><p>Move the mouse cursor to a suitable (free of component) area, and +click on the right button:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_move_all_modules.png" alt="images/Pcbnew_move_all_modules.png"> +</div> +</div> +<div class="ulist"><ul> +<li> +<p> +Automatically Place New Footprints, if there is already a board with existing footprints. +</p> +</li> +<li> +<p> +Automatically Place All Footprints, for the first time (when creating a board). +</p> +</li> +</ul></div> +<div class="paragraph"><p>The following screenshot shows the results.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_unstacked_footprints.png" alt="images/Pcbnew_unstacked_footprints.png"> +</div> +</div> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_layers">5. Layers</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_introduction">5.1. Introduction</h3> +<div class="paragraph"><p>Pcbnew can work with 50 different layers:</p></div> +<div class="ulist"><ul> +<li> +<p> +Between 1 and 32 copper layers for routing tracks. +</p> +</li> +<li> +<p> +14 fixed-purpose technical layers: +</p> +<div class="ulist"><ul> +<li> +<p> +12 paired layers (Front/Back): <strong>Adhesive</strong>, <strong>Solder Paste</strong>, + <strong>Silk Screen</strong>, <strong>Solder Mask</strong>, <strong>Courtyard</strong>, <strong>Fabrication</strong> +</p> +</li> +<li> +<p> +2 standalone layers: <strong>Edge Cuts</strong>, <strong>Margin</strong> +</p> +</li> +</ul></div> +</li> +<li> +<p> +4 auxiliary layers that you can use any way you want: + <strong>Comments</strong>, <strong>E.C.O. 1</strong>, <strong>E.C.O. 2</strong>, <strong>Drawings</strong> +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_setting_up_layers">5.2. Setting up layers</h3> +<div class="paragraph"><p>To open the <strong>Layers Setup</strong> from the menu bar, select <strong>Design Rules</strong> → <strong>Layers Setup</strong>.</p></div> +<div class="paragraph"><p>The number of copper layers, their names, and their function are configured there. +Unused technical layers can be disabled.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_layer_setup_dialog.png" alt="images/Pcbnew_layer_setup_dialog.png"> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_layer_description">5.3. Layer Description</h3> +<div class="sect3"> +<h4 id="_copper_layers">5.3.1. Copper Layers</h4> +<div class="paragraph"><p>Copper layers are the usual working layers used to place and re-arrange tracks. +Layer numbers start from 0 (the first copper layer, on Front) and end +at 31 (Back). Since components cannot be placed in <strong>inner layers</strong> (number 1 to 30), +only layers number 0 and 31 are <strong>component layer</strong>.</p></div> +<div class="paragraph"><p>The name of any copper layer is editable. Copper layers have +a function attribute that is useful when using the external router <em>Freerouter</em>. +Example of default layer names are <strong>F.Cu</strong> and <strong>In0</strong> for layer number 0.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_layer_setup_dialog_layer_properties.png" alt="images/Pcbnew_layer_setup_dialog_layer_properties.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_paired_technical_layers">5.3.2. Paired Technical Layers</h4> +<div class="paragraph"><p>12 technical layers come in pairs: one for the front, one for the back. +You can recognize them with the "F." or "B." prefix in their names. The +elements making up a footprint (pad, drawing, text) of one of these +layers are automatically mirrored and moved to the complementary layer +when the footprint is flipped.</p></div> +<div class="paragraph"><p>The paired technical layers are:</p></div> +<div class="dlist"><dl> +<dt class="hdlist1"> +<strong>Adhesive</strong> (F.Adhes and B.Adhes) +</dt> +<dd> +<p> + These are used in the application of adhesive to stick SMD components + to the circuit board, generally before wave soldering. +</p> +</dd> +<dt class="hdlist1"> +<strong>Solder Paste</strong> (F.Paste and B.Paste) +</dt> +<dd> +<p> + Used to produce a mask to allow solder paste to be placed on the + pads of surface mount components, generally before reflow soldering. + Usually only surface mount pads occupy these layers. +</p> +</dd> +<dt class="hdlist1"> +<strong>Silk Screen</strong> (F.SilkS and B.SilkS) +</dt> +<dd> +<p> + They are the layers where the drawings of the components appear. That’s where you draw things like component polarity, first pin indicator, reference for mounting, … +</p> +</dd> +<dt class="hdlist1"> +<strong>Solder Mask</strong> (F.Mask and B.Mask) +</dt> +<dd> +<p> + These define the solder masks. All pads should appear on one of these layers (SMT) or both (for through hole) to prevent the varnish from covering the pads. +</p> +</dd> +<dt class="hdlist1"> +<strong>Courtyard</strong> (F.CrtYd and B.CrtYd) +</dt> +<dd> +<p> + Used to show how much space a component physically takes on the PCB. +</p> +</dd> +<dt class="hdlist1"> +<strong>Fabrication</strong> (F.Fab and B.Fab) +</dt> +<dd> +<p> + Footprint assembly (?). +</p> +</dd> +</dl></div> +</div> +<div class="sect3"> +<h4 id="_independant_technical_layers">5.3.3. Independant Technical Layers</h4> +<div class="dlist"><dl> +<dt class="hdlist1"> +<strong>Edge.Cuts</strong> +</dt> +<dd> +<p> + This layer is reserved for the drawing of circuit board outline. Any + element (graphic, texts…) placed on this layer appears on all the + other layers. Use this layer only to draw board outlines. +</p> +</dd> +<dt class="hdlist1"> +<strong>Margin</strong> +</dt> +<dd> +<p> + Board’s edge setback outline (?). +</p> +</dd> +</dl></div> +</div> +<div class="sect3"> +<h4 id="_layers_for_general_use">5.3.4. Layers for general use</h4> +<div class="paragraph"><p>These layers are for any use. They can be used for text such as +instructions for assembly or wiring, or construction drawings, to be +used to create a file for assembly or machining. Their names are:</p></div> +<div class="ulist"><ul> +<li> +<p> +Comments +</p> +</li> +<li> +<p> +E.C.O. 1 +</p> +</li> +<li> +<p> +E.C.O. 2 +</p> +</li> +<li> +<p> +Drawings +</p> +</li> +</ul></div> +</div> +</div> +<div class="sect2"> +<h3 id="_selection_of_the_active_layer">5.4. Selection of the active layer</h3> +<div class="paragraph"><p>The selection of the active working layer can be done in several ways:</p></div> +<div class="ulist"><ul> +<li> +<p> +Using the right toolbar (Layer manager). +</p> +</li> +<li> +<p> +Using the upper toolbar. +</p> +</li> +<li> +<p> +With the pop-up window (activated with the right mouse button). +</p> +</li> +<li> +<p> +Using the + and - keys (works on copper layers only). +</p> +</li> +<li> +<p> +By hot keys. +</p> +</li> +</ul></div> +<div class="sect3"> +<h4 id="_selection_using_the_layer_manager">5.4.1. Selection using the layer manager</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_layer_manager_pane.png" alt="images/Pcbnew_layer_manager_pane.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_selection_using_the_upper_toolbar">5.4.2. Selection using the upper toolbar</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_layer_selection_dropdown.png" alt="images/Pcbnew_layer_selection_dropdown.png"> +</div> +</div> +<div class="paragraph"><p>This directly selects the working layer.</p></div> +<div class="paragraph"><p>Hot keys to select the working layer are displayed.</p></div> +</div> +<div class="sect3"> +<h4 id="_selection_using_the_pop_up_window">5.4.3. Selection using the pop-up window</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_layer_selection_popup.png" alt="images/Pcbnew_layer_selection_popup.png"> +</div> +</div> +<div class="paragraph"><p>The Pop-up window opens a menu window which provides a choice for +the working layer.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_layer_selection_dialog.png" alt="images/Pcbnew_layer_selection_dialog.png"> +</div> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_selection_of_the_layers_for_vias">5.5. Selection of the Layers for Vias</h3> +<div class="paragraph"><p>If the <strong>Add Tracks and Vias</strong> icon is selected on the right hand +toolbar, the Pop-Up window provides the option to change the layer +pair used for vias:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_via_layer_pair_popup.png" alt="images/Pcbnew_via_layer_pair_popup.png"> +</div> +</div> +<div class="paragraph"><p>This selection opens a menu window which provides choice of the +layers used for vias.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_via_layer_pair_dialog.png" alt="images/Pcbnew_via_layer_pair_dialog.png"> +</div> +</div> +<div class="paragraph"><p>When a via is placed the working (active) layer is automatically +switched to the alternate layer of the layer pair used for the vias.</p></div> +<div class="paragraph"><p>One can also switch to another active layer by hot keys, and if a +track is in progress, a via will be inserted.</p></div> +</div> +<div class="sect2"> +<h3 id="_using_the_high_contrast_mode">5.6. Using the high-contrast mode</h3> +<div class="paragraph"><p>This mode is entered when the tool (in the left toolbar) is activated: +<span class="image"> +<img src="images/icons/contrast_mode.png" alt="images/icons/contrast_mode.png"> +</span></p></div> +<div class="paragraph"><p>When using this mode, the active layer is displayed like in the +normal mode, but all others layers are displayed in gray color.</p></div> +<div class="paragraph"><p>There are two useful cases:</p></div> +<div class="sect3"> +<h4 id="_copper_layers_in_high_contrast_mode">5.6.1. Copper layers in high-contrast mode</h4> +<div class="paragraph"><p>When a board uses more than four layers, this option allows the +active copper layer to be seen more easily:</p></div> +<div class="paragraph"><p><strong>Normal mode</strong> (back side copper layer active):</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_copper_layers_contrast_normal.png" alt="images/Pcbnew_copper_layers_contrast_normal.png"> +</div> +</div> +<div class="paragraph"><p><strong>High-contrast mode</strong> (back side copper layer active):</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_copper_layers_contrast_high.png" alt="images/Pcbnew_copper_layers_contrast_high.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_technical_layers">5.6.2. Technical layers</h4> +<div class="paragraph"><p>The other case is when it is necessary to examine solder paste +layers and solder mask layers which are usually not displayed.</p></div> +<div class="paragraph"><p>Masks on pads are displayed if this mode is active.</p></div> +<div class="paragraph"><p><strong>Normal mode</strong> (front side solder mask layer active):</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_technical_layers_contrast_normal.png" alt="images/Pcbnew_technical_layers_contrast_normal.png"> +</div> +</div> +<div class="paragraph"><p><strong>High-contrast mode</strong> (front side solder mask layer active):</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_technical_layers_contrast_high.png" alt="images/Pcbnew_technical_layers_contrast_high.png"> +</div> +</div> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_create_and_modify_a_board">6. Create and modify a board</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_creating_a_board">6.1. Creating a board</h3> +<div class="sect3"> +<h4 id="_drawing_the_board_outline">6.1.1. Drawing the board outline</h4> +<div class="paragraph"><p>It is usually a good idea to define the outline of the board first. +The outline is drawn as a sequence of line segments. Select <em>Edge.Cuts</em> +as the active layer and use the <em>Add graphic line or polygon</em> +tool to trace the edge, clicking at the position of each vertex and +double-clicking to finish the outline. Boards usually have very +precise dimensions, so it may be necessary to use the displayed +cursor coordinates while tracing the outline. Remember that the +relative coordinates can be zeroed at any time using the space bar, +and that the display units can also be toggled using <em>Ctrl-U</em>. +Relative coordinates enable very precise dimensions to be drawn. It +is possible to draw a circular (or arc) outline:</p></div> +<div class="olist arabic"><ol class="arabic"> +<li> +<p> +Select the <em>Add graphic circle</em> or <em>Add graphic arc</em> tool +</p> +</li> +<li> +<p> +Click to fix the circle centre +</p> +</li> +<li> +<p> +Adjust the radius by moving the mouse +</p> +</li> +<li> +<p> +Finish by clicking again. +</p> +</li> +</ol></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content">The width of the outline can be adjusted in the +Parameters menu (recommended width = 150 in 1/10 mils) or via the +Options, but this will not be visible unless the graphics are +displayed in other than outline mode.</td> +</tr></table> +</div> +<div class="paragraph"><p>The resulting outline might look something like this:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_simple_board_outline.png" alt="images/Pcbnew_simple_board_outline.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_using_a_dxf_drawing_for_the_board_outline">6.1.2. Using a DXF drawing for the board outline</h4> +<div class="paragraph"><p>As an alternative to drawing the board outline in Pcbnew directly, +an outline can also be imported from a DXF drawing.</p></div> +<div class="paragraph"><p>Using this feature allows for much more complex board shapes +than is possible with the Pcbnew drawing capabilities.</p></div> +<div class="paragraph"><p>For example a mechanical CAD package can be used to define a +board shape that fits a particular enclosure.</p></div> +<div class="sect4"> +<h5 id="_preparing_the_dxf_drawing_for_import_into_kicad">Preparing the DXF drawing for import into KiCad</h5> +<div class="paragraph"><p>The <strong>DXF</strong> import capability in KiCad does not support DXF +features like <strong>POLYLINES</strong> and <strong>ELLIPSIS</strong> and DXF files that use +these features require a few conversion steps to prepare them for +import.</p></div> +<div class="paragraph"><p>A software package like LibreCAD can be used for this conversion.</p></div> +<div class="paragraph"><p>As a first step, any <strong>POLYLINES</strong> need to be split (Exploded) +into their original simpler shapes. In LibreCAD use the following steps:</p></div> +<div class="olist arabic"><ol class="arabic"> +<li> +<p> +Open a copy of the DXF file. +</p> +</li> +<li> +<p> +Select the board shape (selected shapes are shown with dashed lines). +</p> +</li> +<li> +<p> +In the <strong>Modify</strong> menu, select <strong>Explode</strong>. +</p> +</li> +<li> +<p> +Press ENTER. +</p> +</li> +</ol></div> +<div class="paragraph"><p>As a next step, complex curves like <strong>ELLIPSIS</strong> need to be broken up in +small line segments that <em>approximate</em> the required shape. This happens +automatically when the DXF file is exported or saved in the older <strong>DXF R12</strong> +file format (as the R12 format does not support complex curve shapes, CAD +applications convert these shapes to line segements. Some CAD applications +allow configuration of the number or the length of the line segments used). +In LibreCAD the segment length it generally small enough for use in board +shapes.</p></div> +<div class="paragraph"><p>In LibreCAD, use the following steps to export to the <strong>DXF R12</strong> file format:</p></div> +<div class="olist arabic"><ol class="arabic"> +<li> +<p> +In the <strong>File</strong> menu, use <strong>Save As…</strong> +</p> +</li> +<li> +<p> +In the <strong>Save Drawing As</strong> dialog, there is a <strong>Save as type:</strong> selection + near the bottom of the dialog. Select the option <strong>Drawing Exchange DXF R12</strong>. +</p> +</li> +<li> +<p> +Optionally enter a file name in the <strong>File name:</strong> field. +</p> +</li> +<li> +<p> +Click <strong>Save</strong> +</p> +</li> +</ol></div> +<div class="paragraph"><p>Your DXF file is now ready for import into KiCad.</p></div> +</div> +<div class="sect4"> +<h5 id="_importing_the_dxf_file_into_kicad">Importing the DXF file into KiCad</h5> +<div class="paragraph"><p>The following steps describe the import of the prepared DXF file as a board shape +into KiCad. Note that the import bahaviour is slightly different depending on which +<em>canvas</em> is used.</p></div> +<div class="paragraph"><p>Using the "default" canvas mode:</p></div> +<div class="olist arabic"><ol class="arabic"> +<li> +<p> +In the <strong>File</strong> menu, select <strong>Import</strong> and then the <strong>DXF File</strong> option. +</p> +</li> +<li> +<p> +In the <strong>Import DXF File</strong> dialog use <em>Browse</em> to select the prepared DXF file to be imported. +</p> +</li> +<li> +<p> +In the <em>Place DXF origin (0,0) point:</em> option, select the placement of DXF origin + relative to the board coordinates (the KiCad board has (0,0) in the top left corner). + For the <em>User defined position</em> enter the coordinates in the <em>X Position</em> and <em>Y Position</em> fields. +</p> +</li> +<li> +<p> +In the <em>Layer</em> selection, select the board layer for the import. <strong>Edge.Cuts</strong> is needed + for the board outline. +</p> +</li> +<li> +<p> +Click <em>OK</em>. +</p> +</li> +</ol></div> +<div class="paragraph"><p>Using the "OpenGL" or "Cairo" canvas modes:</p></div> +<div class="olist arabic"><ol class="arabic"> +<li> +<p> +In the <strong>File</strong> menu, select <strong>Import</strong> and then the <strong>DXF File</strong> option. +</p> +</li> +<li> +<p> +In the <strong>Import DXF File</strong> dialog use <em>Browse</em> to select the prepared DXF file to be imported. +</p> +</li> +<li> +<p> +The <em>Place DXF origin (0,0) point:</em> option setting is ignored in this mode. +</p> +</li> +<li> +<p> +In the <em>Layer</em> selection, select the board layer for the import. <strong>Edge.Cuts</strong> is needed + for the board outline. +</p> +</li> +<li> +<p> +Click <em>OK</em>. +</p> +</li> +<li> +<p> +The shape is now attached to your cursor and it can be moved around the board area. +</p> +</li> +<li> +<p> +Click to <em>drop</em> the shape on the board. +</p> +</li> +</ol></div> +</div> +<div class="sect4"> +<h5 id="_example_imported_dxf_shape">Example imported DXF shape</h5> +<div class="paragraph"><p>Here is an example of a DXF import with a board that had several +elliptical segments approximated by a number of short line segments:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_board_outline_imported_from_a_DXF.png" alt="images/Pcbnew_board_outline_imported_from_a_DXF.png"> +</div> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_reading_the_netlist_generated_from_the_schematic">6.1.3. Reading the netlist generated from the schematic</h4> +<div class="paragraph"><p>Activate the <span class="image"> +<img src="images/icons/netlist.png" alt="images/icons/netlist.png"> +</span> icon to display the +netlist dialog window:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/en/Pcbnew_netlist_dialog.png" alt="images/en/Pcbnew_netlist_dialog.png"> +</div> +</div> +<div class="paragraph"><p>If the name (path) of the netlist in the window title is incorrect, +use the <em>Select</em> button to browse to the desired netlist. Then +<em>Read</em> the netlist. Any footprints not already loaded will appear, +superimposed one upon another (we shall see below how to move them +automatically).</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_board_outline_with_dogpile.png" alt="images/Pcbnew_board_outline_with_dogpile.png"> +</div> +</div> +<div class="paragraph"><p>If none of the footprints have been placed, all of the footprints will +appear on the board in the same place, making them difficult to +recognize. It is possible to arrange them automatically (using the +command <em>Global Spread and Place</em> accessed via the right mouse +button). Here is the result of such automatic arrangement:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_board_outline_with_globally_placed_modules.png" alt="images/Pcbnew_board_outline_with_globally_placed_modules.png"> +</div> +</div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content">If a board is modified by replacing an existing footprint with a +new one (for example changing a 1/8W resistance to 1/2W) in CvPcb, +it will be necessary to delete the existing component before Pcbnew +will load the replacement footprint. However, if a footprint is to be +replaced by an existing footprint, this is easier to do using the +footprint dialog accessed by clicking the right mouse button over the +footprint in question.</td> +</tr></table> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_correcting_a_board">6.2. Correcting a board</h3> +<div class="paragraph"><p>It is very often necessary to correct a board following a +corresponding change in the schematic.</p></div> +<div class="sect3"> +<h4 id="_steps_to_follow">6.2.1. Steps to follow</h4> +<div class="olist arabic"><ol class="arabic"> +<li> +<p> +Create a new netlist from the modified schematic. +</p> +</li> +<li> +<p> +If new components have been added, link these to their corresponding +footprint in CvPcb. +</p> +</li> +<li> +<p> +Read the new netlist in Pcbnew. +</p> +</li> +</ol></div> +</div> +<div class="sect3"> +<h4 id="_deleting_incorrect_tracks">6.2.2. Deleting incorrect tracks</h4> +<div class="paragraph"><p>Pcbnew is able to automatically delete tracks that have become +incorrect as a result of modifications. To do this, check the +<em>Delete</em> option in the <em>Unconnected Tracks</em> box of the netlist +dialog:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_bad_tracks_deletion_option.png" alt="images/Pcbnew_bad_tracks_deletion_option.png"> +</div> +</div> +<div class="paragraph"><p>However, it is often quicker to modify such tracks by hand (the DRC +function allows their identification).</p></div> +</div> +<div class="sect3"> +<h4 id="_deleted_components">6.2.3. Deleted components</h4> +<div class="paragraph"><p>Pcbnew can delete footprint corresponding to components that have been +removed from the schematic. This is optional.</p></div> +<div class="paragraph"><p>This is necessary because there are often footprints (holes for +fixation screws, for instance) that are added to the PCB that never +appear in the schematic.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_extra_footprints_deletion_option.png" alt="images/Pcbnew_extra_footprints_deletion_option.png"> +</div> +</div> +<div class="paragraph"><p>If the "Extra Footprints" option is checked, a footprint +corresponding to a component not found in the netlist will be deleted, +unless they have the option "Locked" active. It is a good idea to +activate this option for "mechanical" footprints:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_unlock_footprint_option.png" alt="images/Pcbnew_unlock_footprint_option.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_modified_footprints">6.2.4. Modified footprints</h4> +<div class="paragraph"><p>If a footprint is modified in the netlist (using CvPcb), but the footprint +has already been placed, it will not be modified by Pcbnew, unless +the corresponding option of the <em>Exchange Footprint</em> box of the netlist +dialog is checked:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_exchange_module_option.png" alt="images/Pcbnew_exchange_module_option.png"> +</div> +</div> +<div class="paragraph"><p>Changing a footprint (replacing a resistor with one of a different +size, for instance) can be effected directly by editing the footprint.</p></div> +</div> +<div class="sect3"> +<h4 id="_advanced_options_selection_using_time_stamps">6.2.5. Advanced options - selection using time stamps</h4> +<div class="paragraph"><p>Sometimes the notation of the schematic is changed, without any +material changes in the circuit (this would concern the references - +like R5, U4…).The PCB is therefore unchanged (except possibly for +the silkscreen markings). Nevertheless, internally, components and +footprints are represented by their reference. In this situation, the +<em>Timestamp</em> option of the netlist dialog may be selected before +re-reading the netlist:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_module_selection_option.png" alt="images/Pcbnew_module_selection_option.png"> +</div> +</div> +<div class="paragraph"><p>With this option, Pcbnew no longer identifies footprints by their +reference, but by their time stamp instead. The time stamp is +automatically generated by Eeschema (it is the time and date when +the component was placed in the schematic).</p></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Warning</div> +</td> +<td class="content">Great care should be exercised when using this option (save +the file first!). This is because the technique is complicated in +the case of components containing multiple parts (e.g. a 7400 has 4 +parts and one case). In this situation, the time stamp is not +uniquely defined (for the 7400 there would be up to four - one for +each part). Nevertheless, the time stamp option usually resolves +re-annotation problems.</td> +</tr></table> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_direct_exchange_for_footprints_already_placed_on_board">6.3. Direct exchange for footprints already placed on board</h3> +<div class="paragraph"><p>Changing a footprint ( or some identical footprints) to another +footprint is very useful, and is very easy:</p></div> +<div class="olist arabic"><ol class="arabic"> +<li> +<p> +Click on a footprint to open the Edit dialog box. +</p> +</li> +<li> +<p> +Activate Change Footprints. +</p> +</li> +</ol></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_change_modules_button.png" alt="images/Pcbnew_change_modules_button.png"> +</div> +</div> +<div class="paragraph"><p>Options for Change Footprint(s):</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_footprint_exchange_options.png" alt="images/Pcbnew_footprint_exchange_options.png"> +</div> +</div> +<div class="paragraph"><p>One must choose a new footprint name and use:</p></div> +<div class="ulist"><ul> +<li> +<p> +<strong>Change footprint of <em>xx</em></strong> for the current footprint +</p> +</li> +<li> +<p> +<strong>Change footprints <em>yy</em></strong> for all footprints like the current footprint. +</p> +</li> +<li> +<p> +<strong>Change footprints having same value</strong> for all footprints like the current + footprint, restricted to components which have the same value. +</p> +</li> +<li> +<p> +<strong>Update all footprints of the board</strong> for reloading of all footprints on board. +</p> +</li> +</ul></div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_footprint_placement">7. Footprint placement</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_assisted_placement">7.1. Assisted placement</h3> +<div class="paragraph"><p>Whilst moving footprints the footprint ratsnest (the net connections) can +be displayed to assist the placement. To enable this the icon +<span class="image"> +<img src="images/icons/modratsnest.png" alt="images/icons/modratsnest.png"> +</span> of the left toolbar must be +activated.</p></div> +</div> +<div class="sect2"> +<h3 id="_manual_placement">7.2. Manual placement</h3> +<div class="paragraph"><p>Select the footprint with the right mouse button then choose the Move +command from the menu. Move the footprint to the required position and +place it with the left mouse button. If required the selected footprint +can also be rotated, inverted or edited. Select Cancel from the menu +(or press the Esc key) to abort.</p></div> +<div class="paragraph"><p>Here you can see the display of the footprint ratsnest during a move:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_ratsnest_during_move.png" alt="images/Pcbnew_ratsnest_during_move.png"> +</div> +</div> +<div class="paragraph"><p>The circuit once all the footprints are placed may be as shown:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_circuit_after_placement.png" alt="images/Pcbnew_circuit_after_placement.png"> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_automatic_footprint_distribution">7.3. Automatic Footprint Distribution</h3> +<div class="paragraph"><p>Generally speaking, footprints can only be moved if they have not been +"Fixed". This attribute can be turned on and off from the pop-up +window (click right mouse button over footprint) whilst in Footprint Mode, +or through the Edit Footprint Menu.</p></div> +<div class="paragraph"><p>As stated in the last chapter, new +footprints loaded during the reading of the netlist appear piled up at +a single location on the board. Pcbnew allows an automatic +distribution of the footprints to make manual selection and placement +easier.</p></div> +<div class="ulist"><ul> +<li> +<p> +Select the option "Footprint Mode" (Icon <span class="image"> +<img src="images/icons/mode_module.png" alt="images/icons/mode_module.png"> +</span> on the upper toolbar). +</p> +</li> +<li> +<p> +The pop-up window activated by the right mouse button becomes: +</p> +</li> +</ul></div> +<div class="paragraph"><p>If there is a footprint under the cursor:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_context_module_mode_module_under_cursor.png" alt="images/Pcbnew_context_module_mode_module_under_cursor.png"> +</div> +</div> +<div class="paragraph"><p>If there is nothing under the cursor:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_context_module_mode_no_module_under_cursor.png" alt="images/Pcbnew_context_module_mode_no_module_under_cursor.png"> +</div> +</div> +<div class="paragraph"><p>In both cases the following commands are available:</p></div> +<div class="ulist"><ul> +<li> +<p> +<strong>Spread out All Footprints</strong> allows the automatic distribution of all the + footprints not Fixed. This is generally used after the first reading of + a netlist. +</p> +</li> +<li> +<p> +<strong>Spread out Footprints not Already on Board</strong> allows the automatic + distribution of the footprints which have not been placed already + within the PCB outline. This command requires that an outline + of the board has been drawn to determine which footprints can be + automatically distributed. +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_automatic_placement_of_footprints">7.4. Automatic placement of footprints</h3> +<div class="sect3"> +<h4 id="_characteristics_of_the_automatic_placer">7.4.1. Characteristics of the automatic placer</h4> +<div class="paragraph"><p>The automatic placement feature allows the placement of footprints +onto the 2 faces of the circuit board (however switching a footprint +onto the copper layer is not automatic).</p></div> +<div class="paragraph"><p>It also seeks the best orientation (0, 90, -90, 180 degrees) of the +footprint. The placement is made according to an optimization +algorithm, which seeks to minimize the length of the ratsnest, and +which seeks to create space between the larger footprints with +many pads. The order of placement is optimized to initially place +these larger footprints with many pads.</p></div> +</div> +<div class="sect3"> +<h4 id="_preparation">7.4.2. Preparation</h4> +<div class="paragraph"><p>Pcbnew can thus place the footprints automatically, however it is +necessary to guide this placement, because no software can guess +what the user wants to achieve.</p></div> +<div class="paragraph"><p>Before an automatic placement is carried out one must:</p></div> +<div class="ulist"><ul> +<li> +<p> +Create the outline of the board (It can be complex, but it must be + closed if the form is not rectangular). +</p> +</li> +<li> +<p> +Manually place the components whose positions are imposed (Connectors, + clamp holes, etc). +</p> +</li> +<li> +<p> +Similarly, certain SMD footprints and critical components (large + footprints for example) must be on a specific side or position on the + board and this must be done manually. +</p> +</li> +<li> +<p> +Having completed any manual placement these footprints must be "Fixed" to + prevent them being moved. With the Footprint Mode icon + <span class="image"> +<img src="images/icons/mode_module.png" alt="images/icons/mode_module.png"> +</span> selected right click on the footprint + and pick "Fix Footprint" on the Pop-up menu. This can also be done through + the Edit/Footprint Pop-up menu. +</p> +</li> +<li> +<p> +Automatic placement can then be carried out. With the Footprint Mode + icon selected, right click and select Glob(al) Move and Place - then + Autoplace All Footprints. +</p> +</li> +</ul></div> +<div class="paragraph"><p>During automatic placement, if required, Pcbnew can optimize the +orientation of the footprints. However rotation will only be attempted +if this has been authorized for the footprint (see Edit Footprint Options).</p></div> +<div class="paragraph"><p>Usually resistors and non-polarized capacitors are authorized for +180 degrees rotation. Some footprints (small transistors for example) +can be authorized for +/- 90 and 180 degrees rotation.</p></div> +<div class="paragraph"><p>For each footprint one slider authorizes 90 degree Rot(ation) and a +second slider authorizes 180 degree Rot(ation). A setting of 0 +prevents rotation, a setting of 10 authorizes it, and an +intermediate value indicates a preference for/against rotation.</p></div> +<div class="paragraph"><p>The rotation authorization can be done by editing the footprint once it +is placed on the board. However it is preferable to set the required +options to the footprint in the library as these settings will then be +inherited each time the footprint is used.</p></div> +</div> +<div class="sect3"> +<h4 id="_interactive_auto_placement">7.4.3. Interactive auto-placement</h4> +<div class="paragraph"><p>It may be necessary during automatic placement to stop (press Esc +key) and manually re-position a footprint. Using the command Autoplace +Next Footprint will restart the autoplacement from the point at which +it was stopped.</p></div> +<div class="paragraph"><p>The command Autoplace new footprints allows the automatic placement of +the footprints which have not been placed already within the PCB +outline. It will not move those within the PCB outline even if they +are not "fixed".</p></div> +<div class="paragraph"><p>The command Autoplace Footprint makes it possible to execute an +autoplacement on the footprint pointed to by the mouse, even if its +<em>fixed</em> attribute is active.</p></div> +</div> +<div class="sect3"> +<h4 id="_additional_note">7.4.4. Additional note</h4> +<div class="paragraph"><p>Pcbnew automatically determines the possible zone of placement of +the footprints by respecting the shape of the board outline, which is +not necessarily rectangular (It can be round, or have cutouts, etc).</p></div> +<div class="paragraph"><p>If the board is not rectangular, the outline must be closed, so that +Pcbnew can determine what is inside and what is outside the outline. +In the same way, if there are internal cutouts, their outline will +have to be closed.</p></div> +<div class="paragraph"><p>Pcbnew calculates the possible zone of placement of the footprints +using the outline of the board, then passes each footprint in turn over +this area in order to determine the optimum position at which to +place it.</p></div> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_setting_routing_parameters">8. Setting routing parameters</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_current_settings">8.1. Current settings</h3> +<div class="sect3"> +<h4 id="_accessing_the_main_dialog">8.1.1. Accessing the main dialog</h4> +<div class="paragraph"><p>The most important parameters are accessed from the following +drop-down menu:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_design_rules_dropdown.png" alt="images/Pcbnew_design_rules_dropdown.png"> +</div> +</div> +<div class="paragraph"><p>and are set in the Design Rules dialog.</p></div> +</div> +<div class="sect3"> +<h4 id="_current_settings_2">8.1.2. Current settings</h4> +<div class="paragraph"><p>Current settings are displayed in the top toolbar.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_design_rules_top_toolbar.png" alt="images/Pcbnew_design_rules_top_toolbar.png"> +</div> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_general_options">8.2. General options</h3> +<div class="paragraph"><p>The General options menu is available via the top toolbar link Preferences → General dialog.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_preferences_menu.png" alt="images/Pcbnew_preferences_menu.png"> +</div> +</div> +<div class="paragraph"><p>The dialog looks like the following:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_general_options_dialog.png" alt="images/Pcbnew_general_options_dialog.png"> +</div> +</div> +<div class="paragraph"><p>For the creation of tracks the necessary parameters are:</p></div> +<div class="ulist"><ul> +<li> +<p> +<strong>Tracks 45 Only</strong>: Directions allowed for track segments are 0, 45 or + 90 degrees. +</p> +</li> +<li> +<p> +<strong>Double Segm Track</strong>: When creating tracks, 2 segments will be + displayed. +</p> +</li> +<li> +<p> +<strong>Tracks Auto Del</strong>: When recreating tracks, the old one will be + automatically deleted if considered redundant. +</p> +</li> +<li> +<p> +<strong>Magnetic Pads</strong>: The graphic cursor becomes a pad, centered in the + pad area. +</p> +</li> +<li> +<p> +<strong>Magnetic Tracks</strong>: The graphic cursor becomes the track axis. +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_netclasses">8.3. Netclasses</h3> +<div class="paragraph"><p>Pcbnew allows you to define different routing parameters for each +net. Parameters are defined by a group of nets.</p></div> +<div class="ulist"><ul> +<li> +<p> +A group of nets is called a Netclass. +</p> +</li> +<li> +<p> +There is always a netclass called "default". +</p> +</li> +<li> +<p> +Users can add other Netclasses. +</p> +</li> +</ul></div> +<div class="paragraph"><p>A netclass specifies:</p></div> +<div class="ulist"><ul> +<li> +<p> +The width of tracks, via diameters and drills. +</p> +</li> +<li> +<p> +The clearance between pads and tracks (or vias). +</p> +</li> +<li> +<p> +When routing, Pcbnew automatically selects the netclass corresponding + to the net of the track to create or edit, and therefore the routing + parameters. +</p> +</li> +</ul></div> +<div class="sect3"> +<h4 id="_setting_routing_parameters_2">8.3.1. Setting routing parameters</h4> +<div class="paragraph"><p>The choice is made in the menu: Design Rules → Design Rules.</p></div> +</div> +<div class="sect3"> +<h4 id="_netclass_editor">8.3.2. Netclass editor</h4> +<div class="paragraph"><p>The Netclass editor allows you to:</p></div> +<div class="ulist"><ul> +<li> +<p> +Add or delete Netclasses. +</p> +</li> +<li> +<p> +Set routing parameters values: clearance, track width, via sizes. +</p> +</li> +<li> +<p> +Group nets in netclasses. +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_design_rules_editor_netclass_tab.png" alt="images/Pcbnew_design_rules_editor_netclass_tab.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_global_design_rules">8.3.3. Global Design Rules</h4> +<div class="paragraph"><p>The global design rules are:</p></div> +<div class="ulist"><ul> +<li> +<p> +Enabling/disabling Blind/buried Vias use. +</p> +</li> +<li> +<p> +Enabling/disabling Micro Vias use. +</p> +</li> +<li> +<p> +Minimum Allowed Values for tracks and vias. +</p> +</li> +</ul></div> +<div class="paragraph"><p>A DRC error is raised when a value smaller than the minimum value +specified is encountered. The second dialog panel is:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_design_rules_editor_global_tab.png" alt="images/Pcbnew_design_rules_editor_global_tab.png"> +</div> +</div> +<div class="paragraph"><p>This dialog also allows to enter a "stock" of tracks and via sizes.</p></div> +<div class="paragraph"><p>When routing, one can select one of these values to create a track or +via, instead of using the netclass’s default value.</p></div> +<div class="paragraph"><p>Useful in critical cases when a small track segment must have a +specific size.</p></div> +</div> +<div class="sect3"> +<h4 id="_via_parameters">8.3.4. Via parameters</h4> +<div class="paragraph"><p>Pcbnew handles 3 types of vias:</p></div> +<div class="ulist"><ul> +<li> +<p> +Through vias (usual vias). +</p> +</li> +<li> +<p> +Blind or buried vias. +</p> +</li> +<li> +<p> +Micro Vias, like buried vias but restricted to an external layer to + its nearest neighbor. They are intended to connect BGA pins to the + nearest inner layer. Their diameter is usually very small and they are + drilled by laser. +</p> +</li> +</ul></div> +<div class="paragraph"><p>By default, all vias have the same drill value.</p></div> +<div class="paragraph"><p>This dialog specifies the smallest acceptable values for via +parameters. On a board, a via smaller than specified here generates +a DRC error.</p></div> +</div> +<div class="sect3"> +<h4 id="_track_parameters">8.3.5. Track parameters</h4> +<div class="paragraph"><p>Specify the minimum acceptable track width. On a board, a track +width smaller than specified here generates a DRC error.</p></div> +</div> +<div class="sect3"> +<h4 id="_specific_sizes">8.3.6. Specific sizes</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_specific_size_options.png" alt="images/Pcbnew_specific_size_options.png"> +</div> +</div> +<div class="paragraph"><p>One can enter a set of extra tracks and/or via sizes. While routing +a track, these values can be used on demand instead of the values +from the current netclass values.</p></div> +</div> +</div> +<div class="sect2"> +<h3 id="_examples_and_typical_dimensions">8.4. Examples and typical dimensions</h3> +<div class="sect3"> +<h4 id="_track_width">8.4.1. Track width</h4> +<div class="paragraph"><p>Use the largest possible value and conform to the minimum sizes given +here.</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:16%;"> +<col style="width:16%;"> +<col style="width:16%;"> +<col style="width:16%;"> +<col style="width:16%;"> +<col style="width:16%;"> +<thead> +<tr> +<th class="tableblock halign-left valign-top" > Units </th> +<th class="tableblock halign-left valign-top" > CLASS 1 </th> +<th class="tableblock halign-left valign-top" > CLASS 2 </th> +<th class="tableblock halign-left valign-top" > CLASS 3 </th> +<th class="tableblock halign-left valign-top" > CLASS 4 </th> +<th class="tableblock halign-left valign-top" > CLASS 5</th> +</tr> +</thead> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">mm</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">0.8</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">0.5</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">0.4</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">0.25</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">0.15</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">mils</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">31</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">20</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">16</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">10</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">6</p></td> +</tr> +</tbody> +</table> +</div> +<div class="sect3"> +<h4 id="_insulation_clearance">8.4.2. Insulation (clearance)</h4> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:16%;"> +<col style="width:16%;"> +<col style="width:16%;"> +<col style="width:16%;"> +<col style="width:16%;"> +<col style="width:16%;"> +<thead> +<tr> +<th class="tableblock halign-left valign-top" > Units </th> +<th class="tableblock halign-left valign-top" > CLASS 1 </th> +<th class="tableblock halign-left valign-top" > CLASS 2 </th> +<th class="tableblock halign-left valign-top" > CLASS 3 </th> +<th class="tableblock halign-left valign-top" > CLASS 4 </th> +<th class="tableblock halign-left valign-top" > CLASS 5</th> +</tr> +</thead> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">mm</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">0.7</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">0.5</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">0.35</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">0.23</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">0.15</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">mils</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">27</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">20</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">14</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">9</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">6</p></td> +</tr> +</tbody> +</table> +<div class="paragraph"><p>Usually, the minimum clearance is very similar to the minimum track +width.</p></div> +</div> +</div> +<div class="sect2"> +<h3 id="_examples">8.5. Examples</h3> +<div class="sect3"> +<h4 id="_rustic">8.5.1. Rustic</h4> +<div class="ulist"><ul> +<li> +<p> +Clearance: 0.35 mm (0.0138 inches). +</p> +</li> +<li> +<p> +Track width: 0.8 mm (0.0315 inches). +</p> +</li> +<li> +<p> +Pad diameter for ICs and vias: 1.91 mm (0.0750 inches). +</p> +</li> +<li> +<p> +Pad diameter for discrete components: 2.54 mm (0.1 inches). +</p> +</li> +<li> +<p> +Ground track width: 2.54 mm (0.1 inches). +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_dr_example_rustic.png" alt="images/Pcbnew_dr_example_rustic.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_standard">8.5.2. Standard</h4> +<div class="ulist"><ul> +<li> +<p> +Clearance: 0.35mm (0.0138 inches). +</p> +</li> +<li> +<p> +Track width: 0.5mm (0.0127 inches). +</p> +</li> +<li> +<p> +Pad diameter for ICs: make them elongated in order to allow tracks to + pass between IC pads and yet have the pads offer a sufficient adhesive + surface (1.27 x 2.54 mm -→ 0.05 x 0.1 inches). +</p> +</li> +<li> +<p> +Vias: 1.27 mm (0.0500 inches). +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_dr_example_standard.png" alt="images/Pcbnew_dr_example_standard.png"> +</div> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_manual_routing">8.6. Manual routing</h3> +<div class="paragraph"><p>Manual routing is often recommended, because it is the only method +offering control over routing priorities. For example, it is +preferable to start by routing power tracks, making them wide and +short and keeping analog and digital supplies well separated. Later, +sensitive signal tracks should be routed. Amongst other problems, +automatic routing often requires many vias. However, automatic +routing can offer a useful insight into the positioning of footprints. +With experience, you will probably find that the automatic router is +useful for quickly routing the <em>obvious</em> tracks, but the remaining +tracks will best be routed by hand.</p></div> +</div> +<div class="sect2"> +<h3 id="_help_when_creating_tracks">8.7. Help when creating tracks</h3> +<div class="paragraph"><p>Pcbnew can display the full ratsnest, if the button +<span class="image"> +<img src="images/icons/modratsnest.png" alt="images/icons/modratsnest.png"> +</span> is activated.</p></div> +<div class="paragraph"><p>The button <span class="image"> +<img src="images/icons/net_highlight.png" alt="images/icons/net_highlight.png"> +</span> allows one to highlight a +net (click to a pad or an existing track to highlight the corresponding +net).</p></div> +<div class="paragraph"><p>The DRC checks tracks in real time while creating them. One cannot +create a track which does not match the DRC rules. It is possible to +disable the DRC by clicking on the button. This is, however, not +recommended, use it only in specific cases.</p></div> +<div class="sect3"> +<h4 id="_creating_tracks">8.7.1. Creating tracks</h4> +<div class="paragraph"><p>A track can be created by clicking on the button +<span class="image"> +<img src="images/icons/add_tracks.png" alt="images/icons/add_tracks.png"> +</span>. A new track must +start on a pad or on another track, because Pcbnew must know the +net used for the new track (in order to match the DRC rules).</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_creating_new_track.png" alt="images/Pcbnew_creating_new_track.png"> +</div> +</div> +<div class="paragraph"><p>When creating a new track, Pcbnew shows links to nearest +unconnected pads, link number set in option "Max. Links" in General +Options.</p></div> +<div class="paragraph"><p>End the track by double-clicking, by the pop-up menu or by its hot key.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_track_in_progres_context.png" alt="images/Pcbnew_track_in_progres_context.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_moving_and_dragging_tracks">8.7.2. Moving and dragging tracks</h4> +<div class="paragraph"><p>When the button <span class="image"> +<img src="images/icons/add_tracks.png" alt="images/icons/add_tracks.png"> +</span> is active, the +track where the cursor is positioned can be moved with the hotkey <em>M</em>. +If you want to drag the track you can use the hotkey <em>G</em>.</p></div> +</div> +<div class="sect3"> +<h4 id="_via_insertion">8.7.3. Via Insertion</h4> +<div class="paragraph"><p>A via can be inserted only when a track is in progress:</p></div> +<div class="ulist"><ul> +<li> +<p> +By the pop-up menu. +</p> +</li> +<li> +<p> +By the hotkey <em>V</em>. +</p> +</li> +<li> +<p> +By switching to a new copper layer using the appropriate hotkey. +</p> +</li> +</ul></div> +</div> +</div> +<div class="sect2"> +<h3 id="_select_edit_the_track_width_and_via_size">8.8. Select/edit the track width and via size</h3> +<div class="paragraph"><p>When clicking on a track or a pad, Pcbnew automatically selects the +corresponding Netclass, and the track size and via dimensions are +derived from this netclass.</p></div> +<div class="paragraph"><p>As previously seen, the Global Design Rules editor has a tool to insert +extra tracks and via sizes.</p></div> +<div class="ulist"><ul> +<li> +<p> +The horizontal toolbar can be used to select a size. +</p> +</li> +<li> +<p> +When the button <span class="image"> +<img src="images/icons/add_tracks.png" alt="images/icons/add_tracks.png"> +</span> is active, + the current track width can be selected from the pop-up menu + (accessible as well when creating a track). +</p> +</li> +<li> +<p> +The user can utilize the default Netclasses values or a specified value. +</p> +</li> +</ul></div> +<div class="sect3"> +<h4 id="_using_the_horizontal_toolbar">8.8.1. Using the horizontal toolbar</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_track_toolbar.png" alt="images/Pcbnew_track_toolbar.png"> +</div> +</div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:40%;"> +<col style="width:60%;"> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/Pcbnew_track_toolbar_track_width_selection.png" alt="images/Pcbnew_track_toolbar_track_width_selection.png" width="70%"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Track width selection. The symbol * is a mark for default Netclass +value selection.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/Pcbnew_track_toolbar_track_width_selection_in_use.png" alt="images/Pcbnew_track_toolbar_track_width_selection_in_use.png" width="70%"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Selecting a specific track width value. +The first value in the list is always the netclass value. +Other values are tracks widths entered from the Global Design Rules editor.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/Pcbnew_track_toolbar_via_size_selection.png" alt="images/Pcbnew_track_toolbar_via_size_selection.png" width="70%"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Via size selection. +The symbol * is a mark for default Netclass value selection.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/Pcbnew_track_toolbar_via_size_selection_in_use.png" alt="images/Pcbnew_track_toolbar_via_size_selection_in_use.png" width="70%"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Selecting a specific via dimension value. +The first value in the list is always the netclass value. +Other values are via dimensions entered from the Global Design Rules editor.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/auto_track_width.png" alt="images/icons/auto_track_width.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">When enabled: Automatic track width selection. +When starting a track on an existing track, the new track has the same width as the existing track.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/Pcbnew_track_toolbar_grid_size_selection.png" alt="images/Pcbnew_track_toolbar_grid_size_selection.png" width="70%"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Grid size selection.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/Pcbnew_track_toolbar_zoom_selection.png" alt="images/Pcbnew_track_toolbar_zoom_selection.png" width="70%"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Zoom selection.</p></td> +</tr> +</tbody> +</table> +</div> +<div class="sect3"> +<h4 id="_using_the_pop_up_menu">8.8.2. Using the pop-up menu</h4> +<div class="paragraph"><p>One can select a new size for routing, or change to a previously created +via or track segment:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_track_context_menu.png" alt="images/Pcbnew_track_context_menu.png"> +</div> +</div> +<div class="paragraph"><p>If you want to change many via (or track) sizes, the best way is to +use a specific Netclass for the net(s) that must be edited (see +global changes).</p></div> +</div> +</div> +<div class="sect2"> +<h3 id="_editing_and_changing_tracks">8.9. Editing and changing tracks</h3> +<div class="sect3"> +<h4 id="_change_a_track">8.9.1. Change a track</h4> +<div class="paragraph"><p>In many cases redrawing a track is required.</p></div> +<div class="paragraph"><p>New track (in progress):</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_new_track_in_progress.png" alt="images/Pcbnew_new_track_in_progress.png"> +</div> +</div> +<div class="paragraph"><p>When finished:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_new_track_completed.png" alt="images/Pcbnew_new_track_completed.png"> +</div> +</div> +<div class="paragraph"><p>Pcbnew will automatically remove the old track if it is redundant.</p></div> +</div> +<div class="sect3"> +<h4 id="_global_changes">8.9.2. Global changes</h4> +<div class="paragraph"><p>Global tracks and via sizes dialog editor is accessible via the +pop-up window by right clicking on a track:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_track_global_edit_context_menu.png" alt="images/Pcbnew_track_global_edit_context_menu.png"> +</div> +</div> +<div class="paragraph"><p>The dialog editor allows global changes of tracks and/or vias for:</p></div> +<div class="ulist"><ul> +<li> +<p> +The current net. +</p> +</li> +<li> +<p> +The whole board. +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_track_global_edit_dialog.png" alt="images/Pcbnew_track_global_edit_dialog.png"> +</div> +</div> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_interactive_router">9. Interactive Router</h2> +<div class="sectionbody"> +<div class="paragraph"><p>The Interactive Router lets you quickly and efficiently route your PCBs by +shoving off or walking around items on the PCB that collide with the +trace you are currently drawing.</p></div> +<div class="paragraph"><p>Following modes are supported:</p></div> +<div class="ulist"><ul> +<li> +<p> +<strong>Highlight collisions</strong>, which highlights all violating objects with a + nice, shiny green color and shows violating clearance regions. +</p> +</li> +<li> +<p> +<strong>Shove</strong>, attempting to push and shove all items colliding with the + currently routed track. +</p> +</li> +<li> +<p> +<strong>Walk around</strong>, trying to avoid obstacles by hugging/walking around + them. +</p> +</li> +</ul></div> +<div class="sect2"> +<h3 id="_setting_up">9.1. Setting up</h3> +<div class="paragraph"><p>Before using the Interactive Router, please set up these two things:</p></div> +<div class="ulist"><ul> +<li> +<p> +<strong>Clearance settings</strong> To set the clearances, open the <em>Design Rules</em> + dialog and make sure at least the default clearance value looks + sensible. +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/en/rules_editor.png" alt="Rules editor"> +</div> +</div> +<div class="ulist"><ul> +<li> +<p> +<strong>Enable OpenGL mode</strong> By selecting <em>View→Switch canvas to OpenGL</em> menu + option or pressing <strong>F11</strong>. +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/en/opengl_menu.png" alt="OpenGL mode"> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_laying_out_tracks">9.2. Laying out tracks</h3> +<div class="paragraph"><p>To activate the router tool press the <em>Interactive Router</em> button +<span class="image"> +<img src="images/route_icon.png" alt="Interactive Router Button"> +</span> or the <strong>X</strong> key. +The cursor will turn into a cross and the tool name, will appear in the +status bar.</p></div> +<div class="paragraph"><p>To start a track, click on any item (a pad, track or a via) or press the +<strong>X</strong> key again hovering the mouse over that item. The new track will use +the net of the starting item. Clicking or pressing <strong>X</strong> on empty PCB +space starts a track with no net assigned.</p></div> +<div class="paragraph"><p>Move the mouse to define shape of the track. The router will try to +follow the mouse trail, hugging unmovable obstacles (such as pads) and +shoving colliding traces/vias, depending on the mode. Retreating the mouse +cursor will cause the shoved items to spring back to their former +locations.</p></div> +<div class="paragraph"><p>Clicking on a pad/track/via in the same net finishes routing. Clicking +in empty space fixes the segments routed so far and continues routing +the trace.</p></div> +<div class="paragraph"><p>In order to stop routing and undo all changes (shoved items, etc.), +simply press <strong>Esc</strong>.</p></div> +<div class="paragraph"><p>Pressing <strong>V</strong> or selecting <em>Place Through Via</em> from the context menu +while routing a track attaches a via at the end of the trace being +routed. Pressing <strong>V</strong> again disables via placement. Clicking in any spot +establishes the via and continues routing.</p></div> +<div class="paragraph"><p>Pressing <strong>/</strong> or selecting <em>Switch Track Posture</em> from the context menu +toggles the direction of the initial track segment between straight or +diagonal.</p></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content">By default, the router snaps to centers/axes of the items. +Snapping can be disabled by holding <strong>Shift</strong> while routing or selecting +items.</td> +</tr></table> +</div> +</div> +<div class="sect2"> +<h3 id="_setting_track_widths_and_via_sizes">9.3. Setting track widths and via sizes</h3> +<div class="paragraph"><p>There are several ways to pre-select a track width/via size or to change +it during routing:</p></div> +<div class="ulist"><ul> +<li> +<p> +Use standard KiCad shortcuts. +</p> +</li> +<li> +<p> +Press <strong>W</strong> or select <em>Custom Track Width</em> + from the context menu to type in a custom track width/via size. +</p> +</li> +<li> +<p> +Pick a predefined width from the <em>Select Track Width</em> sub-menu + of the context menu. +</p> +</li> +<li> +<p> +Select <em>Use the starting track width</em> in the <em>Select Track Width</em> + menu to pick the width from the start item (or the traces already + connected to it). +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_dragging">9.4. Dragging</h3> +<div class="paragraph"><p>The router can drag track segments, corners and vias. To drag an item, +click on it with <strong>Ctrl</strong> key pressed, hover the mouse and press <strong>G</strong> or +select <em>Drag Track/Via</em> from the context menu. Finish dragging by +clicking again or abort by pressing <em>Esc</em>.</p></div> +</div> +<div class="sect2"> +<h3 id="_options">9.5. Options</h3> +<div class="paragraph"><p>The router behavior can be configured by pressing <em>E</em> or selecting <em>Routing +Options</em> from the context menu while in the Track mode. +It opens a window like the one below:</p></div> +<div class="paragraph"><p>The options are:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/en/router_options.png" alt="Router options window screenshot"> +</div> +</div> +<div class="ulist"><ul> +<li> +<p> +<strong>Mode</strong> - select how the router handles DRC violation (shoving, walking + around, etc.) +</p> +</li> +<li> +<p> +<strong>Shove vias</strong> - when disabled, vias are treated as un-movable objects + and hugged instead of shoved. +</p> +</li> +<li> +<p> +<strong>Jump over obstacles</strong> - when enabled, the router tries to move + colliding traces behind solid obstacles (e.g. pads) instead of + "reflecting" back the collision +</p> +</li> +<li> +<p> +<strong>Remove redundant tracks</strong> - removes loops while routing (e.g. if the + new track ensures same connectivity as an already existing one, the old + track is removed). Loop removal works locally (only between the start + and end of the currently routed trace). +</p> +</li> +<li> +<p> +<strong>Automatic neckdown</strong> - when enabled, the router tries to break out + pads/vias in a clean way, avoiding acute angles and jagged breakout + traces. +</p> +</li> +<li> +<p> +<strong>Smooth dragged segments</strong> - when enabled, the router attempts to merge + several jagged segments into a single straight one (dragging mode). +</p> +</li> +<li> +<p> +<strong>Allow DRC violations</strong> (<em>Highlight collisions</em> mode only) - allows + to establish a track even if is violating the DRC rules. +</p> +</li> +<li> +<p> +<strong>Optimizer effort</strong> - defines how much time the router shall spend + optimizing the routed/shoved traces. More effort means cleaner routing + (but slower), less effort means faster routing but somewhat jagged + traces. +</p> +</li> +</ul></div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_creating_copper_zones">10. Creating copper zones</h2> +<div class="sectionbody"> +<div class="paragraph"><p>Copper zones are defined by an outline (closed polygon), and can +include holes (closed polygons inside the outline). A zone can be +drawn on a copper layer or alternatively on a technical layer.</p></div> +<div class="sect2"> +<h3 id="_creating_zones_on_copper_layers">10.1. Creating zones on copper layers</h3> +<div class="paragraph"><p>Pad (and track) connections to filled copper areas are checked by +the DRC engine. A zone must be filled (not just created) to connect +pads. Pcbnew currently uses track segments or polygons to fill +copper areas.</p></div> +<div class="paragraph"><p>Each option has its advantages and its disadvantages, the main disadvantage being increased +screen redraw time on slower machines. The final result is however the same.</p></div> +<div class="paragraph"><p>For calculation time reasons, the zone filling is not recreated after +each change, but only:</p></div> +<div class="ulist"><ul> +<li> +<p> +If a filling zone command is executed. +</p> +</li> +<li> +<p> +When a DRC test is performed. +</p> +</li> +</ul></div> +<div class="paragraph"><p>Copper zones must be filled or refilled after changes in tracks or +pads are made. Copper zones (usually ground and power planes) are usually +attached to a net.</p></div> +<div class="paragraph"><p>In order to create a copper zone you should:</p></div> +<div class="ulist"><ul> +<li> +<p> +Select parameters (net name, layer…). Turning on the layer + and highlighting this net is not mandatory but it is good practice. +</p> +</li> +<li> +<p> +Create the zone limit (If not, the entire board will be filled.). +</p> +</li> +<li> +<p> +Fill the zone. +</p> +</li> +</ul></div> +<div class="paragraph"><p>Pcbnew tries to fill all zones in one piece, and usually, there will +be no unconnected copper blocks. It can happen that some areas +remain unfilled. Zones having no net are not cleaned and can have +insulated areas.</p></div> +</div> +<div class="sect2"> +<h3 id="_creating_a_zone">10.2. Creating a zone</h3> +<div class="sect3"> +<h4 id="_creating_the_limits_of_a_zone">10.2.1. Creating the limits of a zone</h4> +<div class="paragraph"><p>Use the tool <span class="image"> +<img src="images/icons/add_zone.png" alt="images/icons/add_zone.png"> +</span>. The active layer +must be a copper layer. When clicking to start the zone outline, the +following dialog box will be opened.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_properties_dialog.png" alt="images/Pcbnew_zone_properties_dialog.png"> +</div> +</div> +<div class="paragraph"><p>You can specify all parameters for this zone:</p></div> +<div class="ulist"><ul> +<li> +<p> +Net +</p> +</li> +<li> +<p> +Layer +</p> +</li> +<li> +<p> +Filling options +</p> +</li> +<li> +<p> +Pad options +</p> +</li> +<li> +<p> +Priority level +</p> +</li> +</ul></div> +<div class="paragraph"><p>Draw the zone limit on this layer. This zone limit is a polygon, +created by left-clicking at each corner. A double-click will end +and close the polygon. If the starting point and +ending point are not at the same coordinate, Pcbnew will add a +segment from the end point to the start point.</p></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +<div class="ulist"><ul> +<li> +<p> +The DRC control is active when creating zone outlines. +</p> +</li> +<li> +<p> +A corner which creates a DRC error will not be accepted by Pcbnew. +</p> +</li> +</ul></div> +</td> +</tr></table> +</div> +<div class="paragraph"><p>In the following image you can see an example of a zone limit (polygon in thin +hatched line):</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_limit_example.png" alt="images/Pcbnew_zone_limit_example.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_priority_level">10.2.2. Priority level</h4> +<div class="paragraph"><p>Sometimes a small zone must be created inside a large zone.</p></div> +<div class="paragraph"><p>This is possible if the small zone has a higher priority level than +the large zone.</p></div> +<div class="paragraph"><p>Level setting:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_priority_level_setting.png" alt="images/Pcbnew_zone_priority_level_setting.png"> +</div> +</div> +<div class="paragraph"><p>Here is an example:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_priority_example.png" alt="images/Pcbnew_zone_priority_example.png"> +</div> +</div> +<div class="paragraph"><p>After filling:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_priority_example_after_filling.png" alt="images/Pcbnew_zone_priority_example_after_filling.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_filling_the_zone">10.2.3. Filling the zone</h4> +<div class="paragraph"><p>When filling a zone, Pcbnew removes all unconnected copper islands. +To access the zone filling command, right-click on the edge zone.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_context_menu.png" alt="images/Pcbnew_zone_context_menu.png"> +</div> +</div> +<div class="paragraph"><p>Activate the "Fill Zone" command. Below is the filling result +for a starting point inside the polygon:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_filling_result.png" alt="images/Pcbnew_zone_filling_result.png"> +</div> +</div> +<div class="paragraph"><p>The polygon is the border of the filling area. You can see a +non-filled area inside the zone, because this area is not accessible:</p></div> +<div class="ulist"><ul> +<li> +<p> +A track creates a border, and +</p> +</li> +<li> +<p> +There is no starting point for filling in this area. +</p> +</li> +</ul></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content">You can use many polygons to create cutout areas. Here you can +see an example:</td> +</tr></table> +</div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_filled_with_cutout.png" alt="images/Pcbnew_zone_filled_with_cutout.png"> +</div> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_filling_options">10.3. Filling options</h3> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_filling_options.png" alt="images/Pcbnew_zone_filling_options.png"> +</div> +</div> +<div class="paragraph"><p>When you fill an area, you must choose:</p></div> +<div class="ulist"><ul> +<li> +<p> +The mode for filling. +</p> +</li> +<li> +<p> +The clearance and minimum copper thickness. +</p> +</li> +<li> +<p> +How pads are drawn inside the zone (or connected to this zone). +</p> +</li> +<li> +<p> +Thermal relief parameters. +</p> +</li> +</ul></div> +<div class="sect3"> +<h4 id="_filling_mode">10.3.1. Filling mode</h4> +<div class="paragraph"><p>Zones can be filled using polygons or segments. The result is the +same. If you have problems with polygon mode (slow screen refresh) +you should use segments.</p></div> +</div> +<div class="sect3"> +<h4 id="_clearance_and_minimum_copper_thickness">10.3.2. Clearance and minimum copper thickness</h4> +<div class="paragraph"><p>A good choice for clearance is a grid that is a bit bigger than the +routing grid. Minimum copper thickness value ensures that there are +no too small copper ares.</p></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Warning</div> +</td> +<td class="content">if this value is too large, small shapes like thermal stubs +in thermal reliefs cannot be drawn.</td> +</tr></table> +</div> +</div> +<div class="sect3"> +<h4 id="_pad_options">10.3.3. Pad options</h4> +<div class="paragraph"><p>Pads of the net can either be included or excluded from the zone, or +connected by thermal reliefs.</p></div> +<div class="ulist"><ul> +<li> +<p> +If included, soldering and un-soldering can be very difficult due + to the high thermal mass of the large copper area. +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_include_pads.png" alt="images/Pcbnew_zone_include_pads.png"> +</div> +</div> +<div class="ulist"><ul> +<li> +<p> +If excluded, the connection to the zone will not be very good. +</p> +<div class="ulist"><ul> +<li> +<p> +The zone can be filled only if tracks exists to connect zone areas. +</p> +</li> +<li> +<p> +Pads must be connected by tracks. +</p> +</li> +</ul></div> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_exclude_pads.png" alt="images/Pcbnew_zone_exclude_pads.png"> +</div> +</div> +<div class="ulist"><ul> +<li> +<p> +A thermal relief is a good compromise. +</p> +<div class="ulist"><ul> +<li> +<p> +Pad is connected by 4 track segments. +</p> +</li> +<li> +<p> +The segment width is the current value used for the track width. +</p> +</li> +</ul></div> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_thermal_relief.png" alt="images/Pcbnew_zone_thermal_relief.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_thermal_relief_parameters">10.3.4. Thermal relief parameters</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_thermal_relief_settings.png" alt="images/Pcbnew_thermal_relief_settings.png"> +</div> +</div> +<div class="paragraph"><p>You can set two parameters for thermal reliefs:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_thermal_relief_parameters.png" alt="images/Pcbnew_thermal_relief_parameters.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_choice_of_parameters">10.3.5. Choice of parameters</h4> +<div class="paragraph"><p>The copper width value for thermal reliefs must be bigger than the +minimum thickness value for the copper zone. If not, they cannot be drawn.</p></div> +<div class="paragraph"><p>Additionally, a too large value for this parameter or for antipad +size does not allow one to create a thermal relief for small pads (like +pad sizes used for SMD components).</p></div> +</div> +</div> +<div class="sect2"> +<h3 id="_adding_a_cutout_area_inside_a_zone">10.4. Adding a cutout area inside a zone</h3> +<div class="paragraph"><p>A zone must already exist. To add a cutout area (a non-filled area +inside the zone):</p></div> +<div class="ulist"><ul> +<li> +<p> +Right-click on an existing edge outline. +</p> +</li> +<li> +<p> +Select Add Cutout Area. +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_add_cutout_menu_item.png" alt="images/Pcbnew_add_cutout_menu_item.png"> +</div> +</div> +<div class="ulist"><ul> +<li> +<p> +Create the new outline. +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_unfilled_cutout_outline.png" alt="images/Pcbnew_zone_unfilled_cutout_outline.png"> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_outlines_editing">10.5. Outlines editing</h3> +<div class="paragraph"><p>An outline can be modified by:</p></div> +<div class="ulist"><ul> +<li> +<p> +Moving a corner or an edge. +</p> +</li> +<li> +<p> +Deleting or adding a corner. +</p> +</li> +<li> +<p> +Adding a similar zone, or a cutout area. +</p> +</li> +</ul></div> +<div class="paragraph"><p>If polygons are overlapping they will be combined.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_modification_menu_items.png" alt="images/Pcbnew_zone_modification_menu_items.png"> +</div> +</div> +<div class="paragraph"><p>To do that, right-click on a corner or on an edge, then select the +proper command.</p></div> +<div class="paragraph"><p>Here is a corner (from a cutout) that has been moved:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_corner_move_during.png" alt="images/Pcbnew_zone_corner_move_during.png"> +</div> +</div> +<div class="paragraph"><p>Here is the final result:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_corner_move_after.png" alt="images/Pcbnew_zone_corner_move_after.png"> +</div> +</div> +<div class="paragraph"><p>Polygons are combined.</p></div> +<div class="sect3"> +<h4 id="_adding_a_similar_zone">10.5.1. Adding a similar zone</h4> +<div class="paragraph"><p>Adding the similar zone:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_add_similar_during.png" alt="images/Pcbnew_zone_add_similar_during.png"> +</div> +</div> +<div class="paragraph"><p>Final result:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_zone_add_similar_after.png" alt="images/Pcbnew_zone_add_similar_after.png"> +</div> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_editing_zone_parameters">10.6. Editing zone parameters</h3> +<div class="paragraph"><p>When right-clicking on an outline, and using <em>Edit Zone Params</em> the Zone params Dialog box will open. Initial parameters can be inputted . If the zone is already filled, refilling it will be necessary.</p></div> +</div> +<div class="sect2"> +<h3 id="_final_zone_filling">10.7. Final zone filling</h3> +<div class="paragraph"><p>When the board is finished, one must fill or refill all zones. To do +this:</p></div> +<div class="ulist"><ul> +<li> +<p> +Activate the tool zones via the button <span class="image"> +<img src="images/icons/add_zone.png" alt="images/icons/add_zone.png"> +</span>. +</p> +</li> +<li> +<p> +Right-click to display the pop-up menu. +</p> +</li> +<li> +<p> +Use Fill or Refill All Zones: <span class="image"> +<img src="images/Pcbnew_fill_refill_all_zones.png" alt="images/Pcbnew_fill_refill_all_zones.png"> +</span> +</p> +</li> +</ul></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Warning</div> +</td> +<td class="content">Calculation can take some time if the filling grid is small.</td> +</tr></table> +</div> +</div> +<div class="sect2"> +<h3 id="_change_zones_net_names">10.8. Change zones net names</h3> +<div class="paragraph"><p>After editing a schematic, you can change the name of any net. For +instance VCC can be changed to +5V.</p></div> +<div class="paragraph"><p>When a global DRC control is made Pcbnew checks if the zone net name +exists, and displays an error if not.</p></div> +<div class="paragraph"><p>Manually editing the zone parameters will be necessary to change the old +name to the new one.</p></div> +</div> +<div class="sect2"> +<h3 id="_creating_zones_on_technical_layers">10.9. Creating zones on technical layers</h3> +<div class="sect3"> +<h4 id="_creating_zone_limits">10.9.1. Creating zone limits</h4> +<div class="paragraph"><p>This is done using the button <span class="image"> +<img src="images/icons/add_zone.png" alt="images/icons/add_zone.png"> +</span>. +The active layer must be a technical layer.</p></div> +<div class="paragraph"><p>When clicking to start the zone outline, this dialog box is opened:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_technical_layer_zone_dialog.png" alt="images/Pcbnew_technical_layer_zone_dialog.png"> +</div> +</div> +<div class="paragraph"><p>Select the technical layer to place the zone and draw the zone +outline like explained previously for copper layers.</p></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +<div class="ulist"><ul> +<li> +<p> +For editing outlines use the same method as for copper zones. +</p> +</li> +<li> +<p> +If necessary, cutout areas can be added. +</p> +</li> +</ul></div> +</td> +</tr></table> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_creating_a_keepout_area">10.10. Creating a Keepout area</h3> +<div class="paragraph"><p>Select the tool <span class="image"> +<img src="images/icons/add_keepout_area.png" alt="images/icons/add_keepout_area.png"> +</span></p></div> +<div class="paragraph"><p>The active layer should be a copper layer.</p></div> +<div class="paragraph"><p>After clicking on the starting point of a new keepout area, the dialog +box is opened:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_keepout_area_properties.png" alt="images/Pcbnew_keepout_area_properties.png"> +</div> +</div> +<div class="paragraph"><p>One can select disallowed items:</p></div> +<div class="ulist"><ul> +<li> +<p> +Tracks. +</p> +</li> +<li> +<p> +Vias. +</p> +</li> +<li> +<p> +Copper pours. +</p> +</li> +</ul></div> +<div class="paragraph"><p>When a track or a via is inside a keepout which does not allow it, a +DRC error will be raised.</p></div> +<div class="paragraph"><p>For copper zones, the area inside a keepout with no copper pour will +be not filled. A keep-out area is a like a zone, so editing its +outline is analogous to copper zone editing.</p></div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_files_for_circuit_fabrication">11. Files for circuit fabrication</h2> +<div class="sectionbody"> +<div class="paragraph"><p>Let us see now what the steps are for the creation of the necessary files +for the production of your printed circuit board.</p></div> +<div class="paragraph"><p>All files generated by KiCad are placed in the working directory which is +the same directory that contains the xxxx.brd file for the printed +circuit board.</p></div> +<div class="sect2"> +<h3 id="_final_preparations">11.1. Final preparations</h3> +<div class="paragraph"><p>The generation of the necessary files for the production of your printed +circuit board includes the following preparatory steps.</p></div> +<div class="ulist"><ul> +<li> +<p> +Mark any layer (e.g., <em>top or front</em> and <em>bottom or back</em>) with the + project name by placing appropriate text upon each of the layers. +</p> +</li> +<li> +<p> +All text on copper layers (sometimes called <em>solder</em> or <em>bottom</em>) must + be mirrored. +</p> +</li> +<li> +<p> +Create any ground planes, modifying traces as required to ensure they + are contiguous. +</p> +</li> +<li> +<p> +Place alignment crosshairs and possibly the dimensions of the board + outline (these are usually placed on one of the general purpose layers). +</p> +</li> +</ul></div> +<div class="paragraph"><p>Here is an example showing all of these elements, except ground planes, +which have been omitted for better visibility:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_final_preparation_example_board.png" alt="images/Pcbnew_final_preparation_example_board.png"> +</div> +</div> +<div class="paragraph"><p>A color key for the 4 copper layers has also been included: +<span class="image"> +<img src="images/Pcbnew_layer_colour_key.png" alt="images/Pcbnew_layer_colour_key.png"> +</span></p></div> +</div> +<div class="sect2"> +<h3 id="_final_drc_test">11.2. Final DRC test</h3> +<div class="paragraph"><p>Before generating the output files, a global DRC test is very +strongly recommended.</p></div> +<div class="paragraph"><p>Zones are filled or refilled when starting a DRC. Press the button +<span class="image"> +<img src="images/icons/drc.png" alt="images/icons/drc.png"> +</span> +to launch the following DRC dialog:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_DRC_dialog.png" alt="images/Pcbnew_DRC_dialog.png"> +</div> +</div> +<div class="paragraph"><p>Adjust the parameters accordingly and then press the "Start DRC" button.</p></div> +<div class="paragraph"><p>This final check will prevent any unpleasant surprises.</p></div> +</div> +<div class="sect2"> +<h3 id="_setting_coordinates_origin">11.3. Setting coordinates origin</h3> +<div class="paragraph"><p>Set the coordinates origin for the photo plot and drill files, one +must place the auxiliary axis on this origin. Activate the icon +<span class="image"> +<img src="images/icons/pcb_offset.png" alt="images/icons/pcb_offset.png"> +</span>. Move the auxiliary axis by +left-clicking on the chosen location.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_setting_pcb_origin.png" alt="images/Pcbnew_setting_pcb_origin.png"> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_generating_files_for_photo_tracing">11.4. Generating files for photo-tracing</h3> +<div class="paragraph"><p>This is done via the Files/Plot menu option and invokes the following +dialog:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_plot_dialog.png" alt="images/Pcbnew_plot_dialog.png"> +</div> +</div> +<div class="paragraph"><p>Usually, the files are in the GERBER format. Nevertheless, it is +possible to produce output in both HPGL and POSTSCRIPT formats. When +Postscript format is selected, this dialog will appear.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_plot_postscript_dialog.png" alt="images/Pcbnew_plot_postscript_dialog.png"> +</div> +</div> +<div class="paragraph"><p>In these formats, a fine scale adjust can be used to compensate for +the plotter accuracy and to have a true scale of 1 for the output:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_plot_fine_scale_setting.png" alt="images/Pcbnew_plot_fine_scale_setting.png"> +</div> +</div> +<div class="sect3"> +<h4 id="_gerber_format">11.4.1. GERBER format</h4> +<div class="paragraph"><p>For each layer, Pcbnew generates a separate file following the +GERBER 274X standard, by default in 4.6 format (each coordinate in +the file is represented by 10 digits, of which 4 are before the +decimal point and 6 follow it), units in inches, and a scale +of 1.</p></div> +<div class="paragraph"><p>It is normally necessary to create files for all of the copper +layers and, depending on the circuit, for the silkscreen, solder mask, +and solder paste layers. All of these files can be produced in one +step, by selecting the appropriate check boxes.</p></div> +<div class="paragraph"><p>For example, for a double-sided circuit with silkscreen, solder mask +and solder paste (for SMD components), 8 files should be generated +(<em>xxxx</em> represents the name of the .brd file).</p></div> +<div class="ulist"><ul> +<li> +<p> +xxxx-F_Cu.gbr for the component side. +</p> +</li> +<li> +<p> +xxxx-B_Cu.gbr for the copper side. +</p> +</li> +<li> +<p> +xxxx-F_SilkS.gbr for the component-side silkscreen markings. +</p> +</li> +<li> +<p> +xxxx-B_SilkS.gbr for the copper-side silkscreen markings. +</p> +</li> +<li> +<p> +xxxx-F_Paste.gbr for the component-side solder paste. +</p> +</li> +<li> +<p> +xxxx-B_Paste.gbr for the copper-side solder paste. +</p> +</li> +<li> +<p> +xxxx-F_Mask.gbr for the component-side solder mask. +</p> +</li> +<li> +<p> +xxxx-B_Mask.gbr for the copper-side solder mask. +</p> +</li> +</ul></div> +<div class="paragraph"><p>GERBER file format:</p></div> +<div class="paragraph"><p>The format used by Pcbnew is RS274X format 4.6, Imperial, Leading +zero omitted, Abs format. These are very usual settings.</p></div> +</div> +<div class="sect3"> +<h4 id="_postscript_format">11.4.2. POSTSCRIPT format</h4> +<div class="paragraph"><p>The standard extension for the output files is .ps in the case of +postscript output. As for HPGL output, the tracing can be at +user-selected scales and can be mirrored. If the Org = Centre option +is active, the origin for the coordinates of the tracing table is +assumed to be in the centre of the drawing.</p></div> +<div class="paragraph"><p>If the Print Sheet Ref option is active, the sheet cartridge is traced.</p></div> +</div> +<div class="sect3"> +<h4 id="_plot_options">11.4.3. Plot options</h4> +<div class="paragraph"><p>Gerber format:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_plot_options_gerber.png" alt="images/Pcbnew_plot_options_gerber.png"> +</div> +</div> +<div class="paragraph"><p>Other formats:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_plot_options_other_formats.png" alt="images/Pcbnew_plot_options_other_formats.png"> +</div> +</div> +<div class="paragraph"><p>GERBER format specific options:</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:50%;"> +<col style="width:50%;"> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Use Protel filename extensions</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Use .gbl .gtl .gbs .gts .gbp .gtp .gbo .gto instead of .gbr for file name extensions.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Include extended attributes</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Output extended attributes to file.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Subtract soldermask from silkscreen</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Remove all Silk from solder paste areas.</p></td> +</tr> +</tbody> +</table> +</div> +<div class="sect3"> +<h4 id="_other_formats">11.4.4. Other formats</h4> +<div class="paragraph"><p>The standard extension depends on the output file type.</p></div> +<div class="paragraph"><p>Some options are not available for some formats.</p></div> +<div class="paragraph"><p>The plot can be done at user-selected scales and can be mirrored.</p></div> +<div class="paragraph"><p>The Print Drill Opt list offers the option of pads that are filled, +drilled to the correct diameter or drilled with a small hole (to +guide hand drilling).</p></div> +<div class="paragraph"><p>If the Print Sheet Ref option is active, the sheet cartridge is traced.</p></div> +</div> +</div> +<div class="sect2"> +<h3 id="_global_clearance_settings_for_the_solder_stop_and_the_solder_paste_mask">11.5. Global clearance settings for the solder stop and the solder paste mask</h3> +<div class="paragraph"><p>Mask clearance values can be set globally for the solder mask +layers and the solder paste layers. These clearances can be set +at the following levels.</p></div> +<div class="ulist"><ul> +<li> +<p> +At pads level. +</p> +</li> +<li> +<p> +At footprint level. +</p> +</li> +<li> +<p> +Globally. +</p> +</li> +</ul></div> +<div class="paragraph"><p>And Pcbnew uses by priority order.</p></div> +<div class="ulist"><ul> +<li> +<p> +Pad values. If null: +</p> +</li> +<li> +<p> +Footprint values. If null: +</p> +</li> +<li> +<p> +Global values. +</p> +</li> +</ul></div> +<div class="sect3"> +<h4 id="_access">11.5.1. Access</h4> +<div class="paragraph"><p>The menu option for this is available via the Dimensions menu:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_pad_mask_clearance_menu_item.png" alt="images/Pcbnew_pad_mask_clearance_menu_item.png"> +</div> +</div> +<div class="paragraph"><p>The dialog box is the following:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_pad_mask_settings_dialog.png" alt="images/Pcbnew_pad_mask_settings_dialog.png"> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_solder_mask_clearance">11.5.2. Solder mask clearance</h4> +<div class="paragraph"><p>A value near to 0.2 mm is usually good. This value is positive +because the mask is usually bigger than the pad.</p></div> +<div class="paragraph"><p>One can set a minimum value for the solder mask width, between 2 pads.</p></div> +<div class="paragraph"><p>If the actual value is smaller than the minimum value, the 2 solder +mask shapes will be merged.</p></div> +</div> +<div class="sect3"> +<h4 id="_solder_paste_clearance">11.5.3. Solder paste clearance</h4> +<div class="paragraph"><p>The final clearance is the sum of the solder paste clearance and a +percentage of the pad size.</p></div> +<div class="paragraph"><p>This value is negative because the mask is usually smaller than the +pad.</p></div> +</div> +</div> +<div class="sect2"> +<h3 id="_generating_drill_files">11.6. Generating drill files</h3> +<div class="paragraph"><p>The creation of a drill file xxxx.drl following the EXCELLON +standard is always necessary.</p></div> +<div class="paragraph"><p>One can also produce an optional drill report, and an optional drill +map.</p></div> +<div class="ulist"><ul> +<li> +<p> +The drill map can be plotted using several formats. +</p> +</li> +<li> +<p> +The drill report is a plain text file. +</p> +</li> +</ul></div> +<div class="paragraph"><p>The generation of these files is controlled via:</p></div> +<div class="ulist"><ul> +<li> +<p> +"Create Drill File" button, or +</p> +</li> +<li> +<p> +Files/Fabrication Outputs/Drill file menu selection. +</p> +</li> +</ul></div> +<div class="paragraph"><p>The Drill tools dialog box will be the following:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_drill_file_dialog.png" alt="images/Pcbnew_drill_file_dialog.png"> +</div> +</div> +<div class="paragraph"><p>For setting the coordinate origin, the following dialog box is used:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_drill_origin_setting.png" alt="images/Pcbnew_drill_origin_setting.png"> +</div> +</div> +<div class="ulist"><ul> +<li> +<p> +Absolute: absolute coordinate system is used. +</p> +</li> +<li> +<p> +Auxiliary axis: coordinates are relative to the auxiliary axis, + use the icon (right toolbar) to set it. +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_generating_wiring_documentation">11.7. Generating wiring documentation</h3> +<div class="paragraph"><p>To produce wiring documentation files, the component and copper +silkscreen layers can be traced. Usually, just the component-side +silkscreen markings are sufficient for wiring a PCB. If the +copper-side silkscreen is used, the text it contains should be +mirrored in order to be readable.</p></div> +</div> +<div class="sect2"> +<h3 id="_generation_of_files_for_automatic_component_insertion">11.8. Generation of files for automatic component insertion</h3> +<div class="paragraph"><p>This option is accessed via the Postprocess/Create Cmp file menu +option. However, no file will be generated unless at least one +footprint has the Normal+Insert attribute activated (see Editing +Footprints). One or two files will be produced, depending upon whether +insertable components are present on one or both sides of the PCB. A +dialogue box will display the names of the file(s) created.</p></div> +</div> +<div class="sect2"> +<h3 id="_advanced_tracing_options">11.9. Advanced tracing options</h3> +<div class="paragraph"><p>The options described below (part of the Files/Plot dialogue) allow +for fine-grained control of the tracing process. They are +particularly useful when printing the silkscreen markings for +wiring documentation.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_advanced_tracing_options.png" alt="images/Pcbnew_advanced_tracing_options.png"> +</div> +</div> +<div class="paragraph"><p>The available options are:</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:33%;"> +<col style="width:66%;"> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Plot sheet reference on all layers</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Trace sheet outline and the cartridge.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Plot pads on silkscreen</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Enables/disables printing of pad outlines on the silkscreen layers (if the pads +have already been declared to appear on these layers). Prevents any pads from +being printed in the disabled mode.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Plot footprint values</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Enables printing of VALUE text on the silkscreen.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Plot footprint references</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Enables printing of the REFERENCE text on the silkscreen.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Force plotting of invisible values/references</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Forces printing of fields (reference, value) declared as invisible. +In combination with <em>Plot footprint values</em> and <em>Plot footprint references</em>, +this option enables production of documents for guiding wiring and repair. +These options have proven necessary for circuits using components that are too +small (SMD) to allow readable placement of two separate text fields.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Do not tent vias</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Delete the mask over the vias.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Exclude PCB edge layer from other layers</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">GERBER format specific. Do not plot graphic items on edge layer.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Use Protel filename extensions</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">GERBER format specific. +When creating files, use specific extensions for each file. +If disabled the Gerber file extension is .gbr.</p></td> +</tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_footprint_editor_managing_libraries">12. Footprint Editor - Managing Libraries</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_overview_of_footprint_editor">12.1. Overview of Footprint Editor</h3> +<div class="paragraph"><p>Pcbnew can simultaneously maintain several libraries. Thus, when a +footprint is loaded, all libraries that appear in the library list are +searched until the first instance of the footprint is found. In what +follows, note that the active library is the library selected within +the Footprint Editor, the program will now be described</p></div> +<div class="paragraph"><p>Footprint Editor enables the creation and the editing of footprints:</p></div> +<div class="ulist"><ul> +<li> +<p> +Adding and removing pads. +</p> +</li> +<li> +<p> +Changing pad properties (shape, layer) for individual pads or + globally for all pads of a footprint. +</p> +</li> +<li> +<p> +Editing graphic elements (lines, text). +</p> +</li> +<li> +<p> +Editing information fields (value, reference, etc.). +</p> +</li> +<li> +<p> +Editing the associated documentation (description, keywords). +</p> +</li> +</ul></div> +<div class="paragraph"><p>Footprint Editor allows the maintenance of the active library as well by:</p></div> +<div class="ulist"><ul> +<li> +<p> +Listing the footprints in the active library. +</p> +</li> +<li> +<p> +Deletion of a footprint from the active library. +</p> +</li> +<li> +<p> +Saving a footprint to the active library. +</p> +</li> +<li> +<p> +Saving all of the footprints contained by a printed circuit. +</p> +</li> +</ul></div> +<div class="paragraph"><p>It is also possible to create new libraries.</p></div> +<div class="paragraph"><p>The library extension is <span class="monospaced">.mod</span>.</p></div> +</div> +<div class="sect2"> +<h3 id="_accessing_footprint_editor">12.2. Accessing Footprint Editor</h3> +<div class="paragraph"><p>The Footprint Editor can be accessed in two different ways:</p></div> +<div class="ulist"><ul> +<li> +<p> +Directly, via the icon <span class="image"> +<img src="images/icons/module_editor.png" alt="images/icons/module_editor.png"> +</span> + in the main toolbar of Pcbnew. +</p> +</li> +<li> +<p> +In the edit dialog for the active footprint (see figure below: accessed + via the context menu), there is the button Footprint Editor. +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_module_properties.png" alt="images/Pcbnew_module_properties.png"> +</div> +</div> +<div class="paragraph"><p>In this case, the active footprint of the board will be loaded automatically in Footprint Editor, enabling immediate editing or archiving.</p></div> +</div> +<div class="sect2"> +<h3 id="_footprint_editor_user_interface">12.3. Footprint Editor user interface</h3> +<div class="paragraph"><p>By calling Footprint Editor the following window will appear:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_main_window.png" alt="images/Modedit_main_window.png"> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_top_toolbar_in_footprint_editor">12.4. Top toolbar in Footprint Editor</h3> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_top_toolbar.png" alt="images/Modedit_top_toolbar.png"> +</div> +</div> +<div class="paragraph"><p>From this toolbar, the following functions are available:</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:20%;"> +<col style="width:80%;"> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/library.png" alt="images/icons/library.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Select the active library.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/save_library.png" alt="images/icons/save_library.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Save the current footprint to the active library, and write it to disk.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/new_library.png" alt="images/icons/new_library.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Create a new library and save the current footprint in it.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/modview_icon.png" alt="images/icons/modview_icon.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Open the Footprint Viewer</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/delete.png" alt="images/icons/delete.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Access a dialog for deleting a footprint from the active library.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/new_footprint.png" alt="images/icons/new_footprint.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Create a new footprint.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/module_wizard.png" alt="images/icons/module_wizard.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Create a footprint using a wizard</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/load_module_lib.png" alt="images/icons/load_module_lib.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Load a footprint from the active library.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/load_module_board.png" alt="images/icons/load_module_board.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Load (import) a footprint from the printed circuit board.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/update_module_board.png" alt="images/icons/update_module_board.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Export the current footprint to the printed circuit board. when the +footprint was previously imported from the current board. It will replace +the corresponding footprint on the board (i.e., respecting position and +orientation).</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/insert_module_board.png" alt="images/icons/insert_module_board.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Export the current footprint to the printed circuit board. It will be +copied on to the printed circuit board at position 0.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/import_module.png" alt="images/icons/import_module.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Import a footprint from a file created by the Export command.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/export_module.png" alt="images/icons/export_module.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Export a footprint. This command is essentially identical to that for +creating a library, the only difference being that it creates a library +in the user directory, while creating a library in the standard library +directory (usually kicad/modules).</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/undo.png" alt="images/icons/undo.png"> +</span> <span class="image"> +<img src="images/icons/redo.png" alt="images/icons/redo.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Undo and Redo</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/module_options.png" alt="images/icons/module_options.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Invokes the footprint properties dialog.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/print_button.png" alt="images/icons/print_button.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Call the print dialog.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/zoom_in.png" alt="images/icons/zoom_in.png"> +</span> +<span class="image"> +<img src="images/icons/zoom_out.png" alt="images/icons/zoom_out.png"> +</span> +<span class="image"> +<img src="images/icons/zoom_redraw.png" alt="images/icons/zoom_redraw.png"> +</span> +<span class="image"> +<img src="images/icons/zoom_fit_in_page.png" alt="images/icons/zoom_fit_in_page.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Standard zoom commands.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/options_pad.png" alt="images/icons/options_pad.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Call the pad editor.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/module_check.png" alt="images/icons/module_check.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Perform a check of footprint correctness</p></td> +</tr> +</tbody> +</table> +</div> +<div class="sect2"> +<h3 id="_creating_a_new_library">12.5. Creating a new library</h3> +<div class="paragraph"><p>The creation of a new library is done via the button +<span class="image"> +<img src="images/icons/new_library.png" alt="images/icons/new_library.png"> +</span>, in this case the file is created +by default in the library directory or via the button +<span class="image"> +<img src="images/icons/export_module.png" alt="images/icons/export_module.png"> +</span>, in which case the file is created +by default in your working directory.</p></div> +<div class="paragraph"><p>A file-choosing dialog allows the name of the library to be specified +and its directory to be changed. In both cases, the library will +contain the footprint being edited.</p></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Warning</div> +</td> +<td class="content">If an old library of the same name exists, it will be +overwritten without warning.</td> +</tr></table> +</div> +</div> +<div class="sect2"> +<h3 id="_saving_a_footprint_in_the_active_library">12.6. Saving a footprint in the active library</h3> +<div class="paragraph"><p>The action of saving a footprint (thereby modifying the file of the +active library) is performed using this button +<span class="image"> +<img src="images/icons/save_library.png" alt="images/icons/save_library.png"> +</span>. If a footprint of the same name +already exists, it will be replaced. Since you will depend upon the +accuracy of the library footprints, it is worth double-checking the footprint +before saving.</p></div> +<div class="paragraph"><p>It is recommended to edit either the reference or value field text to +the name of the footprint as identified in the library.</p></div> +</div> +<div class="sect2"> +<h3 id="_transferring_a_footprint_from_one_library_to_another">12.7. Transferring a footprint from one library to another</h3> +<div class="ulist"><ul> +<li> +<p> +Select the source library via the button + <span class="image"> +<img src="images/icons/library.png" alt="images/icons/library.png"> +</span>. +</p> +</li> +<li> +<p> +Load the footprint via the button + <span class="image"> +<img src="images/icons/load_module_lib.png" alt="images/icons/load_module_lib.png"> +</span>. +</p> +</li> +<li> +<p> +Select the destination library via the button + <span class="image"> +<img src="images/icons/library.png" alt="images/icons/library.png"> +</span>. +</p> +</li> +<li> +<p> +Save the footprint via the button <span class="image"> +<img src="images/icons/save_library.png" alt="images/icons/save_library.png"> +</span> +</p> +</li> +</ul></div> +<div class="paragraph"><p>You may also wish to delete the source footprint.</p></div> +<div class="ulist"><ul> +<li> +<p> +Reselect the source library with <span class="image"> +<img src="images/icons/library.png" alt="images/icons/library.png"> +</span> +</p> +</li> +<li> +<p> +Delete the old footprint via the button <span class="image"> +<img src="images/icons/delete.png" alt="images/icons/delete.png"> +</span> +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_saving_all_footprints_of_your_board_in_the_active_library">12.8. Saving all footprints of your board in the active library</h3> +<div class="paragraph"><p>It is possible to copy all of the footprints of a given board design to +the active library. These footprints will keep their current library +names. This command has two uses:</p></div> +<div class="ulist"><ul> +<li> +<p> +To create an archive or complete a library with the footprints from a + board, in the event of the loss of a library. +</p> +</li> +<li> +<p> +More importantly, it facilitates library maintenance by enabling the + production of documentation for the library, as below. +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_documentation_for_library_footprints">12.9. Documentation for library footprints</h3> +<div class="paragraph"><p>It is strongly recommended to document the footprints you create, in +order to enable rapid and error-free searching.</p></div> +<div class="paragraph"><p>For example, who is able to remember all of the multiple pin-out +variants of a TO92 package? The Footprint Properties dialog offers a +simple solution to this problem.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_module_properties.png" alt="images/Modedit_module_properties.png"> +</div> +</div> +<div class="paragraph"><p>This dialog accepts:</p></div> +<div class="ulist"><ul> +<li> +<p> +A one-line comment/description. +</p> +</li> +<li> +<p> +Multiple keywords. +</p> +</li> +</ul></div> +<div class="paragraph"><p>The description is displayed with the component list in Cvpcb and, +in Pcbnew, it is used in the footprint selection dialogs.</p></div> +<div class="paragraph"><p>The keywords enable searches to be restricted to those footprints +corresponding to particular keywords.</p></div> +<div class="paragraph"><p>When directly loading a footprint (the icon +<span class="image"> +<img src="images/icons/module.png" alt="images/icons/module.png"> +</span> of the right-hand Pcbnew toolbar), +keywords may be entered in the dialog box. Thus, entering the +text <span class="monospaced">=CONN</span> will cause the display of the list of footprints whose +keyword lists contain the word <span class="monospaced">CONN</span>.</p></div> +</div> +<div class="sect2"> +<h3 id="_documenting_libraries_recommended_practice">12.10. Documenting libraries - recommended practice</h3> +<div class="paragraph"><p>It is recommended to create libraries indirectly, by creating one or +more auxiliary circuit boards that constitute the source of (part +of) the library, as follows: Create a circuit board in A4 format, in +order to be able to print easily to scale (scale = 1).</p></div> +<div class="paragraph"><p>Create the footprints that the library will contain on this circuit +board. The library itself will be created with the File/Archive +footprints/Create footprint archive command.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_archive_footprints_menu.png" alt="images/Pcbnew_archive_footprints_menu.png"> +</div> +</div> +<div class="paragraph"><p>The "true source" of the library will thus be the auxiliary circuit +board, and it is on this circuit that any subsequent alterations of +footprints will be made. Naturally, several circuit boards can be saved +in the same library.</p></div> +<div class="paragraph"><p>It is generally a good idea to make different libraries for +different kinds of components (connectors, discretes,…), since +Pcbnew is able to search many libraries when loading footprints.</p></div> +<div class="paragraph"><p>Here is an example of such a library source:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_example_library.png" alt="images/Pcbnew_example_library.png"> +</div> +</div> +<div class="paragraph"><p>This technique has several advantages:</p></div> +<div class="ulist"><ul> +<li> +<p> +The circuit can be printed to scale and serve as documentation for + the library with no further effort. +</p> +</li> +<li> +<p> +Future changes of Pcbnew may require regeneration of the + libraries, something that can be done very quickly if circuit-board + sources of this type have been used. This is important, because the + circuit board file formats are guaranteed to remain compatible + during future development, but this is not the case for the library + file format. +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_footprint_libraries_management">12.11. Footprint Libraries Management</h3> +<div class="paragraph"><p>The list of footprint libraries in Pcbnew can be edited using the +Footprint Libraries Manager. This allows you to add and remove footprint +libraries by hand, and also allows you to invoke the Footprint Libraries +Wizard by pressing the "Append With Wizard" button.</p></div> +<div class="paragraph"><p>The Footprint Libraries Wizard can also be invoked through the +Preferences menu, and can automatically add a library (detecting its +type) from a file or from a Github URL. The URL for the official +libraries is: <a href="https://github.com/KiCad">https://github.com/KiCad</a></p></div> +<div class="paragraph"><p>More details about footprint library tables and the Manager and Wizard +can be found in the CvPcb Reference Manual in the section +<em>Footprint Library Tables</em>.</p></div> +</div> +<div class="sect2"> +<h3 id="_3d_shapes_libraries_management">12.12. 3D Shapes Libraries Management</h3> +<div class="paragraph"><p>The 3D shape libraries can be downloaded by 3D Shape Libraries Wizard. +It can be invoked from the menu Preferences → 3D Shapes Libraries Downloader.</p></div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_footprint_editor_creating_and_editing_footprints">13. Footprint Editor - Creating and Editing Footprints</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_footprint_editor_overview">13.1. Footprint Editor overview</h3> +<div class="paragraph"><p>Footprint Editor is used for editing and creating PCB footprints. This includes:</p></div> +<div class="ulist"><ul> +<li> +<p> +Adding and removing pads. +</p> +</li> +<li> +<p> +Changing pad properties (shape, layer), for individual pads or for + all the pads in a footprint. +</p> +</li> +<li> +<p> +Adding and editing graphic elements (contours, text). +</p> +</li> +<li> +<p> +Editing fields (value, reference, etc.). +</p> +</li> +<li> +<p> +Editing the associated documentation (description, keywords). +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_footprint_elements">13.2. Footprint elements</h3> +<div class="paragraph"><p>A footprint is the physical representation (footprint) of the part to +be inserted in the PCB and it must be linked to the relative +component in your schematic. Each footprint includes three different +elements:</p></div> +<div class="ulist"><ul> +<li> +<p> +The pads. +</p> +</li> +<li> +<p> +Graphical contours and text. +</p> +</li> +<li> +<p> +Fields. +</p> +</li> +</ul></div> +<div class="paragraph"><p>In addition, a number of other parameters must be correctly defined if +the auto-placement function will be used. The same holds for the +generation of auto-insertion files.</p></div> +<div class="sect3"> +<h4 id="_pads">13.2.1. Pads</h4> +<div class="paragraph"><p>Two pad properties are important:</p></div> +<div class="ulist"><ul> +<li> +<p> +Geometry (shape, layers, drill holes). +</p> +</li> +<li> +<p> +The pad number, which is constituted by up to four alphanumeric + characters. Thus, the following are all valid pad numbers: 1, 45 and + 9999, but also AA56 and ANOD. The pad number must be identical to that + of the corresponding pin number in the schematic, because it defines + the matching pin and pad numbers that Pcbnew links pins and pads with. +</p> +</li> +</ul></div> +</div> +<div class="sect3"> +<h4 id="_contours">13.2.2. Contours</h4> +<div class="paragraph"><p>Graphical contours are used to draw the physical shape of the +footprint. Several different types of contour are available: lines, +circles, arcs, and text. Contours have no electrical significance, +they are simply graphical aids.</p></div> +</div> +<div class="sect3"> +<h4 id="_fields">13.2.3. Fields</h4> +<div class="paragraph"><p>These are text elements associated with a footprint. Two are obligatory +and always present: the reference field and the value field. These +are automatically read and updated by Pcbnew when a netlist is read +during the loading of footprints into your board. The reference is +replaced by the appropriate schematic reference (U1, IC3, etc.). The +value is replaced by the value of the corresponding part in the +schematic (47K, 74LS02, etc.). Other fields can be added and these +will behave like graphical text.</p></div> +</div> +</div> +<div class="sect2"> +<h3 id="_starting_footprint_editor_and_selecting_a_footprint_to_edit">13.3. Starting Footprint Editor and selecting a footprint to edit</h3> +<div class="paragraph"><p>Footprint Editor can be started in two ways:</p></div> +<div class="ulist"><ul> +<li> +<p> +Directly via the <span class="image"> +<img src="images/icons/module_editor.png" alt="images/icons/module_editor.png"> +</span> icon from the main + toolbar of Pcbnew. This allows the creation or modification of a footprint in + the library. +</p> +</li> +<li> +<p> +Double-clicking a footprint will launch the <em>Footprint Properties</em> menu, + which offers a <em>Go to Footprint Editor</em> button. If this option is used, + the footprint from the board will be loaded into the editor, for + modification or for saving. +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_footprint_editor_toolbars">13.4. Footprint Editor Toolbars</h3> +<div class="paragraph"><p>Calling Footprint Editor will launch a new window that looks like this:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_main_window.png" alt="images/Modedit_main_window.png"> +</div> +</div> +<div class="sect3"> +<h4 id="_edit_toolbar_right_hand_side">13.4.1. Edit toolbar (right-hand side)</h4> +<div class="paragraph"><p>This toolbar contains tools for:</p></div> +<div class="ulist"><ul> +<li> +<p> +Placing pads. +</p> +</li> +<li> +<p> +Adding graphic elements (contours, text). +</p> +</li> +<li> +<p> +Positioning the anchor. +</p> +</li> +<li> +<p> +Deleting elements. +</p> +</li> +</ul></div> +<div class="paragraph"><p>The specific functions are the following:</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:20%;"> +<col style="width:80%;"> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/cursor.png" alt="images/icons/cursor.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">No tool.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/pad.png" alt="images/icons/pad.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Add pads.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/add_polygon.png" alt="images/icons/add_polygon.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Draw line segments and polygons.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/add_circle.png" alt="images/icons/add_circle.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Draw circles.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/add_arc.png" alt="images/icons/add_arc.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Draw circular arcs.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/add_text.png" alt="images/icons/add_text.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Add graphical text (fields are not managed by this tool).</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/anchor.png" alt="images/icons/anchor.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Position the footprint anchor.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/delete.png" alt="images/icons/delete.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Delete elements.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/grid_select_axis.png" alt="images/icons/grid_select_axis.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Grid origin. (grid offset). Useful for placement of pads. +The grid origin can be put on a given location (the first pad to place), +and after the grid size can be set to the pad pitch. +Placing pads is therefore very easy</p></td> +</tr> +</tbody> +</table> +</div> +<div class="sect3"> +<h4 id="_display_toolbar_left_hand_side">13.4.2. Display toolbar (left-hand side)</h4> +<div class="paragraph"><p>These tools manage the display options in Footprint Editor:</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<col style="width:20%;"> +<col style="width:80%;"> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/grid.png" alt="images/icons/grid.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Display the grid.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/polar_coord.png" alt="images/icons/polar_coord.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Display polar coordinates.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/unit_mm.png" alt="images/icons/unit_mm.png"> +</span> <span class="image"> +<img src="images/icons/unit_inch.png" alt="images/icons/unit_inch.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Use units of mm or inch</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/cursor_shape.png" alt="images/icons/cursor_shape.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Toggle cursor crosshair shape</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/pad_sketch.png" alt="images/icons/pad_sketch.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Display pad in outline mode.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/text_sketch.png" alt="images/icons/text_sketch.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Display text in outline mode.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/show_mod_edge.png" alt="images/icons/show_mod_edge.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Display contours in outline mode.</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image"> +<img src="images/icons/contrast_mode.png" alt="images/icons/contrast_mode.png"> +</span></p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Toggle high-contrast mode</p></td> +</tr> +</tbody> +</table> +</div> +</div> +<div class="sect2"> +<h3 id="_context_menus">13.5. Context Menus</h3> +<div class="paragraph"><p>The right mouse button calls up menus that depend upon the element +beneath the cursor.</p></div> +<div class="paragraph"><p>The context menu for editing footprint parameters:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_context_menu_module_parameters.png" alt="images/Modedit_context_menu_module_parameters.png"> +</div> +</div> +<div class="paragraph"><p>The context menu for editing pads:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_context_menu_pads.png" alt="images/Modedit_context_menu_pads.png"> +</div> +</div> +<div class="paragraph"><p>The context menu for editing graphic elements:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_context_menu_graphics.png" alt="images/Modedit_context_menu_graphics.png"> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_footprint_properties_dialog">13.6. Footprint properties dialog</h3> +<div class="paragraph"><p>This dialog can be launched when the cursor is over a footprint by +clicking on the right mouse button and then selecting <em>Edit Footprint</em>.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_module_properties_dialog.png" alt="images/Modedit_module_properties_dialog.png"> +</div> +</div> +<div class="paragraph"><p>The dialog can be used to define the main footprint parameters.</p></div> +</div> +<div class="sect2"> +<h3 id="_creating_a_new_footprint">13.7. Creating a new footprint</h3> +<div class="paragraph"><p>A new footprint can be created via the button +<span class="image"> +<img src="images/icons/new_footprint.png" alt="images/icons/new_footprint.png"> +</span>. The name of the new footprint +will be requested. This will be the name by which the footprint will be +identified in the library.</p></div> +<div class="paragraph"><p>This text also serves as the footprint value, which is ultimately +replaced by the real value (100 µF_16 V, 100 Ω_0.5 W, …).</p></div> +<div class="paragraph"><p>The new footprint will require:</p></div> +<div class="ulist"><ul> +<li> +<p> +Contours (and possibly graphic text). +</p> +</li> +<li> +<p> +Pads. +</p> +</li> +<li> +<p> +A value (hidden text that is replaced by the true value when used). +</p> +</li> +</ul></div> +<div class="paragraph"><p>Alternative method:</p></div> +<div class="paragraph"><p>When a new footprint is similar to an existing footprint in a library or a +circuit board, an alternative and quicker method of creating the new +footprint is as follows:</p></div> +<div class="ulist"><ul> +<li> +<p> +Load the similar footprint (<span class="image"> +<img src="images/icons/load_module_lib.png" alt="images/icons/load_module_lib.png"> +</span>, + <span class="image"> +<img src="images/icons/load_module_board.png" alt="images/icons/load_module_board.png"> +</span> or + <span class="image"> +<img src="images/icons/import_module.png" alt="images/icons/import_module.png"> +</span>). +</p> +</li> +<li> +<p> +Modify the "Footprint Name in Library" field in order to generate a new identifier (name). +</p> +</li> +<li> +<p> +Edit and save the new footprint. +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_adding_and_editing_pads">13.8. Adding and editing pads</h3> +<div class="paragraph"><p>Once a footprint has been created, pads can be added, deleted or +modified. Modification of pads can be local, affecting only the pad +under the cursor, or global, affecting all pads of the footprint.</p></div> +<div class="sect3"> +<h4 id="_adding_pads">13.8.1. Adding pads</h4> +<div class="paragraph"><p>Select the <span class="image"> +<img src="images/icons/pad.png" alt="images/icons/pad.png"> +</span> icon from the right hand +toolbar. Pads can be added by clicking in the desired position with +the left mouse button. Pad properties are predefined in the pad +properties menu.</p></div> +<div class="paragraph"><p>Do not forget to enter the pad number.</p></div> +</div> +<div class="sect3"> +<h4 id="_setting_pad_properties">13.8.2. Setting pad properties</h4> +<div class="paragraph"><p>This can be done in three different ways:</p></div> +<div class="ulist"><ul> +<li> +<p> +Selecting the <span class="image"> +<img src="images/icons/options_pad.png" alt="images/icons/options_pad.png"> +</span> icon from the + horizontal toolbar. +</p> +</li> +<li> +<p> +Clicking on an existing pad and selecting <em>Edit Pad</em>. The pad’s + settings can then be edited. +</p> +</li> +<li> +<p> +Clicking on an existing pad and selecting <em>Export Pad Settings</em>. + In this case, the geometrical properties of the selected pad will + become the default pad properties. +</p> +</li> +</ul></div> +<div class="paragraph"><p>In the first two cases, the following dialog window will be displayed:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_pad_properties_dialog.png" alt="images/Modedit_pad_properties_dialog.png"> +</div> +</div> +<div class="paragraph"><p>Care should be taken to define correctly the layers to which the pad +will belong. In particular, although copper layers are easy to +define, the management of non-copper layers (solder mask, solder +pads…) is equally important for circuit manufacture and +documentation.</p></div> +<div class="paragraph"><p>The Pad Type selector triggers an automatic selection of layers that +is generally sufficient.</p></div> +<div class="sect4"> +<h5 id="_rectangular_pads">Rectangular pads</h5> +<div class="paragraph"><p>For SMD footprints of the VQFP/PQFP type which have rectangular pads on +all four sides (both horizontal and vertical) it is recommended to +use just one shape (for example, a horizontal rectangle) and to +place it with different orientations (0 for horizontal and 90 +degrees for vertical). Global resizing of pads can then be done in a +single operation.</p></div> +</div> +<div class="sect4"> +<h5 id="_rotate_pads">Rotate pads</h5> +<div class="paragraph"><p>Rotations of -90 or -180 are only required for trapezoidal pads used +in microwave footprints.</p></div> +</div> +<div class="sect4"> +<h5 id="_non_plated_through_hole_pads">Non-plated through hole pads</h5> +<div class="paragraph"><p>Pads can be defined as Non-Plated Through Hole pads (NPTH pads).</p></div> +<div class="paragraph"><p>These pads must be defined on one or all copper layers (obviously, +the hole exists on all copper layers).</p></div> +<div class="paragraph"><p>This requirement allows you to define specific clearance parameters +( for instance clearance for a screw).</p></div> +<div class="paragraph"><p>When the pad hole size is the same as the pad size, for a round or +oval pad, this pad is NOT plotted on copper layers in GERBER files.</p></div> +<div class="paragraph"><p>These pads are used for mechanical purposes, therefore no pad name +or net name is allowed. A connection to a net is not possible.</p></div> +</div> +<div class="sect4"> +<h5 id="_pads_not_on_copper_layers">Pads not on copper layers</h5> +<div class="paragraph"><p>These are unusual pads. This option can be used to create fiducials +or masks on technical layers.</p></div> +</div> +<div class="sect4"> +<h5 id="_offset_parameter">Offset parameter</h5> +<div class="paragraph"><p>Pad 3 has an offset Y = 15 mils:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_pad_offset_example.png" alt="images/Modedit_pad_offset_example.png"> +</div> +</div> +</div> +<div class="sect4"> +<h5 id="_delta_parameter_trapezoidal_pads">Delta Parameter (trapezoidal pads)</h5> +<div class="paragraph"><p>Pad 1 has its parameter Delta X = 10 mils</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_pad_delta_example.png" alt="images/Modedit_pad_delta_example.png"> +</div> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_setting_clearance_for_solder_mask_and_solder_paste_mask_layers">13.8.3. Setting clearance for solder mask and solder paste mask layers</h4> +<div class="paragraph"><p>Setting a clearance can be made at 3 levels:</p></div> +<div class="ulist"><ul> +<li> +<p> +Global level. +</p> +</li> +<li> +<p> +Footprint level. +</p> +</li> +<li> +<p> +Pad level. +</p> +</li> +</ul></div> +<div class="paragraph"><p>Pcbnew uses the following to calculate clearances:</p></div> +<div class="ulist"><ul> +<li> +<p> +Pad settings. If null, +</p> +</li> +<li> +<p> +Footprint settings. If null, +</p> +</li> +<li> +<p> +Global settings. +</p> +</li> +</ul></div> +<div class="sect4"> +<h5 id="_remarks">Remarks</h5> +<div class="paragraph"><p>The solder mask pad shape is usually bigger than the pad itself. So the +clearance value is positive. The solder paste mask pad shape is usually +smaller than the pad itself. So the clearance value is negative.</p></div> +</div> +<div class="sect4"> +<h5 id="_solder_paste_mask_parameters">Solder paste mask parameters</h5> +<div class="paragraph"><p>For solder paste mask there are two parameters:</p></div> +<div class="ulist"><ul> +<li> +<p> +A fixed value. +</p> +</li> +<li> +<p> +A percentage of the pad size. +</p> +</li> +</ul></div> +<div class="paragraph"><p>The real value is the sum of these two values.</p></div> +<div class="paragraph"><p>Footprint level settings:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_footprint_level_pad_settings.png" alt="images/Modedit_footprint_level_pad_settings.png"> +</div> +</div> +<div class="paragraph"><p>Pad level settings:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_pad_level_pad_settings.png" alt="images/Modedit_pad_level_pad_settings.png"> +</div> +</div> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_fields_properties">13.9. Fields Properties</h3> +<div class="paragraph"><p>There are at least two fields: reference and value.</p></div> +<div class="paragraph"><p>Their parameters (attribute, size, width) must be updated. You can +access the dialog box from the pop-up menu, by double clicking on +the field, or by the footprint properties dialog box:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_footprint_text_properties.png" alt="images/Modedit_footprint_text_properties.png"> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_automatic_placement_of_a_footprint">13.10. Automatic placement of a footprint</h3> +<div class="paragraph"><p>If the user wishes to exploit the full capabilities of the +auto-placement functions, it is necessary to define the allowed +orientations of the footprint (Footprint Properties dialog).</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_module_autoplace_settings.png" alt="images/Modedit_module_autoplace_settings.png"> +</div> +</div> +<div class="paragraph"><p>Usually, rotation of 180 degrees is permitted for resistors, +non-polarized capacitors and other symmetrical elements.</p></div> +<div class="paragraph"><p>Some footprints (small transistors, for example) are often permitted to +rotate by +/- 90 or 180 degrees. By default, a new footprint will have +its rotation permissions set to zero. This can be adjusted according +to the following rule:</p></div> +<div class="paragraph"><p>A value of 0 makes rotation impossible, 10 allows it completely, and +any intermediate value represents a limited rotation. For example, a +resistor might have a permission of 10 to rotate 180 degrees +(unrestrained) and a permission of 5 for a +/- 90 degree rotation +(allowed, but discouraged).</p></div> +</div> +<div class="sect2"> +<h3 id="_attributes">13.11. Attributes</h3> +<div class="paragraph"><p>The attributes window is the following:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_module_attributes.png" alt="images/Modedit_module_attributes.png"> +</div> +</div> +<div class="ulist"><ul> +<li> +<p> +Normal is the standard attribute. +</p> +</li> +<li> +<p> +Normal+Insert indicates that the footprint must appear in the automatic + insertion file (for automatic insertion machines). This attribute is + most useful for surface mount components (SMDs). +</p> +</li> +<li> +<p> +Virtual indicates that a component is directly formed by the circuit + board. Examples would be edge connectors or inductors created by a + particular track shape (as sometimes seen in microwave footprints). +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_documenting_footprints_in_a_library">13.12. Documenting footprints in a library</h3> +<div class="paragraph"><p>It is strongly recommended to document newly created footprints, in +order to facilitate their rapid and accurate retrieval. Who is able +to recall the multiple pin-out variants of a TO92 footprint?</p></div> +<div class="paragraph"><p>The Footprint Properties dialog offers a simple and yet powerful means +for documentation generation.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_module_properties_documentation_fields.png" alt="images/Modedit_module_properties_documentation_fields.png"> +</div> +</div> +<div class="paragraph"><p>This menu allows:</p></div> +<div class="ulist"><ul> +<li> +<p> +The entry of a comment line (description). +</p> +</li> +<li> +<p> +Multiple keywords. +</p> +</li> +</ul></div> +<div class="paragraph"><p>The comment line is displayed with the component list in CvPcb and +in the footprint selection menus in Pcbnew. The keywords can be used to +restrict searches to those parts possessing the given keywords.</p></div> +<div class="paragraph"><p>Thus, while using the load footprint command (icon in the right-hand +toolbar in Pcbnew), it is possible to type the text <span class="monospaced">=TO220</span> into +the dialog box to have Pcbnew display a list of the footprints +possessing the keyword <span class="monospaced">TO220</span></p></div> +</div> +<div class="sect2"> +<h3 id="_3_dimensional_visualisation">13.13. 3-dimensional visualisation</h3> +<div class="paragraph"><p>A footprint may have been associated with a file containing a +three-dimensional representation of itself. In order to associate +such a file with a footprint, select the 3D Settings tab. The options +panel is the following:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_module_3d_options.png" alt="images/Modedit_module_3d_options.png"> +</div> +</div> +<div class="paragraph"><p>The data information should be provided:</p></div> +<div class="ulist"><ul> +<li> +<p> +The file containing the 3D representation (created by the 3D modeler + Wings3D, in vrml format, via the export to vrml command). +</p> +</li> +<li> +<p> +The default path is kicad/modules/package3d. In the example, the file + name is discret/to_220horiz.wrl, using the default path) +</p> +</li> +<li> +<p> +The x, y and z scales. +</p> +</li> +<li> +<p> +The offset with respect to the anchor point of the footprint (usually + zero). +</p> +</li> +<li> +<p> +The initial rotation in degrees about each axis (usually zero). +</p> +</li> +</ul></div> +<div class="paragraph"><p>Setting scale allows:</p></div> +<div class="ulist"><ul> +<li> +<p> +To use the same 3D file for footprints which have similar shapes but different sizes (resistors, capacitors, SMD components…) +</p> +</li> +<li> +<p> +For small (or very large) packages, a better use of the Wings3D grid + is to scale <strong>0.1 inch in Pcbnew = 1 grid unit</strong> in Wings3D. +</p> +</li> +</ul></div> +<div class="paragraph"><p>If such a file has been specified, it is possible to view the +component in 3D.</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Modedit_footprint_3d_preview.png" alt="images/Modedit_footprint_3d_preview.png"> +</div> +</div> +<div class="paragraph"><p>The 3D model will automatically appear in the 3D representation of the printed circuit board.</p></div> +</div> +<div class="sect2"> +<h3 id="_saving_a_footprint_into_the_active_library">13.14. Saving a footprint into the active library</h3> +<div class="paragraph"><p>The save command (modification of the file of the active library) is activated by the <span class="image"> +<img src="images/icons/save_library.png" alt="images/icons/save_library.png"> +</span> button.</p></div> +<div class="paragraph"><p>If a footprint of the same name exists (an older version), it will be overwritten. Because it is important to be able to have confidence in the library footprints, it is worth double-checking the footprint for errors before saving.</p></div> +<div class="paragraph"><p>Before saving, it is also recommended to change the reference or value of the footprint to be equal to the library name of the footprint.</p></div> +</div> +<div class="sect2"> +<h3 id="_saving_a_footprint_to_the_board">13.15. Saving a footprint to the board</h3> +<div class="paragraph"><p>If the edited footprint comes from the current board, the button +<span class="image"> +<img src="images/icons/update_module_board.png" alt="images/icons/update_module_board.png"> +</span> will update this footprint on +the board.</p></div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_advanced_pcb_editing_tools">14. Advanced PCB editing tools</h2> +<div class="sectionbody"> +<div class="paragraph"><p>There are some more advanced editing tools available in Pcbnew and +Footprint Editor, which can help you to efficiently lay out +components on the canvas.</p></div> +<div class="sect2"> +<h3 id="_duplicating_items">14.1. Duplicating items</h3> +<div class="paragraph"><p>Duplication is a method to clone an item and pick it up in the same +action. It is broadly similar to copy-and-pasting, but it allows you to +"sprinkle" components over the PCB and it allows you to manually lay out +components using the "Move Exact" tool (see below) more easily.</p></div> +<div class="paragraph"><p>Duplication is done by using the hotkey (which defaults to Ctrl-D) or +the duplicate item option in the context menu. In the legacy renderer, +these appear as below, depending on the item type:</p></div> +<div class="paragraph"><p><span class="image"> +<img src="images/icons/duplicate_pad.png" alt="images/icons/duplicate_pad.png"> +</span> +<span class="image"> +<img src="images/icons/duplicate_line.png" alt="images/icons/duplicate_line.png"> +</span> +<span class="image"> +<img src="images/icons/duplicate_text.png" alt="images/icons/duplicate_text.png"> +</span> +<span class="image"> +<img src="images/icons/duplicate_module.png" alt="images/icons/duplicate_module.png"> +</span> +<span class="image"> +<img src="images/icons/duplicate_target.png" alt="images/icons/duplicate_target.png"> +</span> +<span class="image"> +<img src="images/icons/duplicate_zone.png" alt="images/icons/duplicate_zone.png"> +</span></p></div> +</div> +<div class="sect2"> +<h3 id="_moving_items_exactly">14.2. Moving items exactly</h3> +<div class="paragraph"><p>The "Move Exact" tool allows you to move an item (or group of items) by a +certain amount, which can be entered in Cartesian or polar formats and which +can be entered in any supported units. This is useful when it would +otherwise be cumbersome to switch to a different grid, or when a feature +is not spaced according to any existing grids.</p></div> +<div class="paragraph"><p>To use this tool, select the items you wish to move and then use either the hotkey +(defaults to Ctrl-M) or the context menu items to invoke the dialog. You +can also invoke the dialog with the hotkey when moving or duplicating +items, which can make it easy to repeatedly apply an offset to multiple +components.</p></div> +<div class="paragraph"><p>Move exact with Cartesian move vector entry</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_move_exact_cartesian.png" alt="images/Pcbnew_move_exact_cartesian.png"> +</div> +</div> +<div class="paragraph"><p>Move exact with polar move vector entry</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_move_exact_polar.png" alt="images/Pcbnew_move_exact_polar.png"> +</div> +</div> +<div class="paragraph"><p>The checkbox allows you to switch between Cartesian and polar +co-ordinate systems. Whatever is currently in the form will be converted +automatically to the other system.</p></div> +<div class="paragraph"><p>Then you enter the desired move vector. You can use the units indicated +by the labels ("mm" in the images above) or you can specify the units +yourself (e.g. "1 in" for an inch, or "2 rad" for 2 radians).</p></div> +<div class="paragraph"><p>Pressing OK will apply the translation to the selection, and cancel will +close the dialog and the items will not be moved. If OK is pressed, the +move vector will be saved and pre-filled next time the dialog is opened, +which allows repeated application of the same vector to multiple +objects.</p></div> +</div> +<div class="sect2"> +<h3 id="_array_tools">14.3. Array tools</h3> +<div class="paragraph"><p>Pcbnew and the Footprint Editor both have assistants for creating arrays of +features and components, which can be used to easily and accurately lay +out repetitive elements on PCBs and in footprints.</p></div> +<div class="sect3"> +<h4 id="_activating_the_array_tool">14.3.1. Activating the array tool</h4> +<div class="paragraph"><p>The array tool acts on the component under the cursor, or, in GAL mode, +on a selection. It can be accessed either via the context menu for the +selection or by a keyboard shortcut (defaults to Ctrl-N). In legacy +mode, the context menu icons indicate an array of the selected type:</p></div> +<div class="paragraph"><p><span class="image"> +<img src="images/icons/array_pad.png" alt="images/icons/array_pad.png"> +</span> +<span class="image"> +<img src="images/icons/array_line.png" alt="images/icons/array_line.png"> +</span> +<span class="image"> +<img src="images/icons/array_text.png" alt="images/icons/array_text.png"> +</span> +<span class="image"> +<img src="images/icons/array_module.png" alt="images/icons/array_module.png"> +</span> +<span class="image"> +<img src="images/icons/array_target.png" alt="images/icons/array_target.png"> +</span> +<span class="image"> +<img src="images/icons/array_zone.png" alt="images/icons/array_zone.png"> +</span></p></div> +<div class="paragraph"><p>The array tool is presented as a dialog window, with a pane for the +types of arrays. There are two types of arrays supported so far: grid, and +circular.</p></div> +<div class="paragraph"><p>Each type of array can be fully specified on the respective panes. +Geometric options (how the grid is laid out) go on the left; numbering +options (including how the numbers progress across the grid) on the +right.</p></div> +</div> +<div class="sect3"> +<h4 id="_grid_arrays">14.3.2. Grid arrays</h4> +<div class="paragraph"><p>Grid arrays are arrays that lay components out according to a +2-dimensional square grid. This kind of array can also produce a linear +array by only laying out a single row or column.</p></div> +<div class="paragraph"><p>The settings dialog for grid arrays look like this:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_array_dialog_grid.png" alt="images/Pcbnew_array_dialog_grid.png"> +</div> +</div> +<div class="sect4"> +<h5 id="_geometric_options">Geometric options</h5> +<div class="paragraph"><p>The geometric options are as follow:</p></div> +<div class="ulist"><ul> +<li> +<p> +<strong>Horrizontal count</strong>: the number of "columns" in the grid. +</p> +</li> +<li> +<p> +<strong>Vertical count</strong>: the number of "rows" in the grid. +</p> +</li> +<li> +<p> +<strong>Horizontal spacing</strong>: the horizontal distance from item to the item in the same row + and next column. If this is negative, the grid progresses from right to left. +</p> +</li> +<li> +<p> +<strong>Vertical spacing</strong>: the vertical distance from one item to the item in the same + column and the next row. If this is negative, the grid progress bottom to + top. +</p> +</li> +<li> +<p> +<strong>Horizontal offset</strong>: start each row this distance to the right of the previous + one +</p> +</li> +<li> +<p> +<strong>Vertical offset</strong>: start each column this distance below the previous one +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_array_grid_offsets.png" alt="images/Pcbnew_array_grid_offsets.png"> +</div> +<div class="title">Figure 1. 3x3 grid with x and y offsets</div> +</div> +<div class="ulist"><ul> +<li> +<p> +<strong>Stagger</strong>: add an offset to every set of "n" rows/columns, with each row + progressing by 1/n’th of the relevant spacing dimension: +</p> +</li> +</ul></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_array_grid_stagger_rows_2.png" alt="images/Pcbnew_array_grid_stagger_rows_2.png"> +</div> +<div class="title">Figure 2. 3x3 grid with a row stagger of 2</div> +</div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_array_grid_stagger_cols_3.png" alt="images/Pcbnew_array_grid_stagger_cols_3.png"> +</div> +<div class="title">Figure 3. 4x3 grid with a column stagger of 3</div> +</div> +</div> +<div class="sect4"> +<h5 id="_numbering_options">Numbering options</h5> +<div class="ulist"><ul> +<li> +<p> +<strong>Numbering Direction</strong>: Determines whether numbers proceed along rows and then + moves to the next row, or down columns and then to the next column. Note that + the direction on numbering is defined by the sign of the spacing: a negative + spacing will result in right-to-left or bottom-to-top numbering. +</p> +</li> +<li> +<p> +<strong>Reverse numbering on alternate rows or columns</strong>: If selected, the numbering order + (left-to-right or right-to-left, for example) on alternate rows or columns. + Whether rows or columns alternate depends on the numbering direction. This + option is useful for packages like DIPs where the numbering proceeds up one + side and down the other. +</p> +</li> +<li> +<p> +<strong>Restart numbering</strong>: if laying out using items that already have numbers, + reset to the start, otherwise continue if possible from this item’s number +</p> +</li> +<li> +<p> +<strong>Numbering Scheme</strong> +</p> +<div class="ulist"><ul> +<li> +<p> +<strong>Continuous</strong>: the numbering just continues across a row/column break - if + the last item in the first row is numbered "7", the first item in the second + row will be "8". +</p> +</li> +<li> +<p> +<strong>Coordinate</strong>: the numbering uses a two-axis scheme where the + number is made up of the row and column index. Which one comes first + (row or column) is determined by the numbering direction. +</p> +</li> +</ul></div> +</li> +<li> +<p> +<strong>Axis numberings</strong>: what "alphabet" to use to number the axes. Choices are +</p> +<div class="ulist"><ul> +<li> +<p> +<strong>Numerals</strong> for normal integer indices +</p> +</li> +<li> +<p> +<strong>Hexadecimal</strong> for base-16 indexing +</p> +</li> +<li> +<p> +<strong>Alphabetic, minus IOSQXZ</strong>, a common scheme for electronic components, + recommended by ASME Y14.35M-1997 sec. 5.2 (previously MIL-STD-100 sec. 406.5) + to avoid confusion with numerals. +</p> +</li> +<li> +<p> +<strong>Full alphabet</strong> from A-Z. +</p> +</li> +</ul></div> +</li> +</ul></div> +</div> +</div> +<div class="sect3"> +<h4 id="_circular_arrays">14.3.3. Circular arrays</h4> +<div class="paragraph"><p>Circular arrays lay out items around a circle or a circular arc. The circle is +defined by the location of the selection (or the centre of a selected group) +and a centre point that is specified. Below is the circular array configuration +dialog:</p></div> +<div class="imageblock"> +<div class="content"> +<img src="images/Pcbnew_array_dialog_circular.png" alt="images/Pcbnew_array_dialog_circular.png"> +</div> +</div> +<div class="sect4"> +<h5 id="_geometric_options_2">Geometric options</h5> +<div class="ulist"><ul> +<li> +<p> +<strong>Horizontal center</strong>, <strong>Vertical center</strong>: The centre of the circle. The radius + field below will update automatically when you adjust these. +</p> +</li> +<li> +<p> +<strong>Angle</strong>: The angular difference between two adjacent items in the + array. Set this to zero to evenly divide the circle with "count" elements. +</p> +</li> +<li> +<p> +<strong>Count</strong>: Number of items in the array (including the original item) +</p> +</li> +<li> +<p> +<strong>Rotate</strong>: Rotate each item around its own location. Otherwise, the + item will be translated but not rotated (for example, a square pad + will always remain upright if this option is not set). +</p> +</li> +</ul></div> +</div> +<div class="sect4"> +<h5 id="_numbering_options_2">Numbering options</h5> +<div class="paragraph"><p>Circular arrays have only one dimension and a simpler geometry than +grids. The meanings of the available options are the same as for grids. +Items are numbered clockwise - for an anticlockwise array, specify a +negative angle.</p></div> +</div> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_kicad_scripting_reference">15. KiCad Scripting Reference</h2> +<div class="sectionbody"> +<div class="paragraph"><p>Scripting allows you to automate tasks within KiCad using the <a href="https://www.python.org/">Python</a> language.</p></div> +<div class="paragraph"><p>Also see the doxygen documentation on <a href="http://ci.kicad-pcb.org/job/kicad-doxygen/ws/build/pcbnew/doxygen-python/html/index.html">Python Scripting Reference</a>.</p></div> +<div class="paragraph"><p>You can see python module help by typing <span class="monospaced">pydoc pcbnew</span> on your terminal.</p></div> +<div class="paragraph"><p>Using scripting you can create:</p></div> +<div class="ulist"><ul> +<li> +<p> +<strong>Plugins</strong>: this type of script is loaded when KiCad starts. Examples: +</p> +<div class="ulist"><ul> +<li> +<p> +<strong>Footprint Wizards</strong>: To help you build footprints easily filling in parameters. See the dedicated section <a href="#Footprint_Wizards">Footprint Wizards</a> below. +</p> +</li> +<li> +<p> +<strong>File I/O</strong> <em>(planned)</em>: To let you write plugins to export/import other filetypes +</p> +</li> +<li> +<p> +<strong>Actions</strong> <em>(planned)</em>: Associate events to scripting actions or register new menus or toolbar icons. +</p> +</li> +</ul></div> +</li> +<li> +<p> +<strong>Command Line Scripts</strong>: scripts that can be used from the command line, load boards or libraries, modify them, and render outputs or new boards. +</p> +</li> +</ul></div> +<div class="paragraph"><p>It shall be noted that the only KiCad applicaiton that supports +scripting is Pcbnew. It is also planned for Eeschema in the future.</p></div> +<div class="sect2"> +<h3 id="_kicad_objects">15.1. KiCad Objects</h3> +<div class="paragraph"><p>The scripting API reflects the internal object structure inside +KiCad/pcbnew. BOARD is the main object, that has a set of properties and +a set of MODULEs, and TRACKs/VIAs, TEXTE_PCB, DIMENSION, DRAWSEGMENT. +Then MODULEs have D_PADs, EDGEs, etc.</p></div> +<div class="ulist"><ul> +<li> +<p> +See the BOARD section below. +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_basic_api_reference">15.2. Basic API Reference</h3> +<div class="paragraph"><p>All the pcbnew API is provided from the "pcbnew" module in Python. +GetBoard() method will return the current pcb open at editor, useful for +commands written from the integrated scripting shell inside pcbnew or +action plugins.</p></div> +</div> +<div class="sect2"> +<h3 id="_loading_and_saving_a_board">15.3. Loading and Saving a Board</h3> +<div class="ulist"><ul> +<li> +<p> +<strong>LoadBoard(filename):</strong> + loads a board from file returning a BOARD object, using the file format that matches the filename extension. +</p> +</li> +<li> +<p> +<strong>SaveBoard(filename,board):</strong> + saves a BOARD object to file, using the file format that matches the filename extension. +</p> +</li> +<li> +<p> +<strong>board.Save(filename):</strong> + same as above, but it’s a method of BOARD object. +</p> +</li> +</ul></div> +<div class="listingblock"> +<div class="title">Example that loads a board, hides all values, shows all references</div> +<div class="content"><!-- Generator: GNU source-highlight 3.1.7 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre><tt><span style="font-style: italic"><span style="color: #9A1900">#!/usr/bin/env python2.7</span></span> +<span style="font-weight: bold"><span style="color: #000080">import</span></span> sys +<span style="font-weight: bold"><span style="color: #000080">from</span></span> pcbnew <span style="font-weight: bold"><span style="color: #000080">import</span></span> <span style="color: #990000">*</span> + +filename<span style="color: #990000">=</span>sys<span style="color: #990000">.</span>argv<span style="color: #990000">[</span><span style="color: #993399">1</span><span style="color: #990000">]</span> + +pcb <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">LoadBoard</span></span><span style="color: #990000">(</span>filename<span style="color: #990000">)</span> +<span style="font-weight: bold"><span style="color: #0000FF">for</span></span> module <span style="font-weight: bold"><span style="color: #0000FF">in</span></span> pcb<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetModules</span></span><span style="color: #990000">():</span> + <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">"* Module: %s"</span><span style="color: #990000">%</span>module<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetReference</span></span><span style="color: #990000">()</span> + module<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Value</span></span><span style="color: #990000">().</span><span style="font-weight: bold"><span style="color: #000000">SetVisible</span></span><span style="color: #990000">(</span>False<span style="color: #990000">)</span> <span style="font-style: italic"><span style="color: #9A1900"># set Value as Hidden</span></span> + module<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Reference</span></span><span style="color: #990000">().</span><span style="font-weight: bold"><span style="color: #000000">SetVisible</span></span><span style="color: #990000">(</span>True<span style="color: #990000">)</span> <span style="font-style: italic"><span style="color: #9A1900"># set Reference as Visible</span></span> + +pcb<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Save</span></span><span style="color: #990000">(</span><span style="color: #FF0000">"mod_"</span><span style="color: #990000">+</span>filename<span style="color: #990000">)</span></tt></pre></div></div> +</div> +<div class="sect2"> +<h3 id="_listing_and_loading_libraries">15.4. Listing and Loading Libraries</h3> +<div class="listingblock"> +<div class="title">Enumerate library, enumerate modules, enumerate pads</div> +<div class="content"><!-- Generator: GNU source-highlight 3.1.7 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre><tt><span style="font-style: italic"><span style="color: #9A1900">#!/usr/bin/python</span></span> + +<span style="font-weight: bold"><span style="color: #000080">from</span></span> pcbnew <span style="font-weight: bold"><span style="color: #000080">import</span></span> <span style="color: #990000">*</span> + +libpath <span style="color: #990000">=</span> <span style="color: #FF0000">"/usr/share/kicad/modules/Sockets.pretty"</span> +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">">> enumerate footprints, pads of"</span><span style="color: #990000">,</span>libpath + +<span style="font-style: italic"><span style="color: #9A1900"># Load the suitable plugin to read/write the .pretty library</span></span> +<span style="font-style: italic"><span style="color: #9A1900"># (containing the .kicad_mod footprint files)</span></span> +src_type <span style="color: #990000">=</span> IO_MGR<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GuessPluginTypeFromLibPath</span></span><span style="color: #990000">(</span> libpath <span style="color: #990000">);</span> +<span style="font-style: italic"><span style="color: #9A1900"># Rem: we can force the plugin type by using IO_MGR.PluginFind( IO_MGR.KICAD )</span></span> +plugin <span style="color: #990000">=</span> IO_MGR<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">PluginFind</span></span><span style="color: #990000">(</span> src_type <span style="color: #990000">)</span> + +<span style="font-style: italic"><span style="color: #9A1900"># Print plugin type name: (Expecting "KiCad" for a .pretty library)</span></span> +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span><span style="color: #990000">(</span> <span style="color: #FF0000">"Selected plugin type: %s"</span> <span style="color: #990000">%</span> plugin<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">PluginName</span></span><span style="color: #990000">()</span> <span style="color: #990000">)</span> + +list_of_footprints <span style="color: #990000">=</span> plugin<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">FootprintEnumerate</span></span><span style="color: #990000">(</span>libpath<span style="color: #990000">)</span> + +<span style="font-weight: bold"><span style="color: #0000FF">for</span></span> name <span style="font-weight: bold"><span style="color: #0000FF">in</span></span> list_of_footprints<span style="color: #990000">:</span> + fp <span style="color: #990000">=</span> plugin<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">FootprintLoad</span></span><span style="color: #990000">(</span>libpath<span style="color: #990000">,</span>name<span style="color: #990000">)</span> + <span style="font-style: italic"><span style="color: #9A1900"># print the short name of the footprint</span></span> + <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> name <span style="font-style: italic"><span style="color: #9A1900"># this is the name inside the loaded library</span></span> + <span style="font-style: italic"><span style="color: #9A1900"># followed by ref field, value field, and decription string:</span></span> + <span style="font-style: italic"><span style="color: #9A1900"># Remember ref and value texts are dummy texts, replaced by the schematic values</span></span> + <span style="font-style: italic"><span style="color: #9A1900"># when reading a netlist.</span></span> + <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">" ->"</span><span style="color: #990000">,</span> fp<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetReference</span></span><span style="color: #990000">(),</span> fp<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetValue</span></span><span style="color: #990000">(),</span> fp<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetDescription</span></span><span style="color: #990000">()</span> + + <span style="font-style: italic"><span style="color: #9A1900"># print pad info: GetPos0() is the pad position relative to the footrint position</span></span> + <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> pad <span style="font-weight: bold"><span style="color: #0000FF">in</span></span> fp<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Pads</span></span><span style="color: #990000">():</span> + <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">" pad [%s]"</span> <span style="color: #990000">%</span> pad<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetPadName</span></span><span style="color: #990000">(),</span> <span style="color: #FF0000">"at"</span><span style="color: #990000">,\</span> + <span style="color: #FF0000">"pos0"</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #000000">ToMM</span></span><span style="color: #990000">(</span>pad<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetPos0</span></span><span style="color: #990000">().</span>x<span style="color: #990000">),</span> <span style="font-weight: bold"><span style="color: #000000">ToMM</span></span><span style="color: #990000">(</span>pad<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetPos0</span></span><span style="color: #990000">().</span>y<span style="color: #990000">),</span><span style="color: #FF0000">"mm"</span><span style="color: #990000">,\</span> + <span style="color: #FF0000">"shape offset"</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #000000">ToMM</span></span><span style="color: #990000">(</span>pad<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetOffset</span></span><span style="color: #990000">().</span>x<span style="color: #990000">),</span> <span style="font-weight: bold"><span style="color: #000000">ToMM</span></span><span style="color: #990000">(</span>pad<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetOffset</span></span><span style="color: #990000">().</span>y<span style="color: #990000">),</span> <span style="color: #FF0000">"mm"</span> + <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">""</span></tt></pre></div></div> +</div> +<div class="sect2"> +<h3 id="_board">15.5. BOARD</h3> +<div class="paragraph"><p>Board is the basic object in KiCad pcbnew, it’s the document.</p></div> +<div class="paragraph"><p>BOARD contains a set of object lists that can be accessed using the following methods, they will return iterable lists that can be iterated using "for obj in list:"</p></div> +<div class="ulist"><ul> +<li> +<p> +<strong>board.GetModules():</strong> This method returns a list of MODULE objects, all the modules available in the board will be exposed here. +</p> +</li> +<li> +<p> +<strong>board.GetDrawings():</strong> Returns the list of BOARD_ITEMS that belong to the board drawings +</p> +</li> +<li> +<p> +<strong>board.GetTracks():</strong> This method returns a list of TRACKs and VIAs inside a BOARD +</p> +</li> +<li> +<p> +<strong>board.GetFullRatsnest():</strong> Returns the list of ratsnest (connections still not routed) +</p> +</li> +<li> +<p> +<strong>board.GetNetClasses():</strong> Returns the list of net classes +</p> +</li> +<li> +<p> +<strong>board.GetCurrentNetClassName():</strong> Returns the current net class +</p> +</li> +<li> +<p> +<strong>board.GetViasDimensionsList():</strong> Returns the list of Via dimensions available to the board. +</p> +</li> +<li> +<p> +<strong>board.GetTrackWidthList():</strong> Returns the list of Track Widths available to the board. +</p> +</li> +</ul></div> +<div class="listingblock"> +<div class="title">Board Inspection Example</div> +<div class="content"><!-- Generator: GNU source-highlight 3.1.7 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre><tt><span style="font-style: italic"><span style="color: #9A1900">#!/usr/bin/env python</span></span> +<span style="font-weight: bold"><span style="color: #000080">import</span></span> sys +<span style="font-weight: bold"><span style="color: #000080">from</span></span> pcbnew <span style="font-weight: bold"><span style="color: #000080">import</span></span> <span style="color: #990000">*</span> + +filename<span style="color: #990000">=</span>sys<span style="color: #990000">.</span>argv<span style="color: #990000">[</span><span style="color: #993399">1</span><span style="color: #990000">]</span> + +pcb <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">LoadBoard</span></span><span style="color: #990000">(</span>filename<span style="color: #990000">)</span> + +ToUnits <span style="color: #990000">=</span> ToMM +FromUnits <span style="color: #990000">=</span> FromMM +<span style="font-style: italic"><span style="color: #9A1900">#ToUnits=ToMils</span></span> +<span style="font-style: italic"><span style="color: #9A1900">#FromUnits=FromMils</span></span> + +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">"LISTING VIAS:"</span> + +<span style="font-weight: bold"><span style="color: #0000FF">for</span></span> item <span style="font-weight: bold"><span style="color: #0000FF">in</span></span> pcb<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetTracks</span></span><span style="color: #990000">():</span> + <span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="font-weight: bold"><span style="color: #000000">type</span></span><span style="color: #990000">(</span>item<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">is</span></span> VIA<span style="color: #990000">:</span> + + pos <span style="color: #990000">=</span> item<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetPosition</span></span><span style="color: #990000">()</span> + drill <span style="color: #990000">=</span> item<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetDrillValue</span></span><span style="color: #990000">()</span> + width <span style="color: #990000">=</span> item<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetWidth</span></span><span style="color: #990000">()</span> + <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">" * Via: %s - %f/%f "</span><span style="color: #990000">%(</span><span style="font-weight: bold"><span style="color: #000000">ToUnits</span></span><span style="color: #990000">(</span>pos<span style="color: #990000">),</span><span style="font-weight: bold"><span style="color: #000000">ToUnits</span></span><span style="color: #990000">(</span>drill<span style="color: #990000">),</span><span style="font-weight: bold"><span style="color: #000000">ToUnits</span></span><span style="color: #990000">(</span>width<span style="color: #990000">))</span> + + <span style="font-weight: bold"><span style="color: #0000FF">elif</span></span> <span style="font-weight: bold"><span style="color: #000000">type</span></span><span style="color: #990000">(</span>item<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">is</span></span> TRACK<span style="color: #990000">:</span> + + start <span style="color: #990000">=</span> item<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetStart</span></span><span style="color: #990000">()</span> + end <span style="color: #990000">=</span> item<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetEnd</span></span><span style="color: #990000">()</span> + width <span style="color: #990000">=</span> item<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetWidth</span></span><span style="color: #990000">()</span> + + <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">" * Track: %s to %s, width %f"</span> <span style="color: #990000">%</span> <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #000000">ToUnits</span></span><span style="color: #990000">(</span>start<span style="color: #990000">),</span><span style="font-weight: bold"><span style="color: #000000">ToUnits</span></span><span style="color: #990000">(</span>end<span style="color: #990000">),</span><span style="font-weight: bold"><span style="color: #000000">ToUnits</span></span><span style="color: #990000">(</span>width<span style="color: #990000">))</span> + + <span style="font-weight: bold"><span style="color: #0000FF">else</span></span><span style="color: #990000">:</span> + <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">"Unknown type %s"</span> <span style="color: #990000">%</span> <span style="font-weight: bold"><span style="color: #000000">type</span></span><span style="color: #990000">(</span>item<span style="color: #990000">)</span> + +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">""</span> +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">"LIST DRAWINGS:"</span> + +<span style="font-weight: bold"><span style="color: #0000FF">for</span></span> item <span style="font-weight: bold"><span style="color: #0000FF">in</span></span> pcb<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetDrawings</span></span><span style="color: #990000">():</span> + <span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="font-weight: bold"><span style="color: #000000">type</span></span><span style="color: #990000">(</span>item<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">is</span></span> TEXTE_PCB<span style="color: #990000">:</span> + <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">"* Text: '%s' at %s"</span><span style="color: #990000">%(</span>item<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetText</span></span><span style="color: #990000">(),</span> item<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetPosition</span></span><span style="color: #990000">())</span> + <span style="font-weight: bold"><span style="color: #0000FF">elif</span></span> <span style="font-weight: bold"><span style="color: #000000">type</span></span><span style="color: #990000">(</span>item<span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #0000FF">is</span></span> DRAWSEGMENT<span style="color: #990000">:</span> + <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">"* Drawing: %s"</span><span style="color: #990000">%</span>item<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetShapeStr</span></span><span style="color: #990000">()</span> <span style="font-style: italic"><span style="color: #9A1900"># dir(item)</span></span> + <span style="font-weight: bold"><span style="color: #0000FF">else</span></span><span style="color: #990000">:</span> + <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="font-weight: bold"><span style="color: #000000">type</span></span><span style="color: #990000">(</span>item<span style="color: #990000">)</span> + +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">""</span> +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">"LIST MODULES:"</span> + +<span style="font-weight: bold"><span style="color: #0000FF">for</span></span> module <span style="font-weight: bold"><span style="color: #0000FF">in</span></span> pcb<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetModules</span></span><span style="color: #990000">():</span> + <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">"* Module: %s at %s"</span><span style="color: #990000">%(</span>module<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetReference</span></span><span style="color: #990000">(),</span><span style="font-weight: bold"><span style="color: #000000">ToUnits</span></span><span style="color: #990000">(</span>module<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetPosition</span></span><span style="color: #990000">()))</span> + +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">""</span> +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">"Ratsnest cnt:"</span><span style="color: #990000">,</span><span style="font-weight: bold"><span style="color: #000000">len</span></span><span style="color: #990000">(</span>pcb<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetFullRatsnest</span></span><span style="color: #990000">())</span> +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">"track w cnt:"</span><span style="color: #990000">,</span><span style="font-weight: bold"><span style="color: #000000">len</span></span><span style="color: #990000">(</span>pcb<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetTrackWidthList</span></span><span style="color: #990000">())</span> +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">"via s cnt:"</span><span style="color: #990000">,</span><span style="font-weight: bold"><span style="color: #000000">len</span></span><span style="color: #990000">(</span>pcb<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetViasDimensionsList</span></span><span style="color: #990000">())</span> + +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">""</span> +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">"LIST ZONES:"</span><span style="color: #990000">,</span> pcb<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetAreaCount</span></span><span style="color: #990000">()</span> + +<span style="font-weight: bold"><span style="color: #0000FF">for</span></span> idx <span style="font-weight: bold"><span style="color: #0000FF">in</span></span> <span style="font-weight: bold"><span style="color: #000000">range</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">,</span> pcb<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetAreaCount</span></span><span style="color: #990000">()):</span> + zone<span style="color: #990000">=</span>pcb<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetArea</span></span><span style="color: #990000">(</span>idx<span style="color: #990000">)</span> + <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">"zone:"</span><span style="color: #990000">,</span> idx<span style="color: #990000">,</span> <span style="color: #FF0000">"priority:"</span><span style="color: #990000">,</span> zone<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetPriority</span></span><span style="color: #990000">(),</span> <span style="color: #FF0000">"netname"</span><span style="color: #990000">,</span> zone<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetNetname</span></span><span style="color: #990000">()</span> + +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">""</span> +<span style="font-weight: bold"><span style="color: #0000FF">print</span></span> <span style="color: #FF0000">"NetClasses:"</span><span style="color: #990000">,</span> pcb<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetNetClasses</span></span><span style="color: #990000">().</span><span style="font-weight: bold"><span style="color: #000000">GetCount</span></span><span style="color: #990000">(),</span></tt></pre></div></div> +</div> +<div class="sect2"> +<h3 id="_examples_2">15.6. Examples</h3> +<div class="sect3"> +<h4 id="_change_a_component_pin_8217_s_paste_mask_margin">15.6.1. Change a component pin’s paste mask margin</h4> +<div class="listingblock"> +<div class="title">We only want to change pins from 1 to 14, 15 is a thermal pad that must be kept as it is.</div> +<div class="content"><!-- Generator: GNU source-highlight 3.1.7 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre><tt><span style="font-style: italic"><span style="color: #9A1900">#!/usr/bin/env python2.7</span></span> +<span style="font-weight: bold"><span style="color: #000080">import</span></span> sys +<span style="font-weight: bold"><span style="color: #000080">from</span></span> pcbnew <span style="font-weight: bold"><span style="color: #000080">import</span></span> <span style="color: #990000">*</span> + +filename<span style="color: #990000">=</span>sys<span style="color: #990000">.</span>argv<span style="color: #990000">[</span><span style="color: #993399">1</span><span style="color: #990000">]</span> +pcb <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">LoadBoard</span></span><span style="color: #990000">(</span>filename<span style="color: #990000">)</span> + +<span style="font-style: italic"><span style="color: #9A1900"># Find module U304</span></span> +u304 <span style="color: #990000">=</span> pcb<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">FindModuleByReference</span></span><span style="color: #990000">(</span><span style="color: #FF0000">'U304'</span><span style="color: #990000">)</span> +pads <span style="color: #990000">=</span> u304<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Pads</span></span><span style="color: #990000">()</span> + +<span style="font-style: italic"><span style="color: #9A1900"># Iterate over pads, printing solder paste margin</span></span> +<span style="font-weight: bold"><span style="color: #0000FF">for</span></span> p <span style="font-weight: bold"><span style="color: #0000FF">in</span></span> pads<span style="color: #990000">:</span> + <span style="font-weight: bold"><span style="color: #0000FF">print</span></span> p<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetPadName</span></span><span style="color: #990000">(),</span> <span style="font-weight: bold"><span style="color: #000000">ToMM</span></span><span style="color: #990000">(</span>p<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetLocalSolderPasteMargin</span></span><span style="color: #990000">())</span> + id <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">int</span></span><span style="color: #990000">(</span>p<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetPadName</span></span><span style="color: #990000">())</span> + <span style="font-style: italic"><span style="color: #9A1900"># Set margin to 0 for all but pad (pin) 15</span></span> + <span style="font-weight: bold"><span style="color: #0000FF">if</span></span> id<span style="color: #990000"><</span><span style="color: #993399">15</span><span style="color: #990000">:</span> p<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">SetLocalSolderPasteMargin</span></span><span style="color: #990000">(</span><span style="color: #993399">0</span><span style="color: #990000">)</span> + +pcb<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Save</span></span><span style="color: #990000">(</span><span style="color: #FF0000">"mod_"</span><span style="color: #990000">+</span>filename<span style="color: #990000">)</span></tt></pre></div></div> +</div> +</div> +<div class="sect2"> +<h3 id="Footprint_Wizards">15.7. Footprint Wizards</h3> +<div class="paragraph"><p>The footprint wizards are a collection of python scripts that can be +accessed from the Footprint Editor. If you invoke the footprint +dialog you select a given wizard that allows you to see the footprint +rendered, and you have some parameters you can edit.</p></div> +<div class="paragraph"><p>If the plugins are not properly distributed to your system package, +you can find the latest versions in the KiCad source tree at +<a href="https://git.launchpad.net/kicad/tree/pcbnew/python/plugins">launchpad</a>.</p></div> +<div class="paragraph"><p>They should be located in for example <span class="monospaced">C:\Program +Files\KiCad\share\kicad\scripting\plugins</span>.</p></div> +<div class="paragraph"><p>On linux you can also keep your user plugins in +<span class="monospaced">$HOME/.kicad_plugins</span>.</p></div> +<div class="listingblock"> +<div class="title">Build footprints easily filling in parameters.</div> +<div class="content"><!-- Generator: GNU source-highlight 3.1.7 +by Lorenzo Bettini +http://www.lorenzobettini.it +http://www.gnu.org/software/src-highlite --> +<pre><tt><span style="font-weight: bold"><span style="color: #000080">from</span></span> __future__ <span style="font-weight: bold"><span style="color: #000080">import</span></span> division +<span style="font-weight: bold"><span style="color: #000080">import</span></span> pcbnew + +<span style="font-weight: bold"><span style="color: #000080">import</span></span> HelpfulFootprintWizardPlugin as HFPW + + +<span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="font-weight: bold"><span style="color: #000000">FPC_FootprintWizard</span></span><span style="color: #990000">(</span>HFPW<span style="color: #990000">.</span>HelpfulFootprintWizardPlugin<span style="color: #990000">):</span> + + <span style="font-weight: bold"><span style="color: #0000FF">def</span></span> <span style="font-weight: bold"><span style="color: #000000">GetName</span></span><span style="color: #990000">(</span>self<span style="color: #990000">):</span> + <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="color: #FF0000">"FPC (SMT connector)"</span> + + <span style="font-weight: bold"><span style="color: #0000FF">def</span></span> <span style="font-weight: bold"><span style="color: #000000">GetDescription</span></span><span style="color: #990000">(</span>self<span style="color: #990000">):</span> + <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="color: #FF0000">"FPC (SMT connector) Footprint Wizard"</span> + + <span style="font-weight: bold"><span style="color: #0000FF">def</span></span> <span style="font-weight: bold"><span style="color: #000000">GetValue</span></span><span style="color: #990000">(</span>self<span style="color: #990000">):</span> + pins <span style="color: #990000">=</span> self<span style="color: #990000">.</span>parameters<span style="color: #990000">[</span><span style="color: #FF0000">"Pads"</span><span style="color: #990000">][</span><span style="color: #FF0000">"*n"</span><span style="color: #990000">]</span> + <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> <span style="color: #FF0000">"FPC_%d"</span> <span style="color: #990000">%</span> pins + + <span style="font-weight: bold"><span style="color: #0000FF">def</span></span> <span style="font-weight: bold"><span style="color: #000000">GenerateParameterList</span></span><span style="color: #990000">(</span>self<span style="color: #990000">):</span> + self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">AddParam</span></span><span style="color: #990000">(</span> <span style="color: #FF0000">"Pads"</span><span style="color: #990000">,</span> <span style="color: #FF0000">"n"</span><span style="color: #990000">,</span> self<span style="color: #990000">.</span>uNatural<span style="color: #990000">,</span> <span style="color: #993399">40</span> <span style="color: #990000">)</span> + self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">AddParam</span></span><span style="color: #990000">(</span> <span style="color: #FF0000">"Pads"</span><span style="color: #990000">,</span> <span style="color: #FF0000">"pitch"</span><span style="color: #990000">,</span> self<span style="color: #990000">.</span>uMM<span style="color: #990000">,</span> <span style="color: #993399">0.5</span> <span style="color: #990000">)</span> + self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">AddParam</span></span><span style="color: #990000">(</span> <span style="color: #FF0000">"Pads"</span><span style="color: #990000">,</span> <span style="color: #FF0000">"width"</span><span style="color: #990000">,</span> self<span style="color: #990000">.</span>uMM<span style="color: #990000">,</span> <span style="color: #993399">0.25</span> <span style="color: #990000">)</span> + self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">AddParam</span></span><span style="color: #990000">(</span> <span style="color: #FF0000">"Pads"</span><span style="color: #990000">,</span> <span style="color: #FF0000">"height"</span><span style="color: #990000">,</span> self<span style="color: #990000">.</span>uMM<span style="color: #990000">,</span> <span style="color: #993399">1.6</span><span style="color: #990000">)</span> + self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">AddParam</span></span><span style="color: #990000">(</span> <span style="color: #FF0000">"Shield"</span><span style="color: #990000">,</span> <span style="color: #FF0000">"shield_to_pad"</span><span style="color: #990000">,</span> self<span style="color: #990000">.</span>uMM<span style="color: #990000">,</span> <span style="color: #993399">1.6</span> <span style="color: #990000">)</span> + self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">AddParam</span></span><span style="color: #990000">(</span> <span style="color: #FF0000">"Shield"</span><span style="color: #990000">,</span> <span style="color: #FF0000">"from_top"</span><span style="color: #990000">,</span> self<span style="color: #990000">.</span>uMM<span style="color: #990000">,</span> <span style="color: #993399">1.3</span> <span style="color: #990000">)</span> + self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">AddParam</span></span><span style="color: #990000">(</span> <span style="color: #FF0000">"Shield"</span><span style="color: #990000">,</span> <span style="color: #FF0000">"width"</span><span style="color: #990000">,</span> self<span style="color: #990000">.</span>uMM<span style="color: #990000">,</span> <span style="color: #993399">1.5</span> <span style="color: #990000">)</span> + self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">AddParam</span></span><span style="color: #990000">(</span> <span style="color: #FF0000">"Shield"</span><span style="color: #990000">,</span> <span style="color: #FF0000">"height"</span><span style="color: #990000">,</span> self<span style="color: #990000">.</span>uMM<span style="color: #990000">,</span> <span style="color: #993399">2</span> <span style="color: #990000">)</span> + + + <span style="font-style: italic"><span style="color: #9A1900"># build a rectangular pad</span></span> + <span style="font-weight: bold"><span style="color: #0000FF">def</span></span> <span style="font-weight: bold"><span style="color: #000000">smdRectPad</span></span><span style="color: #990000">(</span>self<span style="color: #990000">,</span>module<span style="color: #990000">,</span>size<span style="color: #990000">,</span>pos<span style="color: #990000">,</span>name<span style="color: #990000">):</span> + pad <span style="color: #990000">=</span> pcbnew<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">D_PAD</span></span><span style="color: #990000">(</span>module<span style="color: #990000">)</span> + pad<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">SetSize</span></span><span style="color: #990000">(</span>size<span style="color: #990000">)</span> + pad<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">SetShape</span></span><span style="color: #990000">(</span>pcbnew<span style="color: #990000">.</span>PAD_SHAPE_RECT<span style="color: #990000">)</span> + pad<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">SetAttribute</span></span><span style="color: #990000">(</span>pcbnew<span style="color: #990000">.</span>PAD_ATTRIB_SMD<span style="color: #990000">)</span> + pad<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">SetLayerSet</span></span><span style="color: #990000">(</span> pad<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">SMDMask</span></span><span style="color: #990000">()</span> <span style="color: #990000">)</span> + pad<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">SetPos0</span></span><span style="color: #990000">(</span>pos<span style="color: #990000">)</span> + pad<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">SetPosition</span></span><span style="color: #990000">(</span>pos<span style="color: #990000">)</span> + pad<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">SetPadName</span></span><span style="color: #990000">(</span>name<span style="color: #990000">)</span> + <span style="font-weight: bold"><span style="color: #0000FF">return</span></span> pad + + <span style="font-weight: bold"><span style="color: #0000FF">def</span></span> <span style="font-weight: bold"><span style="color: #000000">CheckParameters</span></span><span style="color: #990000">(</span>self<span style="color: #990000">):</span> + p <span style="color: #990000">=</span> self<span style="color: #990000">.</span>parameters + self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">CheckParamInt</span></span><span style="color: #990000">(</span> <span style="color: #FF0000">"Pads"</span><span style="color: #990000">,</span> <span style="color: #FF0000">"*n"</span> <span style="color: #990000">)</span> <span style="font-style: italic"><span style="color: #9A1900"># not internal units preceded by "*"</span></span> + + + <span style="font-weight: bold"><span style="color: #0000FF">def</span></span> <span style="font-weight: bold"><span style="color: #000000">BuildThisFootprint</span></span><span style="color: #990000">(</span>self<span style="color: #990000">):</span> + p <span style="color: #990000">=</span> self<span style="color: #990000">.</span>parameters + pad_count <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">int</span></span><span style="color: #990000">(</span>p<span style="color: #990000">[</span><span style="color: #FF0000">"Pads"</span><span style="color: #990000">][</span><span style="color: #FF0000">"*n"</span><span style="color: #990000">])</span> + pad_width <span style="color: #990000">=</span> p<span style="color: #990000">[</span><span style="color: #FF0000">"Pads"</span><span style="color: #990000">][</span><span style="color: #FF0000">"width"</span><span style="color: #990000">]</span> + pad_height <span style="color: #990000">=</span> p<span style="color: #990000">[</span><span style="color: #FF0000">"Pads"</span><span style="color: #990000">][</span><span style="color: #FF0000">"height"</span><span style="color: #990000">]</span> + pad_pitch <span style="color: #990000">=</span> p<span style="color: #990000">[</span><span style="color: #FF0000">"Pads"</span><span style="color: #990000">][</span><span style="color: #FF0000">"pitch"</span><span style="color: #990000">]</span> + shl_width <span style="color: #990000">=</span> p<span style="color: #990000">[</span><span style="color: #FF0000">"Shield"</span><span style="color: #990000">][</span><span style="color: #FF0000">"width"</span><span style="color: #990000">]</span> + shl_height <span style="color: #990000">=</span> p<span style="color: #990000">[</span><span style="color: #FF0000">"Shield"</span><span style="color: #990000">][</span><span style="color: #FF0000">"height"</span><span style="color: #990000">]</span> + shl_to_pad <span style="color: #990000">=</span> p<span style="color: #990000">[</span><span style="color: #FF0000">"Shield"</span><span style="color: #990000">][</span><span style="color: #FF0000">"shield_to_pad"</span><span style="color: #990000">]</span> + shl_from_top <span style="color: #990000">=</span> p<span style="color: #990000">[</span><span style="color: #FF0000">"Shield"</span><span style="color: #990000">][</span><span style="color: #FF0000">"from_top"</span><span style="color: #990000">]</span> + + offsetX <span style="color: #990000">=</span> pad_pitch <span style="color: #990000">*</span> <span style="color: #990000">(</span> pad_count<span style="color: #990000">-</span><span style="color: #993399">1</span> <span style="color: #990000">)</span> <span style="color: #990000">/</span> <span style="color: #993399">2</span> + size_pad <span style="color: #990000">=</span> pcbnew<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">wxSize</span></span><span style="color: #990000">(</span> pad_width<span style="color: #990000">,</span> pad_height <span style="color: #990000">)</span> + size_shld <span style="color: #990000">=</span> pcbnew<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">wxSize</span></span><span style="color: #990000">(</span>shl_width<span style="color: #990000">,</span> shl_height<span style="color: #990000">)</span> + size_text <span style="color: #990000">=</span> self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetTextSize</span></span><span style="color: #990000">()</span> <span style="font-style: italic"><span style="color: #9A1900"># IPC nominal</span></span> + + <span style="font-style: italic"><span style="color: #9A1900"># Gives a position and size to ref and value texts:</span></span> + textposy <span style="color: #990000">=</span> pad_height<span style="color: #990000">/</span><span style="color: #993399">2</span> <span style="color: #990000">+</span> pcbnew<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">FromMM</span></span><span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">)</span> <span style="color: #990000">+</span> self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetTextThickness</span></span><span style="color: #990000">()</span> + self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Reference</span></span><span style="color: #990000">(</span> <span style="color: #993399">0</span><span style="color: #990000">,</span> textposy<span style="color: #990000">,</span> size_text <span style="color: #990000">)</span> + + textposy <span style="color: #990000">=</span> textposy <span style="color: #990000">+</span> size_text <span style="color: #990000">+</span> self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetTextThickness</span></span><span style="color: #990000">()</span> + self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Value</span></span><span style="color: #990000">(</span> <span style="color: #993399">0</span><span style="color: #990000">,</span> textposy<span style="color: #990000">,</span> size_text <span style="color: #990000">)</span> + + <span style="font-style: italic"><span style="color: #9A1900"># create a pad array and add it to the module</span></span> + <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> n <span style="font-weight: bold"><span style="color: #0000FF">in</span></span> <span style="font-weight: bold"><span style="color: #000000">range</span></span> <span style="color: #990000">(</span> <span style="color: #993399">0</span><span style="color: #990000">,</span> pad_count <span style="color: #990000">):</span> + xpos <span style="color: #990000">=</span> pad_pitch<span style="color: #990000">*</span>n <span style="color: #990000">-</span> offsetX + pad <span style="color: #990000">=</span> self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">smdRectPad</span></span><span style="color: #990000">(</span>self<span style="color: #990000">.</span>module<span style="color: #990000">,</span>size_pad<span style="color: #990000">,</span> pcbnew<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">wxPoint</span></span><span style="color: #990000">(</span>xpos<span style="color: #990000">,</span><span style="color: #993399">0</span><span style="color: #990000">),</span><span style="font-weight: bold"><span style="color: #000000">str</span></span><span style="color: #990000">(</span>n<span style="color: #990000">+</span><span style="color: #993399">1</span><span style="color: #990000">))</span> + self<span style="color: #990000">.</span>module<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Add</span></span><span style="color: #990000">(</span>pad<span style="color: #990000">)</span> + + + <span style="font-style: italic"><span style="color: #9A1900"># Mechanical shield pads: left pad and right pad</span></span> + xpos <span style="color: #990000">=</span> <span style="color: #990000">-</span>shl_to_pad<span style="color: #990000">-</span>offsetX + pad_s0_pos <span style="color: #990000">=</span> pcbnew<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">wxPoint</span></span><span style="color: #990000">(</span>xpos<span style="color: #990000">,</span>shl_from_top<span style="color: #990000">)</span> + pad_s0 <span style="color: #990000">=</span> self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">smdRectPad</span></span><span style="color: #990000">(</span>self<span style="color: #990000">.</span>module<span style="color: #990000">,</span> size_shld<span style="color: #990000">,</span> pad_s0_pos<span style="color: #990000">,</span> <span style="color: #FF0000">"0"</span><span style="color: #990000">)</span> + xpos <span style="color: #990000">=</span> <span style="color: #990000">(</span>pad_count<span style="color: #990000">-</span><span style="color: #993399">1</span><span style="color: #990000">)</span> <span style="color: #990000">*</span> pad_pitch<span style="color: #990000">+</span>shl_to_pad <span style="color: #990000">-</span> offsetX + pad_s1_pos <span style="color: #990000">=</span> pcbnew<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">wxPoint</span></span><span style="color: #990000">(</span>xpos<span style="color: #990000">,</span>shl_from_top<span style="color: #990000">)</span> + pad_s1 <span style="color: #990000">=</span> self<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">smdRectPad</span></span><span style="color: #990000">(</span>self<span style="color: #990000">.</span>module<span style="color: #990000">,</span> size_shld<span style="color: #990000">,</span> pad_s1_pos<span style="color: #990000">,</span> <span style="color: #FF0000">"0"</span><span style="color: #990000">)</span> + + self<span style="color: #990000">.</span>module<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Add</span></span><span style="color: #990000">(</span>pad_s0<span style="color: #990000">)</span> + self<span style="color: #990000">.</span>module<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Add</span></span><span style="color: #990000">(</span>pad_s1<span style="color: #990000">)</span> + + <span style="font-style: italic"><span style="color: #9A1900"># add footprint outline</span></span> + linewidth <span style="color: #990000">=</span> self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">GetLineTickness</span></span><span style="color: #990000">()</span> + margin <span style="color: #990000">=</span> linewidth + + <span style="font-style: italic"><span style="color: #9A1900"># upper line</span></span> + posy <span style="color: #990000">=</span> <span style="color: #990000">-</span>pad_height<span style="color: #990000">/</span><span style="color: #993399">2</span> <span style="color: #990000">-</span> linewidth<span style="color: #990000">/</span><span style="color: #993399">2</span> <span style="color: #990000">-</span> margin + xstart <span style="color: #990000">=</span> <span style="color: #990000">-</span> pad_pitch<span style="color: #990000">*</span><span style="color: #993399">0.5</span><span style="color: #990000">-</span>offsetX + xend <span style="color: #990000">=</span> pad_pitch <span style="color: #990000">*</span> pad_count <span style="color: #990000">+</span> xstart<span style="color: #990000">;</span> + self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Line</span></span><span style="color: #990000">(</span> xstart<span style="color: #990000">,</span> posy<span style="color: #990000">,</span> xend<span style="color: #990000">,</span> posy <span style="color: #990000">)</span> + + <span style="font-style: italic"><span style="color: #9A1900"># lower line</span></span> + posy <span style="color: #990000">=</span> pad_height<span style="color: #990000">/</span><span style="color: #993399">2</span> <span style="color: #990000">+</span> linewidth<span style="color: #990000">/</span><span style="color: #993399">2</span> <span style="color: #990000">+</span> margin + self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Line</span></span><span style="color: #990000">(</span>xstart<span style="color: #990000">,</span> posy<span style="color: #990000">,</span> xend<span style="color: #990000">,</span> posy<span style="color: #990000">)</span> + + <span style="font-style: italic"><span style="color: #9A1900"># around left mechanical pad (the outline around right pad is mirrored/y axix)</span></span> + yend <span style="color: #990000">=</span> pad_s0_pos<span style="color: #990000">.</span>y <span style="color: #990000">+</span> shl_height<span style="color: #990000">/</span><span style="color: #993399">2</span> <span style="color: #990000">+</span> margin + self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Line</span></span><span style="color: #990000">(</span>xstart<span style="color: #990000">,</span> posy<span style="color: #990000">,</span> xstart<span style="color: #990000">,</span> yend<span style="color: #990000">)</span> + self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Line</span></span><span style="color: #990000">(-</span>xstart<span style="color: #990000">,</span> posy<span style="color: #990000">,</span> <span style="color: #990000">-</span>xstart<span style="color: #990000">,</span> yend<span style="color: #990000">)</span> + + posy <span style="color: #990000">=</span> yend + xend <span style="color: #990000">=</span> pad_s0_pos<span style="color: #990000">.</span>x <span style="color: #990000">-</span> <span style="color: #990000">(</span>shl_width<span style="color: #990000">/</span><span style="color: #993399">2</span> <span style="color: #990000">+</span> linewidth <span style="color: #990000">+</span> margin<span style="color: #990000">*</span><span style="color: #993399">2</span><span style="color: #990000">)</span> + self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Line</span></span><span style="color: #990000">(</span>xstart<span style="color: #990000">,</span> posy<span style="color: #990000">,</span> xend<span style="color: #990000">,</span> posy<span style="color: #990000">)</span> + + <span style="font-style: italic"><span style="color: #9A1900"># right pad side</span></span> + self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Line</span></span><span style="color: #990000">(-</span>xstart<span style="color: #990000">,</span> posy<span style="color: #990000">,</span> <span style="color: #990000">-</span>xend<span style="color: #990000">,</span> yend<span style="color: #990000">)</span> + + <span style="font-style: italic"><span style="color: #9A1900"># vertical segment at left of the pad</span></span> + xstart <span style="color: #990000">=</span> xend + yend <span style="color: #990000">=</span> posy <span style="color: #990000">-</span> <span style="color: #990000">(</span>shl_height <span style="color: #990000">+</span> linewidth <span style="color: #990000">+</span> margin<span style="color: #990000">*</span><span style="color: #993399">2</span><span style="color: #990000">)</span> + self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Line</span></span><span style="color: #990000">(</span>xstart<span style="color: #990000">,</span> posy<span style="color: #990000">,</span> xend<span style="color: #990000">,</span> yend<span style="color: #990000">)</span> + + <span style="font-style: italic"><span style="color: #9A1900"># right pad side</span></span> + self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Line</span></span><span style="color: #990000">(-</span>xstart<span style="color: #990000">,</span> posy<span style="color: #990000">,</span> <span style="color: #990000">-</span>xend<span style="color: #990000">,</span> yend<span style="color: #990000">)</span> + + <span style="font-style: italic"><span style="color: #9A1900"># horizontal segment above the pad</span></span> + xstart <span style="color: #990000">=</span> xend + xend <span style="color: #990000">=</span> <span style="color: #990000">-</span> pad_pitch<span style="color: #990000">*</span><span style="color: #993399">0.5</span><span style="color: #990000">-</span>offsetX + posy <span style="color: #990000">=</span> yend + self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Line</span></span><span style="color: #990000">(</span>xstart<span style="color: #990000">,</span> posy<span style="color: #990000">,</span> xend<span style="color: #990000">,</span> yend<span style="color: #990000">)</span> + + <span style="font-style: italic"><span style="color: #9A1900"># right pad side</span></span> + self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Line</span></span><span style="color: #990000">(-</span>xstart<span style="color: #990000">,</span> posy<span style="color: #990000">,-</span>xend<span style="color: #990000">,</span> yend<span style="color: #990000">)</span> + + <span style="font-style: italic"><span style="color: #9A1900"># vertical segment above the pad</span></span> + xstart <span style="color: #990000">=</span> xend + yend <span style="color: #990000">=</span> <span style="color: #990000">-</span>pad_height<span style="color: #990000">/</span><span style="color: #993399">2</span> <span style="color: #990000">-</span> linewidth<span style="color: #990000">/</span><span style="color: #993399">2</span> <span style="color: #990000">-</span> margin + self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Line</span></span><span style="color: #990000">(</span>xstart<span style="color: #990000">,</span> posy<span style="color: #990000">,</span> xend<span style="color: #990000">,</span> yend<span style="color: #990000">)</span> + + <span style="font-style: italic"><span style="color: #9A1900"># right pad side</span></span> + self<span style="color: #990000">.</span>draw<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Line</span></span><span style="color: #990000">(-</span>xstart<span style="color: #990000">,</span> posy<span style="color: #990000">,</span> <span style="color: #990000">-</span>xend<span style="color: #990000">,</span> yend<span style="color: #990000">)</span> + + +<span style="font-weight: bold"><span style="color: #000000">FPC_FootprintWizard</span></span><span style="color: #990000">().</span><span style="font-weight: bold"><span style="color: #000000">register</span></span><span style="color: #990000">()</span></tt></pre></div></div> +</div> +</div> +</div> +</div> +<div id="footnotes"><hr></div> +<div id="footer"> +<div id="footer-text"> +Last updated 2017-08-24 22:16:16 BST +</div> +</div> +</body> +</html> |