summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--heater/bom/ibom.html2388
-rw-r--r--heater/heater24
-rw-r--r--heater/heater.xml306
-rw-r--r--motor/bom/ibom.html2388
-rw-r--r--motor/motor25
-rw-r--r--motor/motor.kicad_pcb2
-rw-r--r--motor/motor.kicad_pcb-bak26
-rw-r--r--motor/motor.xml375
-rw-r--r--switches/bom/ibom.html2388
-rw-r--r--switches/switches54
-rw-r--r--switches/switches.kicad_pcb34
-rw-r--r--switches/switches.kicad_pcb-bak52
-rw-r--r--switches/switches.xml643
-rw-r--r--traffic/bom/ibom.html2388
-rw-r--r--traffic/traffic18
-rw-r--r--traffic/traffic.xml199
16 files changed, 11263 insertions, 47 deletions
diff --git a/heater/bom/ibom.html b/heater/bom/ibom.html
new file mode 100644
index 0000000..d0622da
--- /dev/null
+++ b/heater/bom/ibom.html
@@ -0,0 +1,2388 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Interactive BOM for KiCAD</title>
+ <style type="text/css">
+:root {
+ --pcb-edge-color: black;
+ --pad-color: #878787;
+ --pad-color-highlight: #D04040;
+ --pin1-outline-color: #ffb629;
+ --pin1-outline-color-highlight: #b4ff03;
+}
+
+html, body {
+ margin: 0px;
+ height: 100%;
+ font-family: Verdana, sans-serif;
+}
+
+.dark {
+ --pcb-edge-color: #eee;
+ --pad-color: #808080;
+ --pin1-outline-color: #ffa800;
+ --pin1-outline-color-highlight: #ccff00;
+ background-color: #252c30;
+ color: #eee;
+}
+
+button {
+ background-color: #eee;
+ border: 1px solid #888;
+ color: black;
+ height: 44px;
+ width: 44px;
+ text-align: center;
+ text-decoration: none;
+ display: inline-block;
+ font-size: 14px;
+ font-weight: bolder;
+}
+
+.dark button {
+ /* This will be inverted */
+ background-color: #c3b7b5;
+}
+
+button.depressed {
+ background-color: #0a0;
+ color: white;
+}
+
+.dark button.depressed {
+ /* This will be inverted */
+ background-color: #b3b;
+}
+
+button:focus {
+ outline: 0;
+}
+
+button#tb-btn {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' fill='none' stroke='%23000' stroke-width='.4' stroke-linejoin='round'/%3E%3Cpath d='M1.32 290.12h5.82M1.32 291.45h5.82' fill='none' stroke='%23000' stroke-width='.4'/%3E%3Cpath d='M4.37 292.5v4.23M.26 292.63H8.2' fill='none' stroke='%23000' stroke-width='.3'/%3E%3Ctext font-weight='700' font-size='3.17' font-family='sans-serif'%3E%3Ctspan x='1.35' y='295.73'%3EF%3C/tspan%3E%3Ctspan x='5.03' y='295.68'%3EB%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E%0A");
+ background-size: 32px 32px;
+ background-position: 5px 5px;
+ background-repeat: no-repeat;
+}
+
+button#lr-btn {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' fill='none' stroke='%23000' stroke-width='.4' stroke-linejoin='round'/%3E%3Cpath d='M1.06 290.12H3.7m-2.64 1.33H3.7m-2.64 1.32H3.7m-2.64 1.3H3.7m-2.64 1.33H3.7' fill='none' stroke='%23000' stroke-width='.4'/%3E%3Cpath d='M4.37 288.8v7.94m0-4.11h3.96' fill='none' stroke='%23000' stroke-width='.3'/%3E%3Ctext font-weight='700' font-size='3.17' font-family='sans-serif'%3E%3Ctspan x='5.11' y='291.96'%3EF%3C/tspan%3E%3Ctspan x='5.03' y='295.68'%3EB%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E%0A");
+ background-size: 32px 32px;
+ background-position: 5px 5px;
+ background-repeat: no-repeat;
+}
+
+button#bom-btn {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)' fill='none' stroke='%23000' stroke-width='.4'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' stroke-linejoin='round'/%3E%3Cpath d='M1.59 290.12h5.29M1.59 291.45h5.33M1.59 292.75h5.33M1.59 294.09h5.33M1.59 295.41h5.33'/%3E%3C/g%3E%3C/svg%3E");
+ background-size: 32px 32px;
+ background-position: 5px 5px;
+ background-repeat: no-repeat;
+}
+
+button#copy {
+ background-image: url("data:image/svg+xml,%3Csvg height='48' viewBox='0 0 48 48' width='48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h48v48h-48z' fill='none'/%3E%3Cpath d='M32 2h-24c-2.21 0-4 1.79-4 4v28h4v-28h24v-4zm6 8h-22c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h22c2.21 0 4-1.79 4-4v-28c0-2.21-1.79-4-4-4zm0 32h-22v-28h22v28z'/%3E%3C/svg%3E");
+ background-position: 6px 6px;
+ background-repeat: no-repeat;
+ background-size: 26px 26px;
+ border-radius: 6px;
+ height: 40px;
+ width: 40px;
+ margin: 10px 5px;
+}
+
+button#copy:active {
+ box-shadow: inset 0px 0px 5px #6c6c6c;
+}
+
+textarea.clipboard-temp {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 2em;
+ height: 2em;
+ padding: 0;
+ border: None;
+ outline: None;
+ box-shadow: None;
+ background: transparent;
+}
+
+.left-most-button {
+ border-right: 0;
+ border-top-left-radius: 6px;
+ border-bottom-left-radius: 6px;
+}
+
+.middle-button {
+ border-right: 0;
+}
+
+.right-most-button {
+ border-top-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+}
+
+.button-container {
+ font-size: 0;
+}
+
+.dark .button-container {
+ filter: invert(1);
+}
+
+@media print {
+ .hideonprint {
+ display: none;
+ }
+}
+
+canvas {
+ cursor: crosshair;
+}
+
+canvas:active {
+ cursor: grabbing;
+}
+
+.fileinfo {
+ width: 100%;
+ max-width: 1000px;
+ border: none;
+ padding: 5px;
+}
+
+.fileinfo .title {
+ font-size: 20pt;
+ font-weight: bold;
+}
+
+.fileinfo td {
+ overflow: hidden;
+ white-space: nowrap;
+ max-width: 1px;
+ width: 50%;
+ text-overflow: ellipsis;
+}
+
+.bom {
+ border-collapse: collapse;
+ font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace;
+ font-size: 10pt;
+ table-layout: fixed;
+ width: 100%;
+ margin-top: 1px;
+}
+
+.bom th, .bom td {
+ border: 1px solid black;
+ padding: 5px;
+ word-wrap: break-word;
+ text-align: center;
+ position: relative;
+}
+
+.dark .bom th, .dark .bom td {
+ border: 1px solid #777;
+}
+
+.bom th {
+ background-color: #CCCCCC;
+ background-clip: padding-box;
+}
+
+.dark .bom th {
+ background-color: #3b4749;
+}
+
+.bom tr.highlighted:nth-child(n) {
+ background-color: #cfc;
+}
+
+.dark .bom tr.highlighted:nth-child(n) {
+ background-color: #226022;
+}
+
+.bom tr:nth-child(even) {
+ background-color: #f2f2f2;
+}
+
+.dark .bom tr:nth-child(even) {
+ background-color: #313b40;
+}
+
+.bom tr {
+ transition: background-color 0.2s;
+}
+
+.bom .numCol {
+ width: 25px;
+}
+
+.bom .Description {
+ width: 10%;
+}
+
+.bom .Part {
+ width: 10%;
+}
+
+.bom .Value {
+ width: 15%;
+}
+
+.bom .Quantity {
+ width: 65px;
+}
+
+.bom th .sortmark {
+ position: absolute;
+ right: 1px;
+ top: 1px;
+ margin-top: -5px;
+ border-width: 5px;
+ border-style: solid;
+ border-color: transparent transparent #221 transparent;
+ transform-origin: 50% 85%;
+ transition: opacity 0.2s, transform 0.4s;
+}
+
+.dark .bom th .sortmark {
+ filter: invert(1);
+}
+
+.bom th .sortmark.none {
+ opacity: 0;
+}
+
+.bom th .sortmark.desc {
+ transform: rotate(180deg);
+}
+
+.bom th:hover .sortmark.none {
+ opacity: 0.5;
+}
+
+.bom .bom-checkbox {
+ width: 30px;
+ position: relative;
+ user-select: none;
+ -moz-user-select: none;
+}
+
+.bom .bom-checkbox:before {
+ content: "";
+ position: absolute;
+ border-width: 15px;
+ border-style: solid;
+ border-color: #51829f transparent transparent transparent;
+ visibility: hidden;
+ top: -15px;
+}
+
+.bom .bom-checkbox:after {
+ content: "Double click to set/unset all";
+ position: absolute;
+ color: white;
+ top: -35px;
+ left: -26px;
+ background: #51829f;
+ padding: 5px 15px;
+ border-radius: 8px;
+ white-space: nowrap;
+ visibility: hidden;
+}
+
+.bom .bom-checkbox:hover:before, .bom .bom-checkbox:hover:after {
+ visibility: visible;
+ transition: visibility 0.2s linear 1s;
+}
+
+.split {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ overflow-y: auto;
+ overflow-x: hidden;
+ background-color: inherit;
+}
+
+.split.split-horizontal, .gutter.gutter-horizontal {
+ height: 100%;
+ float: left;
+}
+
+.gutter {
+ background-color: #ddd;
+ background-repeat: no-repeat;
+ background-position: 50%;
+ transition: background-color 0.3s;
+}
+
+.dark .gutter {
+ background-color: #777;
+}
+
+.gutter.gutter-horizontal {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
+ cursor: ew-resize;
+ width: 5px;
+}
+
+.gutter.gutter-vertical {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII=');
+ cursor: ns-resize;
+ height: 5px;
+}
+
+.searchbox {
+ float: left;
+ height: 40px;
+ margin: 10px 5px;
+ padding: 12px 32px;
+ font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace;
+ font-size: 18px;
+ box-sizing: border-box;
+ border: 1px solid #888;
+ border-radius: 6px;
+ outline: none;
+ background-color: #eee;
+ transition: background-color 0.2s, border 0.2s;
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABNklEQVQ4T8XSMUvDQBQH8P/LElFa/AIZHcTBQSz0I/gFstTBRR2KUC4ldDxw7h0Bl3RRUATxi4iiODgoiLNrbQYp5J6cpJJqomkX33Z37/14d/dIa33MzDuYI4johOI4XhyNRteO46zNYjDzAxE1yBZprVeZ+QbAUhXEGJMA2Ox2u4+fQIa0mPmsCgCgJYQ4t7lfgF0opQYAdv9ABkKI/UnOFCClXKjX61cA1osQY8x9kiRNKeV7IWA3oyhaSdP0FkAtjxhj3hzH2RBCPOf3pzqYHCilfAAX+URm9oMguPzeWSGQvUcMYC8rOBJCHBRdqxTo9/vbRHRqi8bj8XKv1xvODbiuW2u32/bvf0SlDv4XYOY7z/Mavu+nM1+BmQ+NMc0wDF/LprP0DbTWW0T00ul0nn4b7Q87+X4Qmfiq2wAAAABJRU5ErkJggg==');
+ background-position: 10px 10px;
+ background-repeat: no-repeat;
+}
+
+.dark .searchbox {
+ background-color: #111;
+ color: #eee;
+}
+
+.searchbox::placeholder {
+ color: #ccc;
+}
+
+.dark .searchbox::placeholder {
+ color: #666;
+}
+
+.filter {
+ width: calc(60% - 64px);
+}
+
+.reflookup {
+ width: calc(40% - 10px);
+}
+
+input[type=text]:focus {
+ background-color: white;
+ border: 1px solid #333;
+}
+
+.dark input[type=text]:focus {
+ background-color: #333;
+ border: 1px solid #ccc;
+}
+
+mark.highlight {
+ background-color: #5050ff;
+ color: #fff;
+ padding: 2px;
+ border-radius: 6px;
+}
+
+.dark mark.highlight {
+ background-color: #76a6da;
+ color: #111;
+}
+
+.menubtn {
+ background-color: white;
+ font-size: 16px;
+ border: none;
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 20 20'%3E%3Cpath fill='none' d='M0 0h20v20H0V0z'/%3E%3Cpath d='M15.95 10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12 2.34c-.03-.2-.2-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3 2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6 2.77c-.1.18-.06.39.1.51l1.69 1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37 12.1c-.15.12-.19.34-.1.51l1.6 2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3 2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47 1.35-.78l1.99.8c.18.07.39 0 .49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z'/%3E%3C/svg%3E%0A");
+ background-position: center;
+ background-repeat: no-repeat;
+}
+
+.dark .menubtn {
+ filter: invert(1);
+}
+
+.menu {
+ position: relative;
+ display: inline-block;
+}
+
+.menu-content {
+ display: none;
+ position: absolute;
+ background-color: white;
+ right: 0;
+ min-width: 300px;
+ box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
+ z-index: 100;
+ padding: 8px;
+}
+
+.dark .menu-content {
+ background-color: #111;
+}
+
+.menu:hover .menu-content {
+ display: block;
+}
+
+.menu:hover .menubtn {
+ background-color: #eee;
+}
+
+.dark .menu:hover .menubtn {}
+
+.menu-label {
+ display: inline-block;
+ padding: 8px;
+ border: 1px solid #ccc;
+ border-top: 0;
+ width: calc(100% - 18px);
+}
+
+.menu-label-top {
+ border-top: 1px solid #ccc;
+}
+
+.menu-textbox {
+ float: left;
+ height: 24px;
+ margin: 10px 5px;
+ padding: 5px 5px;
+ font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace;
+ font-size: 14px;
+ box-sizing: border-box;
+ border: 1px solid #888;
+ border-radius: 4px;
+ outline: none;
+ background-color: #eee;
+ transition: background-color 0.2s, border 0.2s;
+ width: calc(100% - 10px);
+}
+
+.dark .menu-textbox {
+ background-color: #222;
+ color: #eee;
+}
+
+#topmostdiv {
+ transition: background-color 0.3s;
+}
+
+#top {
+ height: 78px;
+ border-bottom: 2px solid black;
+}
+
+.dark #top {
+ border-bottom: 2px solid #ccc;
+}
+
+#dbg {
+ display: block;
+}
+
+::-webkit-scrollbar {
+ width: 8px;
+}
+
+::-webkit-scrollbar-track {
+ background: #aaa;
+}
+
+::-webkit-scrollbar-thumb {
+ background: #666;
+ border-radius: 3px;
+}
+
+::-webkit-scrollbar-thumb:hover {
+ background: #555;
+}
+
+.slider {
+ -webkit-appearance: none;
+ width: 100%;
+ margin: 3px 0;
+ padding: 0;
+ outline: none;
+ opacity: 0.7;
+ -webkit-transition: .2s;
+ transition: opacity .2s;
+ border-radius: 3px;
+}
+
+.slider:hover {
+ opacity: 1;
+}
+
+.slider:focus {
+ outline: none;
+}
+
+.slider::-webkit-slider-runnable-track {
+ -webkit-appearance: none;
+ width: 100%;
+ height: 8px;
+ background: #d3d3d3;
+ border-radius: 3px;
+ border: none;
+}
+
+.slider::-webkit-slider-thumb {
+ -webkit-appearance: none;
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ background: #0a0;
+ cursor: pointer;
+ margin-top: -4px;
+}
+
+.dark .slider::-webkit-slider-thumb {
+ background: #3d3;
+}
+
+.slider::-moz-range-thumb {
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ background: #0a0;
+ cursor: pointer;
+}
+
+.slider::-moz-range-track {
+ height: 8px;
+ background: #d3d3d3;
+ border-radius: 3px;
+}
+
+.dark .slider::-moz-range-thumb {
+ background: #3d3;
+}
+
+.slider::-ms-track {
+ width: 100%;
+ height: 8px;
+ border-width: 3px 0;
+ background: transparent;
+ border-color: transparent;
+ color: transparent;
+ transition: opacity .2s;
+}
+
+.slider::-ms-fill-lower {
+ background: #d3d3d3;
+ border: none;
+ border-radius: 3px;
+}
+
+.slider::-ms-fill-upper {
+ background: #d3d3d3;
+ border: none;
+ border-radius: 3px;
+}
+
+.slider::-ms-thumb {
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ background: #0a0;
+ cursor: pointer;
+ margin: 0;
+}
+
+.shameless-plug {
+ font-size: 0.8em;
+ text-align: center;
+ display: block;
+}
+
+.shameless-plug a {
+ color: #0278a4;
+}
+
+.dark .shameless-plug a {
+ color: #00b9fd;
+}
+
+ </style>
+ <script type="text/javascript" >
+///////////////////////////////////////////////
+/*
+ Split.js - v1.3.5
+ MIT License
+ https://github.com/nathancahill/Split.js
+*/
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Split=t()}(this,function(){"use strict";var e=window,t=e.document,n="addEventListener",i="removeEventListener",r="getBoundingClientRect",s=function(){return!1},o=e.attachEvent&&!e[n],a=["","-webkit-","-moz-","-o-"].filter(function(e){var n=t.createElement("div");return n.style.cssText="width:"+e+"calc(9px)",!!n.style.length}).shift()+"calc",l=function(e){return"string"==typeof e||e instanceof String?t.querySelector(e):e};return function(u,c){function z(e,t,n){var i=A(y,t,n);Object.keys(i).forEach(function(t){return e.style[t]=i[t]})}function h(e,t){var n=B(y,t);Object.keys(n).forEach(function(t){return e.style[t]=n[t]})}function f(e){var t=E[this.a],n=E[this.b],i=t.size+n.size;t.size=e/this.size*i,n.size=i-e/this.size*i,z(t.element,t.size,this.aGutterSize),z(n.element,n.size,this.bGutterSize)}function m(e){var t;this.dragging&&((t="touches"in e?e.touches[0][b]-this.start:e[b]-this.start)<=E[this.a].minSize+M+this.aGutterSize?t=E[this.a].minSize+this.aGutterSize:t>=this.size-(E[this.b].minSize+M+this.bGutterSize)&&(t=this.size-(E[this.b].minSize+this.bGutterSize)),f.call(this,t),c.onDrag&&c.onDrag())}function g(){var e=E[this.a].element,t=E[this.b].element;this.size=e[r]()[y]+t[r]()[y]+this.aGutterSize+this.bGutterSize,this.start=e[r]()[G]}function d(){var t=this,n=E[t.a].element,r=E[t.b].element;t.dragging&&c.onDragEnd&&c.onDragEnd(),t.dragging=!1,e[i]("mouseup",t.stop),e[i]("touchend",t.stop),e[i]("touchcancel",t.stop),t.parent[i]("mousemove",t.move),t.parent[i]("touchmove",t.move),delete t.stop,delete t.move,n[i]("selectstart",s),n[i]("dragstart",s),r[i]("selectstart",s),r[i]("dragstart",s),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",t.gutter.style.cursor="",t.parent.style.cursor=""}function S(t){var i=this,r=E[i.a].element,o=E[i.b].element;!i.dragging&&c.onDragStart&&c.onDragStart(),t.preventDefault(),i.dragging=!0,i.move=m.bind(i),i.stop=d.bind(i),e[n]("mouseup",i.stop),e[n]("touchend",i.stop),e[n]("touchcancel",i.stop),i.parent[n]("mousemove",i.move),i.parent[n]("touchmove",i.move),r[n]("selectstart",s),r[n]("dragstart",s),o[n]("selectstart",s),o[n]("dragstart",s),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",i.gutter.style.cursor=j,i.parent.style.cursor=j,g.call(i)}function v(e){e.forEach(function(t,n){if(n>0){var i=F[n-1],r=E[i.a],s=E[i.b];r.size=e[n-1],s.size=t,z(r.element,r.size,i.aGutterSize),z(s.element,s.size,i.bGutterSize)}})}function p(){F.forEach(function(e){e.parent.removeChild(e.gutter),E[e.a].element.style[y]="",E[e.b].element.style[y]=""})}void 0===c&&(c={});var y,b,G,E,w=l(u[0]).parentNode,D=e.getComputedStyle(w).flexDirection,U=c.sizes||u.map(function(){return 100/u.length}),k=void 0!==c.minSize?c.minSize:100,x=Array.isArray(k)?k:u.map(function(){return k}),L=void 0!==c.gutterSize?c.gutterSize:10,M=void 0!==c.snapOffset?c.snapOffset:30,O=c.direction||"horizontal",j=c.cursor||("horizontal"===O?"ew-resize":"ns-resize"),C=c.gutter||function(e,n){var i=t.createElement("div");return i.className="gutter gutter-"+n,i},A=c.elementStyle||function(e,t,n){var i={};return"string"==typeof t||t instanceof String?i[e]=t:i[e]=o?t+"%":a+"("+t+"% - "+n+"px)",i},B=c.gutterStyle||function(e,t){return n={},n[e]=t+"px",n;var n};"horizontal"===O?(y="width","clientWidth",b="clientX",G="left","paddingLeft"):"vertical"===O&&(y="height","clientHeight",b="clientY",G="top","paddingTop");var F=[];return E=u.map(function(e,t){var i,s={element:l(e),size:U[t],minSize:x[t]};if(t>0&&(i={a:t-1,b:t,dragging:!1,isFirst:1===t,isLast:t===u.length-1,direction:O,parent:w},i.aGutterSize=L,i.bGutterSize=L,i.isFirst&&(i.aGutterSize=L/2),i.isLast&&(i.bGutterSize=L/2),"row-reverse"===D||"column-reverse"===D)){var a=i.a;i.a=i.b,i.b=a}if(!o&&t>0){var c=C(t,O);h(c,L),c[n]("mousedown",S.bind(i)),c[n]("touchstart",S.bind(i)),w.insertBefore(c,s.element),i.gutter=c}0===t||t===u.length-1?z(s.element,s.size,L/2):z(s.element,s.size,L);var f=s.element[r]()[y];return f<s.minSize&&(s.minSize=f),t>0&&F.push(i),s}),o?{setSizes:v,destroy:p}:{setSizes:v,getSizes:function(){return E.map(function(e){return e.size})},collapse:function(e){if(e===F.length){var t=F[e-1];g.call(t),o||f.call(t,t.size-t.bGutterSize)}else{var n=F[e];g.call(n),o||f.call(n,n.aGutterSize)}},destroy:p}}});
+
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+var config = {"redraw_on_drag": true, "highlight_pin1": false, "extra_fields": [], "dark_mode": false, "bom_view": "left-right", "board_rotation": 0.0, "checkboxes": "Sourced,Placed", "show_silkscreen": true, "layer_view": "FB"}
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+var pcbdata = {"font_data": {" ": {"l": [], "w": 0.7619047619047619}, ".": {"l": [[[0.23809523809523808, -0.14285714285714285], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.047619047619047616], [0.19047619047619047, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.23809523809523808, -0.047619047619047616]]], "w": 0.47619047619047616}, "1": {"l": [[[0.7619047619047619, -0.047619047619047616], [0.19047619047619047, -0.047619047619047616]], [[0.47619047619047616, -0.047619047619047616], [0.47619047619047616, -1.0476190476190474], [0.38095238095238093, -0.9047619047619047], [0.2857142857142857, -0.8095238095238095], [0.19047619047619047, -0.7619047619047619]]], "w": 0.9523809523809523}, "0": {"l": [[[0.42857142857142855, -1.0476190476190474], [0.5238095238095237, -1.0476190476190474], [0.6190476190476191, -1.0], [0.6666666666666666, -0.9523809523809523], [0.7142857142857142, -0.8571428571428571], [0.7619047619047619, -0.6666666666666666], [0.7619047619047619, -0.42857142857142855], [0.7142857142857142, -0.23809523809523808], [0.6666666666666666, -0.14285714285714285], [0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.42857142857142855, -0.047619047619047616], [0.3333333333333333, -0.09523809523809523], [0.2857142857142857, -0.14285714285714285], [0.23809523809523808, -0.23809523809523808], [0.19047619047619047, -0.42857142857142855], [0.19047619047619047, -0.6666666666666666], [0.23809523809523808, -0.8571428571428571], [0.2857142857142857, -0.9523809523809523], [0.3333333333333333, -1.0], [0.42857142857142855, -1.0476190476190474]]], "w": 0.9523809523809523}, "3": {"l": [[[0.14285714285714285, -1.0476190476190474], [0.7619047619047619, -1.0476190476190474], [0.42857142857142855, -0.6666666666666666], [0.5714285714285714, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.7619047619047619, -0.47619047619047616], [0.7619047619047619, -0.23809523809523808], [0.7142857142857142, -0.14285714285714285], [0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.2857142857142857, -0.047619047619047616], [0.19047619047619047, -0.09523809523809523], [0.14285714285714285, -0.14285714285714285]]], "w": 0.9523809523809523}, "2": {"l": [[[0.19047619047619047, -0.9523809523809523], [0.23809523809523808, -1.0], [0.3333333333333333, -1.0476190476190474], [0.5714285714285714, -1.0476190476190474], [0.6666666666666666, -1.0], [0.7142857142857142, -0.9523809523809523], [0.7619047619047619, -0.8571428571428571], [0.7619047619047619, -0.7619047619047619], [0.7142857142857142, -0.6190476190476191], [0.14285714285714285, -0.047619047619047616], [0.7619047619047619, -0.047619047619047616]]], "w": 0.9523809523809523}, "5": {"l": [[[0.7142857142857142, -1.0476190476190474], [0.23809523809523808, -1.0476190476190474], [0.19047619047619047, -0.5714285714285714], [0.23809523809523808, -0.6190476190476191], [0.3333333333333333, -0.6666666666666666], [0.5714285714285714, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.7619047619047619, -0.47619047619047616], [0.7619047619047619, -0.23809523809523808], [0.7142857142857142, -0.14285714285714285], [0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.14285714285714285]]], "w": 0.9523809523809523}, "4": {"l": [[[0.6666666666666666, -0.7142857142857142], [0.6666666666666666, -0.047619047619047616]], [[0.42857142857142855, -1.0952380952380951], [0.19047619047619047, -0.38095238095238093], [0.8095238095238095, -0.38095238095238093]]], "w": 0.9523809523809523}, "7": {"l": [[[0.14285714285714285, -1.0476190476190474], [0.8095238095238095, -1.0476190476190474], [0.38095238095238093, -0.047619047619047616]]], "w": 0.9523809523809523}, "6": {"l": [[[0.6666666666666666, -1.0476190476190474], [0.47619047619047616, -1.0476190476190474], [0.38095238095238093, -1.0], [0.3333333333333333, -0.9523809523809523], [0.23809523809523808, -0.8095238095238095], [0.19047619047619047, -0.6190476190476191], [0.19047619047619047, -0.23809523809523808], [0.23809523809523808, -0.14285714285714285], [0.2857142857142857, -0.09523809523809523], [0.38095238095238093, -0.047619047619047616], [0.5714285714285714, -0.047619047619047616], [0.6666666666666666, -0.09523809523809523], [0.7142857142857142, -0.14285714285714285], [0.7619047619047619, -0.23809523809523808], [0.7619047619047619, -0.47619047619047616], [0.7142857142857142, -0.5714285714285714], [0.6666666666666666, -0.6190476190476191], [0.5714285714285714, -0.6666666666666666], [0.38095238095238093, -0.6666666666666666], [0.2857142857142857, -0.6190476190476191], [0.23809523809523808, -0.5714285714285714], [0.19047619047619047, -0.47619047619047616]]], "w": 0.9523809523809523}, "A": {"l": [[[0.19047619047619047, -0.3333333333333333], [0.6666666666666666, -0.3333333333333333]], [[0.09523809523809523, -0.047619047619047616], [0.42857142857142855, -1.0476190476190474], [0.7619047619047619, -0.047619047619047616]]], "w": 0.8571428571428571}, "C": {"l": [[[0.8095238095238095, -0.14285714285714285], [0.7619047619047619, -0.09523809523809523], [0.6190476190476191, -0.047619047619047616], [0.5238095238095237, -0.047619047619047616], [0.38095238095238093, -0.09523809523809523], [0.2857142857142857, -0.19047619047619047], [0.23809523809523808, -0.2857142857142857], [0.19047619047619047, -0.47619047619047616], [0.19047619047619047, -0.6190476190476191], [0.23809523809523808, -0.8095238095238095], [0.2857142857142857, -0.9047619047619047], [0.38095238095238093, -1.0], [0.5238095238095237, -1.0476190476190474], [0.6190476190476191, -1.0476190476190474], [0.7619047619047619, -1.0], [0.8095238095238095, -0.9523809523809523]]], "w": 1.0}, "B": {"l": [[[0.5714285714285714, -0.5714285714285714], [0.7142857142857142, -0.5238095238095237], [0.7619047619047619, -0.47619047619047616], [0.8095238095238094, -0.38095238095238093], [0.8095238095238094, -0.23809523809523808], [0.7619047619047619, -0.14285714285714285], [0.7142857142857142, -0.09523809523809523], [0.619047619047619, -0.047619047619047616], [0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.5714285714285714, -1.0476190476190474], [0.6666666666666665, -1.0], [0.7142857142857142, -0.9523809523809523], [0.7619047619047619, -0.8571428571428571], [0.7619047619047619, -0.7619047619047619], [0.7142857142857142, -0.6666666666666666], [0.6666666666666665, -0.6190476190476191], [0.5714285714285714, -0.5714285714285714], [0.23809523809523803, -0.5714285714285714]]], "w": 1.0}, "E": {"l": [[[0.23809523809523808, -0.5714285714285714], [0.5714285714285714, -0.5714285714285714]], [[0.7142857142857142, -0.047619047619047616], [0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474], [0.7142857142857142, -1.0476190476190474]]], "w": 0.9047619047619047}, "D": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.4761904761904761, -1.0476190476190474], [0.619047619047619, -1.0], [0.7142857142857142, -0.9047619047619047], [0.7619047619047619, -0.8095238095238095], [0.8095238095238094, -0.6190476190476191], [0.8095238095238094, -0.47619047619047616], [0.7619047619047619, -0.2857142857142857], [0.7142857142857142, -0.19047619047619047], [0.619047619047619, -0.09523809523809523], [0.4761904761904761, -0.047619047619047616], [0.23809523809523803, -0.047619047619047616]]], "w": 1.0}, "G": {"l": [[[0.7619047619047619, -1.0], [0.6666666666666666, -1.0476190476190474], [0.5238095238095237, -1.0476190476190474], [0.38095238095238093, -1.0], [0.2857142857142857, -0.9047619047619047], [0.23809523809523808, -0.8095238095238095], [0.19047619047619047, -0.6190476190476191], [0.19047619047619047, -0.47619047619047616], [0.23809523809523808, -0.2857142857142857], [0.2857142857142857, -0.19047619047619047], [0.38095238095238093, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.6190476190476191, -0.047619047619047616], [0.7619047619047619, -0.09523809523809523], [0.8095238095238095, -0.14285714285714285], [0.8095238095238095, -0.47619047619047616], [0.6190476190476191, -0.47619047619047616]]], "w": 1.0}, "F": {"l": [[[0.5714285714285714, -0.5714285714285714], [0.23809523809523808, -0.5714285714285714]], [[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474], [0.7142857142857142, -1.0476190476190474]]], "w": 0.8571428571428571}, "I": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474]]], "w": 0.47619047619047616}, "H": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474]], [[0.23809523809523803, -0.5714285714285714], [0.8095238095238094, -0.5714285714285714]], [[0.8095238095238094, -0.047619047619047616], [0.8095238095238094, -1.0476190476190474]]], "w": 1.0476190476190474}, "J": {"l": [[[0.5238095238095237, -1.0476190476190474], [0.5238095238095237, -0.3333333333333333], [0.47619047619047616, -0.19047619047619047], [0.38095238095238093, -0.09523809523809523], [0.23809523809523808, -0.047619047619047616], [0.14285714285714285, -0.047619047619047616]]], "w": 0.7619047619047619}, "M": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474], [0.5714285714285714, -0.3333333333333333], [0.9047619047619047, -1.0476190476190474], [0.9047619047619047, -0.047619047619047616]]], "w": 1.1428571428571428}, "L": {"l": [[[0.7142857142857142, -0.047619047619047616], [0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474]]], "w": 0.8095238095238095}, "O": {"l": [[[0.4285714285714285, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.8095238095238094, -0.9047619047619047], [0.857142857142857, -0.7142857142857142], [0.857142857142857, -0.38095238095238093], [0.8095238095238094, -0.19047619047619047], [0.7142857142857142, -0.09523809523809523], [0.619047619047619, -0.047619047619047616], [0.4285714285714285, -0.047619047619047616], [0.33333333333333326, -0.09523809523809523], [0.23809523809523803, -0.19047619047619047], [0.1904761904761904, -0.38095238095238093], [0.1904761904761904, -0.7142857142857142], [0.23809523809523803, -0.9047619047619047], [0.33333333333333326, -1.0], [0.4285714285714285, -1.0476190476190474]]], "w": 1.0476190476190474}, "N": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.8095238095238094, -0.047619047619047616], [0.8095238095238094, -1.0476190476190474]]], "w": 1.0476190476190474}, "Q": {"l": [[[0.9047619047619047, 0.047619047619047616], [0.8095238095238094, 0.0], [0.7142857142857142, -0.09523809523809523], [0.5714285714285714, -0.23809523809523808], [0.4761904761904761, -0.2857142857142857], [0.3809523809523809, -0.2857142857142857]], [[0.4285714285714285, -0.047619047619047616], [0.33333333333333326, -0.09523809523809523], [0.23809523809523803, -0.19047619047619047], [0.1904761904761904, -0.38095238095238093], [0.1904761904761904, -0.7142857142857142], [0.23809523809523803, -0.9047619047619047], [0.33333333333333326, -1.0], [0.4285714285714285, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.8095238095238094, -0.9047619047619047], [0.857142857142857, -0.7142857142857142], [0.857142857142857, -0.38095238095238093], [0.8095238095238094, -0.19047619047619047], [0.7142857142857142, -0.09523809523809523], [0.619047619047619, -0.047619047619047616], [0.4285714285714285, -0.047619047619047616]]], "w": 1.0476190476190474}, "P": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.7619047619047619, -0.9523809523809523], [0.8095238095238094, -0.8571428571428571], [0.8095238095238094, -0.7142857142857142], [0.7619047619047619, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.619047619047619, -0.5238095238095237], [0.23809523809523803, -0.5238095238095237]]], "w": 1.0}, "S": {"l": [[[0.19047619047619047, -0.09523809523809523], [0.3333333333333333, -0.047619047619047616], [0.5714285714285714, -0.047619047619047616], [0.6666666666666666, -0.09523809523809523], [0.7142857142857142, -0.14285714285714285], [0.7619047619047619, -0.23809523809523808], [0.7619047619047619, -0.3333333333333333], [0.7142857142857142, -0.42857142857142855], [0.6666666666666666, -0.47619047619047616], [0.5714285714285714, -0.5238095238095237], [0.38095238095238093, -0.5714285714285714], [0.2857142857142857, -0.6190476190476191], [0.23809523809523808, -0.6666666666666666], [0.19047619047619047, -0.7619047619047619], [0.19047619047619047, -0.8571428571428571], [0.23809523809523808, -0.9523809523809523], [0.2857142857142857, -1.0], [0.38095238095238093, -1.0476190476190474], [0.6190476190476191, -1.0476190476190474], [0.7619047619047619, -1.0]]], "w": 0.9523809523809523}, "R": {"l": [[[0.8095238095238094, -0.047619047619047616], [0.4761904761904761, -0.5238095238095237]], [[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.7619047619047619, -0.9523809523809523], [0.8095238095238094, -0.8571428571428571], [0.8095238095238094, -0.7142857142857142], [0.7619047619047619, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.619047619047619, -0.5238095238095237], [0.23809523809523803, -0.5238095238095237]]], "w": 1.0}, "U": {"l": [[[0.23809523809523803, -1.0476190476190474], [0.23809523809523803, -0.23809523809523808], [0.28571428571428564, -0.14285714285714285], [0.33333333333333326, -0.09523809523809523], [0.4285714285714285, -0.047619047619047616], [0.619047619047619, -0.047619047619047616], [0.7142857142857142, -0.09523809523809523], [0.7619047619047619, -0.14285714285714285], [0.8095238095238094, -0.23809523809523808], [0.8095238095238094, -1.0476190476190474]]], "w": 1.0476190476190474}, "T": {"l": [[[0.09523809523809523, -1.0476190476190474], [0.6666666666666666, -1.0476190476190474]], [[0.38095238095238093, -0.047619047619047616], [0.38095238095238093, -1.0476190476190474]]], "w": 0.7619047619047619}, "V": {"l": [[[0.09523809523809523, -1.0476190476190474], [0.42857142857142855, -0.047619047619047616], [0.7619047619047619, -1.0476190476190474]]], "w": 0.8571428571428571}, "a": {"l": [[[0.6666666666666666, -0.047619047619047616], [0.6666666666666666, -0.5714285714285714], [0.6190476190476191, -0.6666666666666666], [0.5238095238095237, -0.7142857142857142], [0.3333333333333333, -0.7142857142857142], [0.23809523809523808, -0.6666666666666666]], [[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.19047619047619047], [0.19047619047619047, -0.2857142857142857], [0.23809523809523808, -0.38095238095238093], [0.3333333333333333, -0.42857142857142855], [0.5714285714285714, -0.42857142857142855], [0.6666666666666666, -0.47619047619047616]]], "w": 0.9047619047619047}, "e": {"l": [[[0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.19047619047619047], [0.19047619047619047, -0.5714285714285714], [0.23809523809523808, -0.6666666666666666], [0.3333333333333333, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.5714285714285714], [0.6666666666666666, -0.47619047619047616], [0.19047619047619047, -0.38095238095238093]]], "w": 0.8571428571428571}, "f": {"l": [[[0.09523809523809523, -0.7142857142857142], [0.47619047619047616, -0.7142857142857142]], [[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.9047619047619047], [0.2857142857142857, -1.0], [0.38095238095238093, -1.0476190476190474], [0.47619047619047616, -1.0476190476190474]]], "w": 0.5714285714285714}, "i": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.7142857142857142]], [[0.23809523809523808, -1.0476190476190474], [0.19047619047619047, -1.0], [0.23809523809523808, -0.9523809523809523], [0.2857142857142857, -1.0], [0.23809523809523808, -1.0476190476190474], [0.23809523809523808, -0.9523809523809523]]], "w": 0.47619047619047616}, "h": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474]], [[0.6666666666666666, -0.047619047619047616], [0.6666666666666666, -0.5714285714285714], [0.6190476190476191, -0.6666666666666666], [0.5238095238095237, -0.7142857142857142], [0.38095238095238093, -0.7142857142857142], [0.2857142857142857, -0.6666666666666666], [0.23809523809523808, -0.6190476190476191]]], "w": 0.9047619047619047}, "k": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474]], [[0.3333333333333333, -0.42857142857142855], [0.6190476190476191, -0.047619047619047616]], [[0.6190476190476191, -0.7142857142857142], [0.23809523809523808, -0.3333333333333333]]], "w": 0.8095238095238095}, "m": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.7142857142857142]], [[0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.5714285714285714], [0.6666666666666666, -0.047619047619047616]], [[0.6666666666666666, -0.5714285714285714], [0.7142857142857142, -0.6666666666666666], [0.8095238095238095, -0.7142857142857142], [0.9523809523809523, -0.7142857142857142], [1.0476190476190474, -0.6666666666666666], [1.0952380952380951, -0.5714285714285714], [1.0952380952380951, -0.047619047619047616]]], "w": 1.3333333333333333}, "o": {"l": [[[0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.19047619047619047, -0.23809523809523808], [0.19047619047619047, -0.5238095238095237], [0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5238095238095237], [0.7142857142857142, -0.23809523809523808], [0.6666666666666666, -0.14285714285714285], [0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.38095238095238093, -0.047619047619047616]]], "w": 0.9047619047619047}, "n": {"l": [[[0.23809523809523808, -0.7142857142857142], [0.23809523809523808, -0.047619047619047616]], [[0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.5714285714285714], [0.6666666666666666, -0.047619047619047616]]], "w": 0.9047619047619047}, "p": {"l": [[[0.23809523809523808, -0.7142857142857142], [0.23809523809523808, 0.2857142857142857]], [[0.23809523809523808, -0.6666666666666666], [0.3333333333333333, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5238095238095237], [0.7142857142857142, -0.23809523809523808], [0.6666666666666666, -0.14285714285714285], [0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523]]], "w": 0.9047619047619047}, "s": {"l": [[[0.19047619047619047, -0.09523809523809523], [0.2857142857142857, -0.047619047619047616], [0.47619047619047616, -0.047619047619047616], [0.5714285714285714, -0.09523809523809523], [0.6190476190476191, -0.19047619047619047], [0.6190476190476191, -0.23809523809523808], [0.5714285714285714, -0.3333333333333333], [0.47619047619047616, -0.38095238095238093], [0.3333333333333333, -0.38095238095238093], [0.23809523809523808, -0.42857142857142855], [0.19047619047619047, -0.5238095238095237], [0.19047619047619047, -0.5714285714285714], [0.23809523809523808, -0.6666666666666666], [0.3333333333333333, -0.7142857142857142], [0.47619047619047616, -0.7142857142857142], [0.5714285714285714, -0.6666666666666666]]], "w": 0.8095238095238095}, "r": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.7142857142857142]], [[0.23809523809523808, -0.5238095238095237], [0.2857142857142857, -0.6190476190476191], [0.3333333333333333, -0.6666666666666666], [0.42857142857142855, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142]]], "w": 0.6190476190476191}, "u": {"l": [[[0.6666666666666666, -0.7142857142857142], [0.6666666666666666, -0.047619047619047616]], [[0.23809523809523808, -0.7142857142857142], [0.23809523809523808, -0.19047619047619047], [0.2857142857142857, -0.09523809523809523], [0.38095238095238093, -0.047619047619047616], [0.5238095238095237, -0.047619047619047616], [0.6190476190476191, -0.09523809523809523], [0.6666666666666666, -0.14285714285714285]]], "w": 0.9047619047619047}, "t": {"l": [[[0.09523809523809523, -0.7142857142857142], [0.47619047619047616, -0.7142857142857142]], [[0.23809523809523808, -1.0476190476190474], [0.23809523809523808, -0.19047619047619047], [0.2857142857142857, -0.09523809523809523], [0.38095238095238093, -0.047619047619047616], [0.47619047619047616, -0.047619047619047616]]], "w": 0.5714285714285714}, "w": {"l": [[[0.1428571428571428, -0.7142857142857142], [0.33333333333333326, -0.047619047619047616], [0.5238095238095237, -0.5238095238095237], [0.7142857142857142, -0.047619047619047616], [0.9047619047619047, -0.7142857142857142]]], "w": 1.0476190476190474}}, "modules": [{"layer": "F", "center": [171.4, 95.89999999999999], "pads": [{"layers": ["F", "B"], "angle": -180.0, "pos": [130.76, 95.89999999999999], "drillsize": [1.2, 1.2], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 2.4]}, {"layers": ["F", "B"], "angle": -180.0, "pos": [171.4, 95.89999999999999], "drillsize": [1.2, 1.2], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [2.4, 2.4]}], "drawings": [], "ref": "R2", "bbox": {"pos": [129.274999, 91.024999], "size": [43.600001999999996, 9.750002]}}, {"layer": "F", "center": [178.04999999999998, 91.1], "pads": [{"layers": ["F"], "angle": -0.0, "pos": [176.7, 91.1], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -0.0, "pos": [179.4, 91.1], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R6", "bbox": {"pos": [175.67499899999999, 90.159999], "size": [4.750001999999999, 1.880002]}}, {"layer": "F", "center": [184.35, 91.1], "pads": [{"layers": ["F"], "angle": -180.0, "pos": [185.7, 91.1], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -180.0, "pos": [183.0, 91.1], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "D2", "bbox": {"pos": [181.974999, 90.174999], "size": [4.750001999999999, 1.850002]}}, {"layer": "F", "center": [184.35, 85.1], "pads": [{"layers": ["F"], "angle": -180.0, "pos": [183.0, 85.1], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -180.0, "pos": [185.7, 85.1], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "D1", "bbox": {"pos": [181.974999, 84.174999], "size": [4.750001999999999, 1.850002]}}, {"layer": "F", "center": [178.04999999999998, 85.1], "pads": [{"layers": ["F"], "angle": -0.0, "pos": [179.4, 85.1], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -0.0, "pos": [176.7, 85.1], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R1", "bbox": {"pos": [175.67499899999999, 84.159999], "size": [4.750001999999999, 1.880002]}}, {"layer": "F", "center": [141.5, 86.8], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [149.0, 86.8], "drillsize": [1.0, 1.0], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.75, 1.75]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [146.5, 86.8], "drillsize": [1.0, 1.0], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.75, 1.75]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [144.0, 86.8], "drillsize": [1.0, 1.0], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.75, 1.75]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [141.5, 86.8], "drillsize": [1.0, 1.0], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.75, 1.75]}], "drawings": [], "ref": "J1", "bbox": {"pos": [138.52499899999998, 83.924999], "size": [13.450002, 6.800002]}}, {"layer": "F", "center": [156.4, 86.8], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [161.4, 86.8], "drillsize": [1.0, 1.0], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.75, 1.75]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [158.9, 86.8], "drillsize": [1.0, 1.0], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.75, 1.75]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [156.4, 86.8], "drillsize": [1.0, 1.0], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.75, 1.75]}], "drawings": [], "ref": "J2", "bbox": {"pos": [153.42499899999999, 83.924999], "size": [10.950002, 6.800002]}}, {"layer": "F", "center": [168.79999999999998, 86.8], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [171.29999999999998, 86.8], "drillsize": [1.05, 1.05], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.75, 1.75]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [168.79999999999998, 86.8], "drillsize": [1.05, 1.05], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.75, 1.75]}], "drawings": [], "ref": "J4", "bbox": {"pos": [165.824999, 83.924999], "size": [8.450002, 6.800002]}}, {"layer": "F", "center": [156.0, 95.94999999999999], "pads": [{"layers": ["F"], "angle": -90.0, "pos": [156.0, 94.6], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -90.0, "pos": [156.0, 97.3], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R5", "bbox": {"pos": [155.059999, 93.57499899999999], "size": [1.880002, 4.750001999999999]}}, {"layer": "F", "center": [165.000001, 95.6], "pads": [{"layers": ["F", "B"], "angle": -270.0, "pos": [165.000001, 95.6], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.52, 1.52]}, {"layers": ["F", "B"], "angle": -270.0, "pos": [159.92000099999998, 95.6], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.52, 1.52]}, {"layers": ["F", "B"], "angle": -270.0, "pos": [162.460001, 95.6], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.52, 1.52]}], "drawings": [], "ref": "Q2", "bbox": {"pos": [158.885, 93.564999], "size": [7.150002, 4.790001999999999]}}, {"layer": "F", "center": [131.5, 86.8], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [131.5, 86.8], "drillsize": [1.05, 1.05], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.75, 1.75]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [134.0, 86.8], "drillsize": [1.05, 1.05], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.75, 1.75]}], "drawings": [], "ref": "J3", "bbox": {"pos": [128.524999, 83.924999], "size": [8.450002, 6.800001]}}, {"layer": "F", "center": [147.79999999999998, 95.5], "pads": [{"layers": ["F", "B"], "angle": -270.0, "pos": [147.79999999999998, 95.5], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.52, 1.52]}, {"layers": ["F", "B"], "angle": -270.0, "pos": [142.72, 95.5], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.52, 1.52]}, {"layers": ["F", "B"], "angle": -270.0, "pos": [145.26, 95.5], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.52, 1.52]}], "drawings": [], "ref": "Q1", "bbox": {"pos": [141.684999, 93.46499899999999], "size": [7.150002, 4.790001999999999]}}, {"layer": "F", "center": [151.0, 95.94999999999999], "pads": [{"layers": ["F"], "angle": -270.0, "pos": [151.0, 97.3], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -270.0, "pos": [151.0, 94.6], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R3", "bbox": {"pos": [150.059999, 93.57499899999999], "size": [1.880002, 4.750001999999999]}}, {"layer": "F", "center": [136.25, 95.5], "pads": [{"layers": ["F"], "angle": -90.0, "pos": [136.25, 96.85], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -90.0, "pos": [136.25, 94.14999999999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R4", "bbox": {"pos": [135.309999, 93.124999], "size": [1.880002, 4.750001999999999]}}, {"layer": "F", "center": [123.19, 98.044], "pads": [], "drawings": [], "ref": "REF***", "bbox": {"pos": [118.788845, 94.326691], "size": [8.80231, 7.452731999999999]}}], "edges": [{"start": [115.057082, 97.94291799999999], "radius": 3.1999999999999997, "type": "circle", "width": 0.09999999999999999}, {"start": [190.199999, 83.8], "end": [190.199999, 99.8], "type": "segment", "width": 0.09999999999999999}, {"width": 0.09999999999999999, "endangle": 0.0, "start": [187.2, 83.8], "radius": 2.999999, "startangle": -90.0, "type": "arc"}, {"start": [185.342918, 97.94291799999999], "radius": 3.1999999999999997, "type": "circle", "width": 0.09999999999999999}, {"width": 0.09999999999999999, "endangle": 90.00001909859319, "start": [187.200001, 99.8], "radius": 3.0, "startangle": 1.9098593179478487e-05, "type": "arc"}, {"start": [187.2, 102.8], "end": [113.19999999999999, 102.8], "type": "segment", "width": 0.09999999999999999}, {"width": 0.09999999999999999, "endangle": 270.0, "start": [113.19999999999999, 83.8], "radius": 3.0, "startangle": 180.0, "type": "arc"}, {"width": 0.09999999999999999, "endangle": 180.0, "start": [113.19999999999999, 99.8], "radius": 3.0000009999999997, "startangle": 90.0, "type": "arc"}, {"start": [113.19999999999999, 80.8], "end": [187.2, 80.800001], "type": "segment", "width": 0.09999999999999999}, {"start": [110.19999899999999, 99.8], "end": [110.19999999999999, 83.800001], "type": "segment", "width": 0.09999999999999999}], "bom": {"both": [[2, "470", "R_0805_HandSoldering", [["R1", 4], ["R6", 1]], []], [1, "4.7", "R_0805_HandSoldering", [["R3", 12]], []], [1, "1k", "R_0805_HandSoldering", [["R4", 13]], []], [1, "4.7k", "R_0805_HandSoldering", [["R5", 8]], []], [1, "27", "R_Axial_Power_L38.0mm_W9.0mm_P40.64mm", [["R2", 0]], []], [1, "HEATon", "LED_0805_HandSoldering", [["D1", 3]], []], [1, "FANon", "LED_0805_HandSoldering", [["D2", 2]], []], [2, "BC517", "TO-92_Inline_Wide", [["Q1", 11], ["Q2", 9]], []], [1, "thermistor", "JST_XH_B02B-XH-A_02x2.50mm_Straight", [["J3", 10]], []], [1, "fan", "JST_XH_B02B-XH-A_02x2.50mm_Straight", [["J4", 7]], []], [1, "MCUpins", "JST_XH_B03B-XH-A_03x2.50mm_Straight", [["J2", 6]], []], [1, "power Input", "JST_XH_B04B-XH-A_04x2.50mm_Straight", [["J1", 5]], []]], "B": [], "F": [[2, "470", "R_0805_HandSoldering", [["R1", 4], ["R6", 1]], []], [1, "4.7", "R_0805_HandSoldering", [["R3", 12]], []], [1, "1k", "R_0805_HandSoldering", [["R4", 13]], []], [1, "4.7k", "R_0805_HandSoldering", [["R5", 8]], []], [1, "27", "R_Axial_Power_L38.0mm_W9.0mm_P40.64mm", [["R2", 0]], []], [1, "HEATon", "LED_0805_HandSoldering", [["D1", 3]], []], [1, "FANon", "LED_0805_HandSoldering", [["D2", 2]], []], [2, "BC517", "TO-92_Inline_Wide", [["Q1", 11], ["Q2", 9]], []], [1, "thermistor", "JST_XH_B02B-XH-A_02x2.50mm_Straight", [["J3", 10]], []], [1, "fan", "JST_XH_B02B-XH-A_02x2.50mm_Straight", [["J4", 7]], []], [1, "MCUpins", "JST_XH_B03B-XH-A_03x2.50mm_Straight", [["J2", 6]], []], [1, "power Input", "JST_XH_B04B-XH-A_04x2.50mm_Straight", [["J1", 5]], []]]}, "silkscreen": {"B": [], "F": [{"width": 1.5, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "heater\n", "thickness": 0.19999999999999998, "pos": [177.79999999999998, 97.536], "height": 1.5}, {"width": 0.5, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "temp", "thickness": 0.09999999999999999, "pos": [161.4, 83.5], "height": 0.5}, {"width": 0.5, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "GND", "thickness": 0.09999999999999999, "pos": [141.5, 83.5], "height": 0.5}, {"width": 0.5, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "5V", "thickness": 0.09999999999999999, "pos": [144.0, 83.5], "height": 0.5}, {"width": 0.5, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "12V", "thickness": 0.09999999999999999, "pos": [146.4, 83.5], "height": 0.5}, {"width": 0.5, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "heat\n", "thickness": 0.09999999999999999, "pos": [158.9, 83.5], "height": 0.5}, {"width": 0.5, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "fan\n", "thickness": 0.09999999999999999, "pos": [156.4, 83.5], "height": 0.5}, {"width": 2.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "OpenPLC\nFOSSEE", "thickness": 0.39999999999999997, "pos": [120.142, 87.37599999999999], "height": 2.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R2", "thickness": 0.15, "pos": [151.07999999999998, 101.46], "height": 1.0}, {"start": [132.01999999999998, 91.33999999999999], "end": [132.01999999999998, 94.52], "type": "segment", "width": 0.12}, {"start": [170.14, 91.33999999999999], "end": [132.01999999999998, 91.33999999999999], "type": "segment", "width": 0.12}, {"start": [170.14, 94.52], "end": [170.14, 91.33999999999999], "type": "segment", "width": 0.12}, {"start": [132.01999999999998, 100.46], "end": [132.01999999999998, 97.28], "type": "segment", "width": 0.12}, {"start": [170.14, 100.46], "end": [132.01999999999998, 100.46], "type": "segment", "width": 0.12}, {"start": [170.14, 97.28], "end": [170.14, 100.46], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R6", "thickness": 0.15, "pos": [178.04999999999998, 89.39999999999999], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "470", "thickness": 0.15, "pos": [178.04999999999998, 92.85], "height": 1.0}, {"start": [178.65, 91.97999999999999], "end": [177.45, 91.97999999999999], "type": "segment", "width": 0.12}, {"start": [177.45, 90.22], "end": [178.65, 90.22], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "D2", "thickness": 0.15, "pos": [184.35, 92.8], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "FANon", "thickness": 0.15, "pos": [184.35, 89.35], "height": 1.0}, {"start": [183.35, 90.35], "end": [186.54999999999998, 90.35], "type": "segment", "width": 0.12}, {"start": [186.54999999999998, 91.85], "end": [183.35, 91.85], "type": "segment", "width": 0.12}, {"start": [186.54999999999998, 91.85], "end": [186.54999999999998, 90.35], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "D1", "thickness": 0.15, "pos": [184.35, 86.8], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "HEATon", "thickness": 0.15, "pos": [184.35, 83.35], "height": 1.0}, {"start": [186.54999999999998, 85.85], "end": [186.54999999999998, 84.35], "type": "segment", "width": 0.12}, {"start": [186.54999999999998, 85.85], "end": [183.35, 85.85], "type": "segment", "width": 0.12}, {"start": [183.35, 84.35], "end": [186.54999999999998, 84.35], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R1", "thickness": 0.15, "pos": [178.04999999999998, 83.39999999999999], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "470", "thickness": 0.15, "pos": [178.04999999999998, 86.85], "height": 1.0}, {"start": [177.45, 84.22], "end": [178.65, 84.22], "type": "segment", "width": 0.12}, {"start": [178.65, 85.97999999999999], "end": [177.45, 85.97999999999999], "type": "segment", "width": 0.12}, {"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "J1", "thickness": 0.13999999999999999, "pos": [152.7, 86.8], "height": 0.7999999999999999}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "power Input", "thickness": 0.15, "pos": [145.29999999999998, 81.89999999999999], "height": 1.0}, {"start": [138.65, 84.05], "end": [138.65, 86.55], "type": "segment", "width": 0.12}, {"start": [141.15, 84.05], "end": [138.65, 84.05], "type": "segment", "width": 0.12}, {"start": [150.79999999999998, 89.55], "end": [145.25, 89.55], "type": "segment", "width": 0.12}, {"start": [150.79999999999998, 86.6], "end": [150.79999999999998, 89.55], "type": "segment", "width": 0.12}, {"start": [151.54999999999998, 86.6], "end": [150.79999999999998, 86.6], "type": "segment", "width": 0.12}, {"start": [139.7, 89.55], "end": [145.25, 89.55], "type": "segment", "width": 0.12}, {"start": [139.7, 86.6], "end": [139.7, 89.55], "type": "segment", "width": 0.12}, {"start": [138.95, 86.6], "end": [139.7, 86.6], "type": "segment", "width": 0.12}, {"start": [151.54999999999998, 84.35], "end": [149.75, 84.35], "type": "segment", "width": 0.12}, {"start": [151.54999999999998, 85.1], "end": [151.54999999999998, 84.35], "type": "segment", "width": 0.12}, {"start": [149.75, 85.1], "end": [151.54999999999998, 85.1], "type": "segment", "width": 0.12}, {"start": [149.75, 84.35], "end": [149.75, 85.1], "type": "segment", "width": 0.12}, {"start": [140.75, 84.35], "end": [138.95, 84.35], "type": "segment", "width": 0.12}, {"start": [140.75, 85.1], "end": [140.75, 84.35], "type": "segment", "width": 0.12}, {"start": [138.95, 85.1], "end": [140.75, 85.1], "type": "segment", "width": 0.12}, {"start": [138.95, 84.35], "end": [138.95, 85.1], "type": "segment", "width": 0.12}, {"start": [148.25, 84.35], "end": [142.25, 84.35], "type": "segment", "width": 0.12}, {"start": [148.25, 85.1], "end": [148.25, 84.35], "type": "segment", "width": 0.12}, {"start": [142.25, 85.1], "end": [148.25, 85.1], "type": "segment", "width": 0.12}, {"start": [142.25, 84.35], "end": [142.25, 85.1], "type": "segment", "width": 0.12}, {"start": [151.54999999999998, 84.35], "end": [138.95, 84.35], "type": "segment", "width": 0.12}, {"start": [151.54999999999998, 90.3], "end": [151.54999999999998, 84.35], "type": "segment", "width": 0.12}, {"start": [138.95, 90.3], "end": [151.54999999999998, 90.3], "type": "segment", "width": 0.12}, {"start": [138.95, 84.35], "end": [138.95, 90.3], "type": "segment", "width": 0.12}, {"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "J2", "thickness": 0.13999999999999999, "pos": [165.1, 87.1], "height": 0.7999999999999999}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "MCUpins", "thickness": 0.15, "pos": [158.9, 81.89999999999999], "height": 1.0}, {"start": [153.54999999999998, 84.05], "end": [153.54999999999998, 86.55], "type": "segment", "width": 0.12}, {"start": [156.04999999999998, 84.05], "end": [153.54999999999998, 84.05], "type": "segment", "width": 0.12}, {"start": [163.2, 89.55], "end": [158.9, 89.55], "type": "segment", "width": 0.12}, {"start": [163.2, 86.6], "end": [163.2, 89.55], "type": "segment", "width": 0.12}, {"start": [163.95, 86.6], "end": [163.2, 86.6], "type": "segment", "width": 0.12}, {"start": [154.6, 89.55], "end": [158.9, 89.55], "type": "segment", "width": 0.12}, {"start": [154.6, 86.6], "end": [154.6, 89.55], "type": "segment", "width": 0.12}, {"start": [153.85, 86.6], "end": [154.6, 86.6], "type": "segment", "width": 0.12}, {"start": [163.95, 84.35], "end": [162.15, 84.35], "type": "segment", "width": 0.12}, {"start": [163.95, 85.1], "end": [163.95, 84.35], "type": "segment", "width": 0.12}, {"start": [162.15, 85.1], "end": [163.95, 85.1], "type": "segment", "width": 0.12}, {"start": [162.15, 84.35], "end": [162.15, 85.1], "type": "segment", "width": 0.12}, {"start": [155.65, 84.35], "end": [153.85, 84.35], "type": "segment", "width": 0.12}, {"start": [155.65, 85.1], "end": [155.65, 84.35], "type": "segment", "width": 0.12}, {"start": [153.85, 85.1], "end": [155.65, 85.1], "type": "segment", "width": 0.12}, {"start": [153.85, 84.35], "end": [153.85, 85.1], "type": "segment", "width": 0.12}, {"start": [160.65, 84.35], "end": [157.15, 84.35], "type": "segment", "width": 0.12}, {"start": [160.65, 85.1], "end": [160.65, 84.35], "type": "segment", "width": 0.12}, {"start": [157.15, 85.1], "end": [160.65, 85.1], "type": "segment", "width": 0.12}, {"start": [157.15, 84.35], "end": [157.15, 85.1], "type": "segment", "width": 0.12}, {"start": [163.95, 84.35], "end": [153.85, 84.35], "type": "segment", "width": 0.12}, {"start": [163.95, 90.3], "end": [163.95, 84.35], "type": "segment", "width": 0.12}, {"start": [153.85, 90.3], "end": [163.95, 90.3], "type": "segment", "width": 0.12}, {"start": [153.85, 84.35], "end": [153.85, 90.3], "type": "segment", "width": 0.12}, {"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "J4", "thickness": 0.13999999999999999, "pos": [175.1, 87.1], "height": 0.7999999999999999}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "fan", "thickness": 0.15, "pos": [170.04999999999998, 81.89999999999999], "height": 1.0}, {"start": [165.95, 84.05], "end": [165.95, 86.55], "type": "segment", "width": 0.12}, {"start": [168.45, 84.05], "end": [165.95, 84.05], "type": "segment", "width": 0.12}, {"start": [173.1, 89.55], "end": [170.04999999999998, 89.55], "type": "segment", "width": 0.12}, {"start": [173.1, 86.6], "end": [173.1, 89.55], "type": "segment", "width": 0.12}, {"start": [173.85, 86.6], "end": [173.1, 86.6], "type": "segment", "width": 0.12}, {"start": [167.0, 89.55], "end": [170.04999999999998, 89.55], "type": "segment", "width": 0.12}, {"start": [167.0, 86.6], "end": [167.0, 89.55], "type": "segment", "width": 0.12}, {"start": [166.25, 86.6], "end": [167.0, 86.6], "type": "segment", "width": 0.12}, {"start": [173.85, 84.35], "end": [172.04999999999998, 84.35], "type": "segment", "width": 0.12}, {"start": [173.85, 85.1], "end": [173.85, 84.35], "type": "segment", "width": 0.12}, {"start": [172.04999999999998, 85.1], "end": [173.85, 85.1], "type": "segment", "width": 0.12}, {"start": [172.04999999999998, 84.35], "end": [172.04999999999998, 85.1], "type": "segment", "width": 0.12}, {"start": [168.04999999999998, 84.35], "end": [166.25, 84.35], "type": "segment", "width": 0.12}, {"start": [168.04999999999998, 85.1], "end": [168.04999999999998, 84.35], "type": "segment", "width": 0.12}, {"start": [166.25, 85.1], "end": [168.04999999999998, 85.1], "type": "segment", "width": 0.12}, {"start": [166.25, 84.35], "end": [166.25, 85.1], "type": "segment", "width": 0.12}, {"start": [170.54999999999998, 84.35], "end": [169.54999999999998, 84.35], "type": "segment", "width": 0.12}, {"start": [170.54999999999998, 85.1], "end": [170.54999999999998, 84.35], "type": "segment", "width": 0.12}, {"start": [169.54999999999998, 85.1], "end": [170.54999999999998, 85.1], "type": "segment", "width": 0.12}, {"start": [169.54999999999998, 84.35], "end": [169.54999999999998, 85.1], "type": "segment", "width": 0.12}, {"start": [173.85, 84.35], "end": [166.25, 84.35], "type": "segment", "width": 0.12}, {"start": [173.85, 90.3], "end": [173.85, 84.35], "type": "segment", "width": 0.12}, {"start": [166.25, 90.3], "end": [173.85, 90.3], "type": "segment", "width": 0.12}, {"start": [166.25, 84.35], "end": [166.25, 90.3], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "R5", "thickness": 0.15, "pos": [156.2, 99.19999999999999], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "4.7k", "thickness": 0.15, "pos": [155.79999999999998, 92.8], "height": 1.0}, {"start": [155.12, 96.55], "end": [155.12, 95.35], "type": "segment", "width": 0.12}, {"start": [156.88, 95.35], "end": [156.88, 96.55], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "Q2", "thickness": 0.15, "pos": [162.460001, 99.16], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "BC517", "thickness": 0.15, "pos": [162.460001, 92.81], "height": 1.0}, {"width": 0.12, "endangle": 225.78482460299193, "start": [162.460001, 95.6], "radius": 2.581182, "startangle": 205.78482460299193, "type": "arc"}, {"width": 0.12, "endangle": 155.0, "start": [162.460001, 95.6], "radius": 2.6, "startangle": 90.0, "type": "arc"}, {"width": 0.12, "endangle": 90.0, "start": [162.460001, 95.6], "radius": 2.6, "startangle": 25.0, "type": "arc"}, {"width": 0.12, "endangle": 334.2151753970081, "start": [162.460001, 95.6], "radius": 2.581182, "startangle": 314.2151753970081, "type": "arc"}, {"start": [164.260001, 93.75], "end": [160.660001, 93.75], "type": "segment", "width": 0.12}, {"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "J3", "thickness": 0.13999999999999999, "pos": [137.7, 86.8], "height": 0.7999999999999999}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "thermistor", "thickness": 0.15, "pos": [132.5, 82.0], "height": 1.0}, {"start": [128.95, 84.35], "end": [128.95, 90.3], "type": "segment", "width": 0.12}, {"start": [128.95, 90.3], "end": [136.54999999999998, 90.3], "type": "segment", "width": 0.12}, {"start": [136.54999999999998, 90.3], "end": [136.54999999999998, 84.35], "type": "segment", "width": 0.12}, {"start": [136.54999999999998, 84.35], "end": [128.95, 84.35], "type": "segment", "width": 0.12}, {"start": [132.25, 84.349999], "end": [132.250001, 85.1], "type": "segment", "width": 0.12}, {"start": [132.250001, 85.1], "end": [133.249999, 85.1], "type": "segment", "width": 0.12}, {"start": [133.249999, 85.1], "end": [133.249999, 84.35], "type": "segment", "width": 0.12}, {"start": [133.249999, 84.35], "end": [132.25, 84.349999], "type": "segment", "width": 0.12}, {"start": [128.95, 84.35], "end": [128.95, 85.1], "type": "segment", "width": 0.12}, {"start": [128.95, 85.1], "end": [130.749999, 85.1], "type": "segment", "width": 0.12}, {"start": [130.749999, 85.1], "end": [130.75, 84.349999], "type": "segment", "width": 0.12}, {"start": [130.75, 84.349999], "end": [128.95, 84.35], "type": "segment", "width": 0.12}, {"start": [134.75, 84.349999], "end": [134.750001, 85.1], "type": "segment", "width": 0.12}, {"start": [134.750001, 85.1], "end": [136.54999999999998, 85.1], "type": "segment", "width": 0.12}, {"start": [136.54999999999998, 85.1], "end": [136.54999999999998, 84.35], "type": "segment", "width": 0.12}, {"start": [136.54999999999998, 84.35], "end": [134.75, 84.349999], "type": "segment", "width": 0.12}, {"start": [128.95, 86.6], "end": [129.7, 86.6], "type": "segment", "width": 0.12}, {"start": [129.7, 86.6], "end": [129.7, 89.55], "type": "segment", "width": 0.12}, {"start": [129.7, 89.55], "end": [132.75, 89.55], "type": "segment", "width": 0.12}, {"start": [136.54999999999998, 86.6], "end": [135.79999999999998, 86.6], "type": "segment", "width": 0.12}, {"start": [135.79999999999998, 86.6], "end": [135.79999999999998, 89.55], "type": "segment", "width": 0.12}, {"start": [135.79999999999998, 89.55], "end": [132.75, 89.55], "type": "segment", "width": 0.12}, {"start": [131.15, 84.05], "end": [128.65, 84.05], "type": "segment", "width": 0.12}, {"start": [128.65, 84.05], "end": [128.65, 86.55], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "Q1", "thickness": 0.15, "pos": [145.26, 99.06], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "BC517", "thickness": 0.15, "pos": [145.26, 92.71], "height": 1.0}, {"width": 0.12, "endangle": 225.78482460299193, "start": [145.26, 95.5], "radius": 2.581182, "startangle": 205.78482460299193, "type": "arc"}, {"width": 0.12, "endangle": 155.0, "start": [145.26, 95.5], "radius": 2.6, "startangle": 90.0, "type": "arc"}, {"width": 0.12, "endangle": 90.0, "start": [145.26, 95.5], "radius": 2.6, "startangle": 25.0, "type": "arc"}, {"width": 0.12, "endangle": 334.2151753970081, "start": [145.26, 95.5], "radius": 2.581182, "startangle": 314.2151753970081, "type": "arc"}, {"start": [147.06, 93.64999999999999], "end": [143.45999999999998, 93.64999999999999], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "R3", "thickness": 0.15, "pos": [151.1, 99.3], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "4.7", "thickness": 0.15, "pos": [150.9, 92.7], "height": 1.0}, {"start": [151.88, 95.35], "end": [151.88, 96.55], "type": "segment", "width": 0.12}, {"start": [150.12, 96.55], "end": [150.12, 95.35], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "R4", "thickness": 0.15, "pos": [136.2, 98.89999999999999], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "1k", "thickness": 0.15, "pos": [136.2, 92.3], "height": 1.0}, {"start": [137.13, 94.89999999999999], "end": [137.13, 96.1], "type": "segment", "width": 0.12}, {"start": [135.37, 96.1], "end": [135.37, 94.89999999999999], "type": "segment", "width": 0.12}, {"angle": [0.0], "type": "polygon", "pos": [123.19, 98.044], "polygons": [[[-3.231114, 2.584505], [-3.1564609999999997, 2.621727], [-3.090569, 2.690261], [-3.0724229999999997, 2.715648], [-3.0526549999999997, 2.748866], [-3.039828, 2.784945], [-3.0324899999999997, 2.8330979999999997], [-3.029187, 2.902536], [-3.0284619999999998, 2.9942059999999997], [-3.0317369999999997, 3.11983], [-3.043123, 3.2141539999999997], [-3.064959, 3.2845229999999996], [-3.0995809999999997, 3.3382859999999996], [-3.14933, 3.3827879999999997], [-3.152986, 3.385423], [-3.202015, 3.4123769999999998], [-3.261055, 3.425712], [-3.336141, 3.429], [-3.458205, 3.429], [-3.458256, 3.547497], [-3.459392, 3.613492], [-3.4663139999999997, 3.652202], [-3.4844019999999998, 3.6754189999999998], [-3.5190379999999997, 3.694933], [-3.527355, 3.6989199999999998], [-3.56628, 3.717603], [-3.5964169999999998, 3.729403], [-3.618826, 3.730422], [-3.6345669999999997, 3.716761], [-3.644698, 3.684522], [-3.650277, 3.629804], [-3.6523649999999996, 3.548711], [-3.6520189999999997, 3.437344], [-3.6502999999999997, 3.2918019999999997], [-3.6497629999999996, 3.248269], [-3.6478279999999996, 3.0982049999999997], [-3.646096, 3.0000419999999997], [-3.4583079999999997, 3.0000419999999997], [-3.457252, 3.083364], [-3.452562, 3.13788], [-3.4419489999999997, 3.173837], [-3.4231279999999997, 3.201482], [-3.4103499999999998, 3.214965], [-3.35811, 3.2544169999999997], [-3.311858, 3.257628], [-3.2641329999999997, 3.225049], [-3.262923, 3.223846], [-3.243506, 3.198668], [-3.231693, 3.164447], [-3.225735, 3.111748], [-3.22388, 3.031131], [-3.223846, 3.013271], [-3.2283299999999997, 2.9021749999999997], [-3.2429259999999998, 2.825161], [-3.2693499999999998, 2.7781469999999997], [-3.309317, 2.75705], [-3.332416, 2.754923], [-3.387238, 2.7649], [-3.424842, 2.797752], [-3.4474769999999997, 2.857857], [-3.457394, 2.949598], [-3.4583079999999997, 3.0000419999999997], [-3.646096, 3.0000419999999997], [-3.645778, 2.9820599999999997], [-3.643127, 2.894679], [-3.639394, 2.830905], [-3.634093, 2.785582], [-3.6267419999999997, 2.753555], [-3.616857, 2.7296679999999998], [-3.603954, 2.708764], [-3.5984209999999996, 2.700898], [-3.525031, 2.626595], [-3.4322399999999997, 2.584467], [-3.3249039999999996, 2.5727219999999997], [-3.231114, 2.584505]]]}, {"angle": [0.0], "type": "polygon", "pos": [123.19, 98.044], "polygons": [[[-1.7283359999999999, 2.5950889999999998], [-1.665633, 2.631358], [-1.622039, 2.6673579999999997], [-1.590155, 2.705075], [-1.56819, 2.7511989999999997], [-1.554351, 2.812421], [-1.5468469999999999, 2.895431], [-1.543883, 3.006919], [-1.543539, 3.087062], [-1.543539, 3.382065], [-1.7096149999999999, 3.456515], [-1.719385, 3.133402], [-1.7234209999999999, 3.0127289999999998], [-1.7276559999999999, 2.925141], [-1.7329029999999999, 2.8646499999999997], [-1.7399749999999998, 2.825268], [-1.7496889999999998, 2.801007], [-1.762856, 2.7858799999999997], [-1.767081, 2.782606], [-1.831091, 2.757034], [-1.895792, 2.767153], [-1.934308, 2.794], [-1.949975, 2.813024], [-1.96082, 2.8379879999999997], [-1.967712, 2.875834], [-1.9715209999999999, 2.933502], [-1.973117, 3.017935], [-1.973385, 3.105928], [-1.9734369999999999, 3.216323], [-1.975328, 3.294463], [-1.981655, 3.347165], [-1.9950169999999998, 3.381242], [-2.018015, 3.403511], [-2.053246, 3.420787], [-2.100303, 3.438738], [-2.151697, 3.458278], [-2.1455789999999997, 3.111485], [-2.143116, 2.986468], [-2.140233, 2.894082], [-2.1361019999999997, 2.827881], [-2.129893, 2.78142], [-2.120774, 2.748256], [-2.107917, 2.7219439999999997], [-2.092416, 2.6987289999999997], [-2.017629, 2.6245689999999997], [-1.926372, 2.581684], [-1.8271169999999999, 2.571412], [-1.7283359999999999, 2.5950889999999998]]]}, {"angle": [0.0], "type": "polygon", "pos": [123.19, 98.044], "polygons": [[[-3.9831139999999996, 2.587256], [-3.891536, 2.6354089999999997], [-3.8239509999999997, 2.7129049999999997], [-3.799943, 2.762727], [-3.781262, 2.837533], [-3.771699, 2.9320519999999997], [-3.7707919999999997, 3.0352099999999997], [-3.778079, 3.135935], [-3.793097, 3.223153], [-3.815385, 3.2857909999999997], [-3.8222349999999996, 3.296579], [-3.903368, 3.377105], [-3.9997339999999997, 3.4253359999999997], [-4.104299, 3.43945], [-4.210032, 3.417629], [-4.239457, 3.404547], [-4.296759, 3.3642309999999997], [-4.347049999999999, 3.310775], [-4.351802999999999, 3.303995], [-4.371122, 3.271321], [-4.3838919999999995, 3.2363939999999998], [-4.391436, 3.1904139999999996], [-4.3950759999999995, 3.124584], [-4.396135, 3.030105], [-4.396154, 3.008923], [-4.396106, 3.002182], [-4.200769, 3.002182], [-4.199632, 3.0913489999999997], [-4.195158999999999, 3.1505199999999998], [-4.185754, 3.188741], [-4.169824, 3.2150529999999997], [-4.1616919999999995, 3.223846], [-4.114942, 3.2572609999999997], [-4.069553, 3.255737], [-4.02366, 3.226752], [-3.996288, 3.1958089999999997], [-3.9800769999999996, 3.1506429999999996], [-3.970974, 3.07942], [-3.9703489999999997, 3.0711139999999997], [-3.9687959999999998, 2.942037], [-3.985035, 2.8461719999999997], [-4.018848, 2.7841069999999997], [-4.070016, 2.7564319999999998], [-4.08828, 2.754923], [-4.13624, 2.7625129999999998], [-4.169047, 2.788808], [-4.189105, 2.839095], [-4.198822, 2.9186639999999997], [-4.200769, 3.002182], [-4.396106, 3.002182], [-4.395426, 2.908249], [-4.392371, 2.837906], [-4.3856779999999995, 2.789163], [-4.37404, 2.753288], [-4.356147, 2.721548], [-4.352192, 2.715648], [-4.285733, 2.636104], [-4.213315, 2.5899289999999997], [-4.125151, 2.571599], [-4.095213, 2.570703], [-3.9831139999999996, 2.587256]]]}, {"angle": [0.0], "type": "polygon", "pos": [123.19, 98.044], "polygons": [[[-2.4657459999999998, 2.599745], [-2.388714, 2.651567], [-2.3291839999999997, 2.726412], [-2.293622, 2.8216539999999997], [-2.286429, 2.891756], [-2.287246, 2.9210089999999997], [-2.294086, 2.9434069999999997], [-2.312888, 2.9634739999999997], [-2.349592, 2.9857329999999997], [-2.410138, 3.014709], [-2.500466, 3.0549269999999997], [-2.500923, 3.055129], [-2.5840669999999997, 3.09321], [-2.652247, 3.1270249999999997], [-2.698495, 3.152933], [-2.715842, 3.1672949999999997], [-2.715846, 3.167411], [-2.700557, 3.198685], [-2.6648039999999997, 3.233157], [-2.623758, 3.25799], [-2.602963, 3.262923], [-2.54623, 3.245862], [-2.497373, 3.203133], [-2.473535, 3.156155], [-2.450603, 3.1215219999999997], [-2.405682, 3.082081], [-2.352877, 3.048009], [-2.3062899999999997, 3.02948], [-2.296548, 3.0284619999999998], [-2.285582, 3.045215], [-2.2849209999999998, 3.0880389999999998], [-2.29298, 3.145781], [-2.308173, 3.207289], [-2.3289139999999997, 3.261409], [-2.329962, 3.2635099999999997], [-2.392379, 3.35066], [-2.473274, 3.409939], [-2.565144, 3.439034], [-2.660487, 3.435634], [-2.751802, 3.3974279999999997], [-2.755862, 3.394741], [-2.8276939999999997, 3.3296419999999998], [-2.874927, 3.2447049999999997], [-2.9010659999999997, 3.133021], [-2.9045739999999998, 3.1016429999999997], [-2.910787, 2.9535359999999997], [-2.903339, 2.884468], [-2.715846, 2.884468], [-2.7134099999999997, 2.927552], [-2.7000859999999998, 2.940126], [-2.666868, 2.930719], [-2.614506, 2.908483], [-2.555976, 2.88061], [-2.554521, 2.8798719999999998], [-2.504911, 2.853777], [-2.485, 2.836363], [-2.48991, 2.818107], [-2.5105839999999997, 2.79412], [-2.5631809999999997, 2.759406], [-2.619823, 2.756856], [-2.6706309999999998, 2.782119], [-2.705724, 2.830847], [-2.715846, 2.884468], [-2.903339, 2.884468], [-2.898008, 2.8350359999999997], [-2.8652219999999997, 2.741055], [-2.819579, 2.6752149999999997], [-2.737198, 2.608681], [-2.646454, 2.575676], [-2.5538149999999997, 2.5735729999999997], [-2.4657459999999998, 2.599745]]]}, {"angle": [0.0], "type": "polygon", "pos": [123.19, 98.044], "polygons": [[[-0.840154, 2.49212], [-0.834428, 2.57198], [-0.827851, 2.619039], [-0.818738, 2.639566], [-0.805402, 2.6398289999999998], [-0.8010769999999999, 2.637378], [-0.743556, 2.619636], [-0.668732, 2.620672], [-0.592661, 2.63891], [-0.545082, 2.662505], [-0.49629799999999996, 2.700198], [-0.460636, 2.742855], [-0.43615499999999996, 2.7970569999999997], [-0.420913, 2.8693839999999997], [-0.41297, 2.9664189999999997], [-0.41038399999999997, 3.0947419999999997], [-0.410338, 3.119358], [-0.410308, 3.39587], [-0.47183899999999995, 3.4173199999999997], [-0.515541, 3.4319119999999996], [-0.5395179999999999, 3.438706], [-0.540223, 3.4387689999999997], [-0.542585, 3.4203449999999997], [-0.544594, 3.369526], [-0.546099, 3.292993], [-0.546947, 3.1974299999999998], [-0.5470769999999999, 3.139329], [-0.547349, 3.024771], [-0.548748, 2.9426669999999997], [-0.552151, 2.886393], [-0.558433, 2.849326], [-0.568471, 2.8248439999999997], [-0.583139, 2.8063249999999997], [-0.592298, 2.797406], [-0.655211, 2.761466], [-0.723864, 2.758775], [-0.786152, 2.78917], [-0.797671, 2.800144], [-0.8145669999999999, 2.820779], [-0.826286, 2.845256], [-0.8337669999999999, 2.8806469999999997], [-0.837946, 2.934026], [-0.8397629999999999, 3.012466], [-0.840154, 3.1206169999999998], [-0.840154, 3.39587], [-0.901685, 3.4173199999999997], [-0.945387, 3.4319119999999996], [-0.969364, 3.438706], [-0.97007, 3.4387689999999997], [-0.9718739999999999, 3.420069], [-0.9734999999999999, 3.3673219999999997], [-0.9748829999999999, 3.285557], [-0.975958, 3.179805], [-0.97666, 3.055094], [-0.976923, 2.916455], [-0.976923, 2.381806], [-0.849923, 2.328236], [-0.840154, 2.49212]]]}, {"angle": [0.0], "type": "polygon", "pos": [123.19, 98.044], "polygons": [[[0.053501, 2.626303], [0.13005999999999998, 2.654733], [0.130936, 2.6552789999999997], [0.178285, 2.690127], [0.21324099999999999, 2.730852], [0.23782499999999998, 2.783925], [0.254062, 2.855814], [0.263975, 2.952992], [0.269586, 3.081928], [0.270077, 3.100298], [0.27714099999999997, 3.377287], [0.217695, 3.408028], [0.174681, 3.4288019999999997], [0.14870999999999998, 3.438646], [0.147509, 3.4387689999999997], [0.143014, 3.420606], [0.13944399999999998, 3.371612], [0.13724799999999998, 3.3000309999999997], [0.136769, 3.2420679999999997], [0.136758, 3.14817], [0.132466, 3.089203], [0.117503, 3.061079], [0.085482, 3.059706], [0.030014, 3.0809979999999997], [-0.053731, 3.120136], [-0.115311, 3.152643], [-0.146983, 3.1808449999999997], [-0.156294, 3.211582], [-0.156308, 3.213104], [-0.14094299999999998, 3.266054], [-0.095453, 3.29466], [-0.025834, 3.298803], [0.024312999999999998, 3.298084], [0.050754, 3.3125269999999998], [0.067243, 3.347218], [0.076733, 3.391416], [0.063057, 3.416493], [0.057907, 3.420082], [0.009425, 3.4344959999999998], [-0.058469, 3.436537], [-0.128388, 3.426983], [-0.17793199999999998, 3.409522], [-0.24642999999999998, 3.351364], [-0.285366, 3.2704079999999998], [-0.293077, 3.20716], [-0.287193, 3.150111], [-0.265899, 3.103542], [-0.223735, 3.062181], [-0.155241, 3.020755], [-0.054956, 2.9739929999999997], [-0.048846, 2.9713499999999997], [0.04149, 2.929617], [0.097235, 2.895391], [0.121129, 2.864635], [0.11591299999999999, 2.8333109999999997], [0.084328, 2.797383], [0.07488299999999999, 2.789116], [0.011616999999999999, 2.757058], [-0.053936, 2.758407], [-0.111028, 2.789838], [-0.14890699999999998, 2.8480239999999997], [-0.152426, 2.8594459999999997], [-0.1867, 2.914837], [-0.23019099999999998, 2.941518], [-0.293077, 2.9679599999999997], [-0.293077, 2.899548], [-0.27394799999999997, 2.8001099999999997], [-0.217169, 2.7089019999999997], [-0.18762199999999998, 2.6783889999999997], [-0.120458, 2.6392279999999997], [-0.035044, 2.6214999999999997], [0.053501, 2.626303]]]}, {"angle": [0.0], "type": "polygon", "pos": [123.19, 98.044], "polygons": [[[0.7133619999999999, 2.62467], [0.802117, 2.657421], [0.874022, 2.71535], [0.902144, 2.756128], [0.9328019999999999, 2.8309539999999997], [0.9321649999999999, 2.885058], [0.899987, 2.921446], [0.888081, 2.9276329999999997], [0.836675, 2.946925], [0.810422, 2.941982], [0.80153, 2.9095869999999997], [0.8010769999999999, 2.891692], [0.784797, 2.825859], [0.7423649999999999, 2.779807], [0.683388, 2.757564], [0.617475, 2.7631609999999998], [0.5638949999999999, 2.792229], [0.545798, 2.80881], [0.532971, 2.828925], [0.5243059999999999, 2.8593319999999998], [0.5186959999999999, 2.9067879999999997], [0.515035, 2.97805], [0.512215, 3.079875], [0.5114839999999999, 3.1121149999999997], [0.5088199999999999, 3.22241], [0.505792, 3.300036], [0.50125, 3.351396], [0.494046, 3.3828899999999997], [0.483033, 3.4009199999999997], [0.46706, 3.411888], [0.45683399999999996, 3.416733], [0.413406, 3.4333009999999997], [0.38784199999999996, 3.4387689999999997], [0.379395, 3.4205069999999997], [0.374239, 3.365296], [0.372346, 3.272499], [0.373689, 3.1414779999999998], [0.37410699999999997, 3.121269], [0.377058, 3.0017329999999998], [0.380548, 2.914449], [0.38551399999999997, 2.852591], [0.392893, 2.809336], [0.403624, 2.77786], [0.418645, 2.7513389999999998], [0.426502, 2.739975], [0.471553, 2.689692], [0.52194, 2.650581], [0.528108, 2.647167], [0.618458, 2.620212], [0.7133619999999999, 2.62467]]]}, {"angle": [0.0], "type": "polygon", "pos": [123.19, 98.044], "polygons": [[[1.6020809999999999, 2.780289], [1.6018329999999998, 2.92632], [1.6008719999999999, 3.038655], [1.5987939999999998, 3.122678], [1.5951929999999999, 3.183769], [1.5896649999999999, 3.227309], [1.581804, 3.258679], [1.571207, 3.2832619999999997], [1.5631819999999998, 3.297294], [1.4967279999999998, 3.373388], [1.41247, 3.421084], [1.319249, 3.438199], [1.2259, 3.4225459999999996], [1.170312, 3.394418], [1.1119569999999999, 3.34576], [1.0721859999999999, 3.286333], [1.04819, 3.208507], [1.037161, 3.1046519999999997], [1.035599, 3.0284619999999998], [1.035809, 3.022986], [1.172308, 3.022986], [1.173141, 3.1103549999999998], [1.176961, 3.168192], [1.185746, 3.206029], [1.201474, 3.2333979999999998], [1.2202659999999999, 3.2540419999999997], [1.283375, 3.2938899999999998], [1.351137, 3.2972949999999996], [1.415179, 3.2640249999999997], [1.420164, 3.2595169999999998], [1.441439, 3.236067], [1.454779, 3.208166], [1.4620009999999999, 3.166641], [1.464923, 3.102316], [1.465385, 3.0311999999999997], [1.464383, 2.941858], [1.460238, 2.8822579999999998], [1.451236, 2.843089], [1.435667, 2.8150399999999998], [1.422902, 2.800144], [1.3636, 2.762575], [1.295301, 2.758057], [1.23011, 2.786753], [1.217528, 2.797406], [1.196111, 2.8210629999999997], [1.182744, 2.8492509999999998], [1.1755659999999999, 2.891245], [1.1727189999999998, 2.9563189999999997], [1.172308, 3.022986], [1.035809, 3.022986], [1.040322, 2.9057649999999997], [1.056362, 2.813577], [1.086528, 2.744269], [1.133629, 2.6902109999999997], [1.170312, 2.662505], [1.23699, 2.6325719999999997], [1.3142719999999999, 2.618678], [1.38611, 2.622397], [1.426308, 2.6374], [1.4420819999999999, 2.64167], [1.45255, 2.62575], [1.459856, 2.5830889999999997], [1.465385, 2.518106], [1.4714369999999999, 2.445732], [1.479844, 2.402187], [1.4951409999999998, 2.377287], [1.5218639999999999, 2.360845], [1.538654, 2.353564], [1.6021539999999999, 2.326963], [1.6020809999999999, 2.780289]]]}, {"angle": [0.0], "type": "polygon", "pos": [123.19, 98.044], "polygons": [[[2.3959289999999998, 2.636662], [2.398911, 2.688068], [2.4012469999999997, 2.7661919999999998], [2.402749, 2.8648569999999998], [2.403231, 2.968343], [2.403231, 3.318533], [2.341401, 3.380363], [2.298793, 3.418462], [2.26139, 3.4338949999999997], [2.21027, 3.432918], [2.189978, 3.430433], [2.126554, 3.4232], [2.074095, 3.4190549999999997], [2.061308, 3.418672], [2.018199, 3.421176], [1.9565439999999998, 3.427462], [1.9326379999999999, 3.430433], [1.8739219999999999, 3.435028], [1.8344639999999999, 3.425046], [1.7953379999999999, 3.394228], [1.781215, 3.380363], [1.719385, 3.318533], [1.719385, 2.663503], [1.76915, 2.640829], [1.812002, 2.624034], [1.837073, 2.618154], [1.8435009999999998, 2.636736], [1.8495089999999998, 2.688655], [1.8546969999999998, 2.768172], [1.8586639999999999, 2.8695459999999997], [1.860577, 2.955192], [1.865923, 3.2922309999999997], [1.9125599999999998, 3.298825], [1.9549759999999998, 3.2942139999999998], [1.97576, 3.279287], [1.9815699999999998, 3.2513769999999997], [1.98653, 3.191925], [1.990246, 3.108466], [1.992324, 3.0085319999999998], [1.992624, 2.9571039999999997], [1.992923, 2.661054], [2.054454, 2.639604], [2.098004, 2.6250199999999997], [2.1216939999999997, 2.618219], [2.1223769999999997, 2.618154], [2.124754, 2.6366419999999997], [2.127366, 2.687906], [2.129995, 2.765649], [2.132421, 2.863574], [2.134115, 2.955192], [2.139461, 3.2922309999999997], [2.2566919999999997, 3.2922309999999997], [2.262072, 2.984746], [2.267451, 2.6772609999999997], [2.324601, 2.647707], [2.366797, 2.6274129999999998], [2.3917699999999997, 2.618204], [2.3924909999999997, 2.618154], [2.3959289999999998, 2.636662]]]}, {"angle": [0.0], "type": "polygon", "pos": [123.19, 98.044], "polygons": [[[2.887333, 2.633528], [2.94359, 2.6591169999999997], [2.9877469999999997, 2.690124], [3.020101, 2.724795], [3.0424379999999998, 2.76952], [3.056546, 2.830692], [3.064211, 2.914701], [3.06722, 3.02794], [3.067538, 3.102509], [3.067538, 3.39342], [3.017773, 3.416095], [2.978576, 3.432667], [2.959157, 3.4387689999999997], [2.9554419999999997, 3.42061], [2.952495, 3.371648], [2.950691, 3.300153], [2.9503079999999997, 3.243385], [2.948661, 3.161371], [2.944222, 3.0963089999999998], [2.93774, 3.056467], [2.93259, 3.048], [2.897977, 3.0566459999999998], [2.8436399999999997, 3.078823], [2.780722, 3.108886], [2.7203679999999997, 3.1411919999999998], [2.673721, 3.170098], [2.651926, 3.189961], [2.651839, 3.190175], [2.653714, 3.2269349999999997], [2.670525, 3.2620259999999996], [2.700039, 3.2905279999999997], [2.7431159999999997, 3.300061], [2.779932, 3.29895], [2.832074, 3.298133], [2.859444, 3.310349], [2.875882, 3.342624], [2.877955, 3.3487099999999996], [2.885081, 3.394739], [2.866024, 3.422687], [2.816353, 3.436007], [2.7626969999999997, 3.4384699999999997], [2.666142, 3.42021], [2.6161589999999997, 3.394131], [2.554429, 3.332868], [2.52169, 3.25767], [2.518753, 3.1782109999999997], [2.546424, 3.104167], [2.588047, 3.057769], [2.629604, 3.031793], [2.694922, 2.998907], [2.771038, 2.965557], [2.7837259999999997, 2.960461], [2.867333, 2.923565], [2.91553, 2.891046], [2.93103, 2.858718], [2.91655, 2.822394], [2.891692, 2.794], [2.8329389999999997, 2.759039], [2.768293, 2.756417], [2.709008, 2.7833579999999998], [2.666339, 2.837088], [2.660739, 2.8509499999999997], [2.628133, 2.901936], [2.58053, 2.939787], [2.520461, 2.97085], [2.520461, 2.882768], [2.523997, 2.828951], [2.5391559999999997, 2.786534], [2.572768, 2.741279], [2.605035, 2.70642], [2.6552089999999997, 2.657062], [2.694193, 2.630547], [2.736064, 2.619911], [2.78346, 2.618154], [2.887333, 2.633528]]]}, {"angle": [0.0], "type": "polygon", "pos": [123.19, 98.044], "polygons": [[[3.570807, 2.6367819999999997], [3.5941609999999997, 2.646988], [3.649902, 2.691134], [3.6975689999999997, 2.7549669999999997], [3.727048, 2.8230869999999997], [3.731846, 2.85667], [3.71576, 2.903556], [3.680475, 2.928365], [3.6426439999999998, 2.943387], [3.625321, 2.946155], [3.616886, 2.926066], [3.60023, 2.882351], [3.592923, 2.8625979999999998], [3.551948, 2.7942709999999997], [3.492622, 2.760191], [3.416552, 2.7612389999999998], [3.4109179999999997, 2.762581], [3.3703049999999997, 2.7818359999999998], [3.340448, 2.819375], [3.320055, 2.879809], [3.307836, 2.967751], [3.3024999999999998, 3.0878129999999997], [3.302, 3.1516979999999997], [3.301752, 3.2524029999999997], [3.3001259999999997, 3.3210539999999997], [3.295801, 3.364673], [3.287454, 3.390282], [3.273765, 3.404903], [3.253411, 3.415558], [3.252234, 3.416095], [3.213038, 3.432667], [3.193619, 3.4387689999999997], [3.190635, 3.4203189999999997], [3.188081, 3.369323], [3.18614, 3.292308], [3.1849969999999996, 3.195805], [3.1847689999999997, 3.125184], [3.1859319999999998, 2.9885249999999997], [3.190479, 2.884851], [3.199999, 2.808108], [3.216081, 2.752246], [3.240313, 2.7112119999999997], [3.274286, 2.678954], [3.307833, 2.65644], [3.388499, 2.626476], [3.4823809999999997, 2.6197179999999998], [3.570807, 2.6367819999999997]]]}, {"angle": [0.0], "type": "polygon", "pos": [123.19, 98.044], "polygons": [[[4.245223999999999, 2.6478379999999997], [4.322528, 2.698361], [4.359814, 2.7435899999999998], [4.389353, 2.825663], [4.391699, 2.8906069999999997], [4.386385, 2.977445], [4.186115, 3.0651029999999997], [4.0887389999999995, 3.109887], [4.025113, 3.1459129999999997], [3.9920289999999996, 3.177117], [3.98628, 3.207436], [4.004658, 3.240805], [4.024923, 3.262923], [4.083889, 3.298393], [4.1480239999999995, 3.3008789999999997], [4.206926, 3.2732349999999997], [4.250197, 3.21832], [4.257936, 3.198928], [4.295006, 3.1383639999999997], [4.337654, 3.112552], [4.396154, 3.090471], [4.396154, 3.174184], [4.390982, 3.23115], [4.370723, 3.2791889999999997], [4.328262, 3.334346], [4.321950999999999, 3.3415139999999997], [4.274719999999999, 3.3905849999999997], [4.234121, 3.4169199999999997], [4.1833279999999995, 3.429035], [4.14122, 3.433003], [4.0659019999999995, 3.433991], [4.012286, 3.4214659999999997], [3.9788379999999997, 3.402869], [3.926268, 3.3619749999999997], [3.8898789999999996, 3.317748], [3.86685, 3.262126], [3.8543589999999996, 3.1870469999999997], [3.8495869999999996, 3.0844489999999998], [3.8492059999999997, 3.0323759999999997], [3.850501, 2.969948], [3.9684709999999996, 2.969948], [3.969839, 3.003438], [3.973249, 3.008923], [3.9957529999999997, 3.0014719999999997], [4.044182, 2.981753], [4.108908, 2.953718], [4.122443, 2.947692], [4.204244, 2.906096], [4.249312, 2.869538], [4.259217, 2.835296], [4.235526, 2.800648], [4.21596, 2.785339], [4.14536, 2.754721], [4.07928, 2.7597799999999997], [4.023959, 2.797151], [3.985636, 2.863473], [3.973349, 2.9161159999999997], [3.9684709999999996, 2.969948], [3.850501, 2.969948], [3.85173, 2.91072], [3.861032, 2.82071], [3.87946, 2.7551669999999997], [3.90936, 2.706912], [3.95308, 2.668767], [3.9721409999999997, 2.65644], [4.058726, 2.624336], [4.153522, 2.622316], [4.245223999999999, 2.6478379999999997]]]}, {"angle": [0.0], "type": "polygon", "pos": [123.19, 98.044], "polygons": [[[0.139878, -3.712224], [0.245612, -3.711645], [0.322132, -3.7100779999999998], [0.374372, -3.7070279999999998], [0.407263, -3.7020039999999996], [0.425737, -3.694511], [0.434727, -3.684056], [0.43916299999999997, -3.670147], [0.439594, -3.6683459999999997], [0.446333, -3.635855], [0.458808, -3.571748], [0.475719, -3.482849], [0.49577099999999996, -3.375981], [0.517664, -3.257967], [0.518429, -3.253822], [0.5403589999999999, -3.138169], [0.560877, -3.035986], [0.5786589999999999, -2.953402], [0.5923809999999999, -2.896544], [0.600718, -2.871542], [0.601116, -2.871099], [0.6256769999999999, -2.8588899999999997], [0.676315, -2.8385439999999997], [0.742095, -2.8144549999999997], [0.7424609999999999, -2.814326], [0.825317, -2.783182], [0.9229999999999999, -2.743509], [1.015077, -2.7036189999999998], [1.019434, -2.701647], [1.1694069999999999, -2.63358], [1.501498, -2.8603609999999997], [1.6033739999999999, -2.929496], [1.695657, -2.991303], [1.7730029999999999, -3.042267], [1.830064, -3.0788729999999997], [1.861495, -3.097606], [1.864479, -3.0989959999999996], [1.8873209999999998, -3.09281], [1.9299819999999999, -3.0629649999999997], [1.994128, -3.008053], [2.0814209999999997, -2.926666], [2.170535, -2.8400779999999997], [2.2564409999999997, -2.754753], [2.3333269999999997, -2.676892], [2.3965639999999997, -2.611303], [2.441523, -2.562795], [2.4635759999999998, -2.536175], [2.464396, -2.534805], [2.466834, -2.516537], [2.4576499999999997, -2.4867049999999997], [2.434574, -2.4412789999999998], [2.395337, -2.37623], [2.3376699999999997, -2.28753], [2.260795, -2.173343], [2.19257, -2.072838], [2.131582, -1.982697], [2.081356, -1.908151], [2.045416, -1.8544349999999998], [2.027287, -1.826782], [2.026146, -1.824905], [2.028359, -1.7984099999999998], [2.045138, -1.7469139999999999], [2.073142, -1.680149], [2.083122, -1.658828], [2.126672, -1.563841], [2.173134, -1.4560629999999999], [2.210877, -1.362808], [2.238073, -1.293594], [2.259675, -1.240994], [2.2721579999999997, -1.213503], [2.2737089999999998, -1.211384], [2.296668, -1.207876], [2.350786, -1.198262], [2.428868, -1.183911], [2.523719, -1.166193], [2.6281429999999997, -1.146475], [2.734944, -1.126126], [2.836926, -1.106514], [2.926894, -1.089009], [2.9976529999999997, -1.074978], [3.0420059999999998, -1.065791], [3.052885, -1.063193], [3.064122, -1.0567819999999999], [3.072605, -1.042303], [3.0787139999999997, -1.014867], [3.082832, -0.9695889999999999], [3.0853409999999997, -0.9015799999999999], [3.086621, -0.8059529999999999], [3.0870539999999997, -0.67782], [3.087077, -0.6252989999999999], [3.087077, -0.198155], [2.9844999999999997, -0.17790899999999998], [2.927431, -0.16693], [2.842269, -0.15090499999999998], [2.739372, -0.131767], [2.629096, -0.11144899999999999], [2.5986149999999997, -0.10586799999999999], [2.496855, -0.08608299999999999], [2.4082049999999997, -0.06662699999999999], [2.340108, -0.049303], [2.300004, -0.035912], [2.293323, -0.031921], [2.276919, -0.003658], [2.253399, 0.051108999999999995], [2.227316, 0.12158799999999999], [2.222142, 0.136769], [2.187956, 0.230896], [2.145523, 0.337101], [2.103997, 0.432473], [2.103792, 0.43291599999999997], [2.03464, 0.582525], [2.489512, 1.251617], [2.1975, 1.5441159999999998], [2.10918, 1.63117], [2.028625, 1.707909], [1.9603599999999999, 1.7702369999999998], [1.9089079999999998, 1.814056], [1.8787939999999999, 1.83527], [1.874474, 1.836616], [1.849111, 1.8260159999999999], [1.797358, 1.796547], [1.7248679999999998, 1.7517049999999998], [1.637294, 1.6949839999999998], [1.5426119999999999, 1.631462], [1.446516, 1.566668], [1.3608369999999999, 1.510287], [1.291016, 1.4657879999999999], [1.242494, 1.436639], [1.220782, 1.426308], [1.194293, 1.43505], [1.144062, 1.458087], [1.080451, 1.490631], [1.0737079999999999, 1.494249], [0.988046, 1.53721], [0.929306, 1.558279], [0.892772, 1.558503], [0.8737309999999999, 1.5389279999999999], [0.87362, 1.538654], [0.8641019999999999, 1.515472], [0.841403, 1.4604409999999999], [0.8072819999999999, 1.3778219999999999], [0.7635, 1.271872], [0.711816, 1.146852], [0.653992, 1.00702], [0.5979909999999999, 0.871637], [0.536447, 0.7222339999999999], [0.479939, 0.583832], [0.43016099999999996, 0.460673], [0.388806, 0.357002], [0.357568, 0.277059], [0.33814099999999997, 0.22508799999999998], [0.332154, 0.20569199999999999], [0.347168, 0.183443], [0.386439, 0.147982], [0.438807, 0.108887], [0.5879409999999999, -0.014754999999999999], [0.704511, -0.156478], [0.787118, -0.31329599999999996], [0.8343659999999999, -0.48222499999999996], [0.844857, -0.6602779999999999], [0.837231, -0.7424609999999999], [0.795682, -0.9129689999999999], [0.724123, -1.0635409999999998], [0.626995, -1.192691], [0.508734, -1.2989359999999999], [0.37378, -1.38079], [0.226571, -1.436768], [0.071544, -1.465385], [-0.086861, -1.465156], [-0.24420599999999998, -1.4345949999999998], [-0.39605399999999996, -1.372218], [-0.537965, -1.27654], [-0.597197, -1.2224279999999998], [-0.710797, -1.08348], [-0.789894, -0.931639], [-0.8350139999999999, -0.7713329999999999], [-0.846684, -0.606988], [-0.8254309999999999, -0.443029], [-0.7717799999999999, -0.28388199999999997], [-0.68626, -0.13397499999999998], [-0.569395, 0.002267], [-0.438807, 0.108887], [-0.384412, 0.149642], [-0.34598599999999996, 0.184718], [-0.332154, 0.205726], [-0.339397, 0.22863499999999998], [-0.359995, 0.283365], [-0.392254, 0.365672], [-0.434479, 0.471315], [-0.484977, 0.59605], [-0.542052, 0.735636], [-0.598146, 0.87167], [-0.660033, 1.021201], [-0.717356, 1.159767], [-0.7683559999999999, 1.283107], [-0.8112729999999999, 1.3869639999999999], [-0.844347, 1.46708], [-0.865819, 1.5191949999999999], [-0.873775, 1.538654], [-0.892571, 1.558423], [-0.9289259999999999, 1.558365], [-0.987521, 1.5374409999999998], [-1.073032, 1.494613], [-1.0737079999999999, 1.494249], [-1.138093, 1.461012], [-1.1901389999999998, 1.436802], [-1.219488, 1.426404], [-1.220783, 1.426308], [-1.2428759999999999, 1.436855], [-1.291652, 1.466184], [-1.361669, 1.510827], [-1.4474859999999998, 1.5673139999999999], [-1.5426119999999999, 1.631462], [-1.63946, 1.696411], [-1.726747, 1.752896], [-1.798819, 1.797421], [-1.850023, 1.82649], [-1.874474, 1.836616], [-1.89699, 1.823307], [-1.9422579999999998, 1.786112], [-2.005756, 1.729128], [-2.082961, 1.6564489999999998], [-2.169349, 1.572171], [-2.1976009999999997, 1.5440159999999998], [-2.489713, 1.2514159999999999], [-2.267369, 0.9251039999999999], [-2.199798, 0.824897], [-2.1404929999999998, 0.7349629999999999], [-2.092783, 0.6605099999999999], [-2.059993, 0.6067509999999999], [-2.045452, 0.578894], [-2.045026, 0.576912], [-2.052692, 0.550655], [-2.073311, 0.497837], [-2.103315, 0.42730999999999997], [-2.124375, 0.38009299999999996], [-2.163752, 0.289694], [-2.200835, 0.198366], [-2.2295849999999997, 0.12119999999999999], [-2.237395, 0.097692], [-2.259583, 0.034915999999999996], [-2.281273, -0.013588999999999999], [-2.293187, -0.031921], [-2.319477, -0.043141], [-2.376858, -0.059045999999999994], [-2.4578819999999997, -0.077833], [-2.5551049999999997, -0.097701], [-2.5986149999999997, -0.10586799999999999], [-2.709104, -0.126171], [-2.8150839999999997, -0.14583], [-2.906199, -0.162912], [-2.972092, -0.175482], [-2.9844999999999997, -0.17790899999999998], [-3.087077, -0.198155], [-3.087077, -0.6252989999999999], [-3.0868469999999997, -0.7657539999999999], [-3.085901, -0.8720209999999999], [-3.083859, -0.9489869999999999], [-3.080338, -1.0015399999999999], [-3.074957, -1.034567], [-3.067334, -1.0529549999999999], [-3.057088, -1.0615919999999999], [-3.052885, -1.063193], [-3.02753, -1.068873], [-2.971516, -1.0802049999999999], [-2.892036, -1.095821], [-2.7962879999999997, -1.114353], [-2.691467, -1.134431], [-2.584768, -1.154688], [-2.483387, -1.173754], [-2.3945209999999997, -1.190261], [-2.325363, -1.202841], [-2.283111, -1.210125], [-2.27371, -1.211384], [-2.265193, -1.228237], [-2.24634, -1.2731299999999999], [-2.220676, -1.33757], [-2.210877, -1.362808], [-2.1713519999999997, -1.460314], [-2.124808, -1.568041], [-2.083123, -1.658828], [-2.05245, -1.7282469999999999], [-2.032044, -1.7852899999999998], [-2.025232, -1.820223], [-2.026318, -1.824905], [-2.040715, -1.847009], [-2.073588, -1.896169], [-2.12141, -1.967152], [-2.180652, -2.054722], [-2.247785, -2.1536429999999998], [-2.261059, -2.17317], [-2.3389539999999998, -2.28886], [-2.396213, -2.376956], [-2.435119, -2.4415139999999997], [-2.457956, -2.486589], [-2.467006, -2.516237], [-2.464552, -2.534515], [-2.464489, -2.534631], [-2.445173, -2.558639], [-2.402449, -2.605053], [-2.3409489999999997, -2.669063], [-2.2653019999999997, -2.7458549999999997], [-2.180139, -2.830618], [-2.170535, -2.8400779999999997], [-2.0632099999999998, -2.9440109999999997], [-1.9803849999999998, -3.0203249999999997], [-1.9203949999999999, -3.070429], [-1.8815769999999998, -3.0957299999999996], [-1.86448, -3.0989959999999996], [-1.839527, -3.0847499999999997], [-1.787745, -3.051844], [-1.71448, -3.003792], [-1.6250799999999999, -2.94411], [-1.524889, -2.876312], [-1.501499, -2.8603609999999997], [-1.1694069999999999, -2.63358], [-1.0194349999999999, -2.701647], [-0.92823, -2.7413149999999997], [-0.8303309999999999, -2.781209], [-0.746169, -2.813017], [-0.742462, -2.814326], [-0.676631, -2.838424], [-0.625884, -2.8588], [-0.601158, -2.871064], [-0.601116, -2.871099], [-0.593271, -2.8932659999999997], [-0.579934, -2.947783], [-0.56243, -3.02852], [-0.542083, -3.12935], [-0.520218, -3.244144], [-0.518429, -3.253822], [-0.496496, -3.372096], [-0.47636, -3.4794579999999997], [-0.45932, -3.569083], [-0.44667199999999996, -3.634149], [-0.439716, -3.6678319999999998], [-0.439594, -3.6683459999999997], [-0.435361, -3.6826749999999997], [-0.427129, -3.6934929999999997], [-0.40996699999999997, -3.701294], [-0.378942, -3.706571], [-0.32912199999999997, -3.709818], [-0.25557599999999997, -3.711528], [-0.15337099999999998, -3.7121929999999996], [-0.017575, -3.712307], [0.0, -3.7123079999999997], [0.139878, -3.712224]]]}]}, "edges_bbox": {"minx": 110.149998, "miny": 80.749999, "maxx": 190.250002, "maxy": 102.85000199999999}, "metadata": {"date": "2019-01-14 15:38:20", "company": "", "revision": "", "title": "heater"}}
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+/* Utility functions */
+
+var storagePrefix = 'KiCad_HTML_BOM__' + pcbdata.metadata.title + '__' +
+ pcbdata.metadata.revision + '__';
+var storage;
+
+function initStorage(key) {
+ try {
+ window.localStorage.getItem("blank");
+ storage = window.localStorage;
+ } catch (e) {
+ // localStorage not available
+ }
+ if (!storage) {
+ try {
+ window.sessionStorage.getItem("blank");
+ storage = window.sessionStorage;
+ } catch (e) {
+ // sessionStorage also not available
+ }
+ }
+}
+
+function readStorage(key) {
+ if (storage) {
+ return storage.getItem(storagePrefix + '#' + key);
+ } else {
+ return null;
+ }
+}
+
+function writeStorage(key, value) {
+ if (storage) {
+ storage.setItem(storagePrefix + '#' + key, value);
+ }
+}
+
+function fancyDblClickHandler(el, onsingle, ondouble) {
+ return function() {
+ if (el.getAttribute("data-dblclick") == null) {
+ el.setAttribute("data-dblclick", 1);
+ setTimeout(function() {
+ if (el.getAttribute("data-dblclick") == 1) {
+ onsingle();
+ }
+ el.removeAttribute("data-dblclick");
+ }, 200);
+ } else {
+ el.removeAttribute("data-dblclick");
+ ondouble();
+ }
+ }
+}
+
+function smoothScrollToRow(rowid) {
+ document.getElementById(rowid).scrollIntoView({
+ behavior: "smooth",
+ block: "center",
+ inline: "nearest"
+ });
+}
+
+function focusInputField(input) {
+ input.scrollIntoView(false);
+ input.focus();
+ input.select();
+}
+
+function copyToClipboard() {
+ var text = '';
+ for (var node of bomhead.childNodes[0].childNodes) {
+ if (node.firstChild) {
+ text = text + node.firstChild.nodeValue;
+ }
+ if (node != bomhead.childNodes[0].lastChild) {
+ text += '\t';
+ }
+ }
+ text += '\n';
+ for (var row of bombody.childNodes) {
+ for (var cell of row.childNodes) {
+ for (var node of cell.childNodes) {
+ if (node.nodeName == "INPUT") {
+ if (node.checked) {
+ text = text + '✓';
+ }
+ } else if (node.nodeName == "MARK") {
+ text = text + node.firstChild.nodeValue;
+ } else {
+ text = text + node.nodeValue;
+ }
+ }
+ if (cell != row.lastChild) {
+ text += '\t';
+ }
+ }
+ text += '\n';
+ }
+ var textArea = document.createElement("textarea");
+ textArea.classList.add('clipboard-temp');
+ textArea.value = text;
+
+ document.body.appendChild(textArea);
+ textArea.focus();
+ textArea.select();
+
+ try {
+ if (document.execCommand('copy')) {
+ console.log('Bom copied to clipboard.');
+ }
+ } catch (err) {
+ console.log('Can not copy to clipboard.');
+ }
+
+ document.body.removeChild(textArea);
+}
+
+function removeGutterNode(node) {
+ for (var i = 0; i < node.childNodes.length; i++) {
+ if (node.childNodes[i].classList &&
+ node.childNodes[i].classList.contains("gutter")) {
+ node.removeChild(node.childNodes[i]);
+ break;
+ }
+ }
+}
+
+function cleanGutters() {
+ removeGutterNode(document.getElementById("bot"));
+ removeGutterNode(document.getElementById("canvasdiv"));
+}
+
+var units = {
+ prefixes: {
+ giga: ["G", "g", "giga", "Giga", "GIGA"],
+ mega: ["M", "mega", "Mega", "MEGA"],
+ kilo: ["K", "k", "kilo", "Kilo", "KILO"],
+ milli: ["m", "milli", "Milli", "MILLI"],
+ micro: ["U", "u", "micro", "Micro", "MICRO", "μ", "µ"], // different utf8 μ
+ nano: ["N", "n", "nano", "Nano", "NANO"],
+ pico: ["P", "p", "pico", "Pico", "PICO"],
+ },
+ unitsShort: ["R", "r", "Ω", "F", "f", "H", "h"],
+ unitsLong: [
+ "OHM", "Ohm", "ohm", "ohms",
+ "FARAD", "Farad", "farad",
+ "HENRY", "Henry", "henry"
+ ],
+ getMultiplier: function(s) {
+ if (this.prefixes.giga.includes(s)) return 1e9;
+ if (this.prefixes.mega.includes(s)) return 1e6;
+ if (this.prefixes.kilo.includes(s)) return 1e3;
+ if (this.prefixes.milli.includes(s)) return 1e-3;
+ if (this.prefixes.micro.includes(s)) return 1e-6;
+ if (this.prefixes.nano.includes(s)) return 1e-9;
+ if (this.prefixes.pico.includes(s)) return 1e-12;
+ return 1;
+ },
+ valueRegex: null,
+}
+
+function initUtils() {
+ var allPrefixes = units.prefixes.giga
+ .concat(units.prefixes.mega)
+ .concat(units.prefixes.kilo)
+ .concat(units.prefixes.milli)
+ .concat(units.prefixes.micro)
+ .concat(units.prefixes.nano)
+ .concat(units.prefixes.pico);
+ var allUnits = units.unitsShort.concat(units.unitsLong);
+ units.valueRegex = new RegExp("^([0-9\.]+)" +
+ "\\s*(" + allPrefixes.join("|") + ")?" +
+ "(" + allUnits.join("|") + ")?" +
+ "(\\b.*)?$", "");
+ units.valueAltRegex = new RegExp("^([0-9]*)" +
+ "(" + units.unitsShort.join("|") + ")?" +
+ "([GgMmKkUuNnPp])?" +
+ "([0-9]*)" +
+ "(\\b.*)?$", "");
+ for (var bomtable of Object.values(pcbdata.bom)) {
+ for (var row of bomtable) {
+ row.push(parseValue(row[1], row[3][0][0]));
+ }
+ }
+}
+
+function parseValue(val, ref) {
+ var inferUnit = (unit, ref) => {
+ if (unit) {
+ unit = unit.toLowerCase();
+ if (unit == 'Ω' || unit == "ohm" || unit == "ohms") {
+ unit = 'r';
+ }
+ unit = unit[0];
+ } else {
+ ref = /^([a-z]+)\d+$/i.exec(ref);
+ if (ref) {
+ ref = ref[1].toLowerCase();
+ if (ref == "c") unit = 'f';
+ else if (ref == "l") unit = 'h';
+ else if (ref == "r" || ref == "rv") unit = 'r';
+ else unit = null;
+ }
+ }
+ return unit;
+ };
+ val = val.replace(/,/g, "");
+ var match = units.valueRegex.exec(val);
+ var unit;
+ if (match) {
+ val = parseFloat(match[1]);
+ if (match[2]) {
+ val = val * units.getMultiplier(match[2]);
+ }
+ unit = inferUnit(match[3], ref);
+ if (!unit) return null;
+ else return {
+ val: val,
+ unit: unit,
+ extra: match[4],
+ }
+ }
+ match = units.valueAltRegex.exec(val);
+ if (match && (match[1] || match[4])) {
+ val = parseFloat(match[1] + "." + match[4]);
+ if (match[3]) {
+ val = val * units.getMultiplier(match[3]);
+ }
+ unit = inferUnit(match[2], ref);
+ if (!unit) return null;
+ else return {
+ val: val,
+ unit: unit,
+ extra: match[5],
+ }
+ }
+ return null;
+}
+
+function valueCompare(a, b, stra, strb) {
+ if (a === null && b === null) {
+ // Failed to parse both values, compare them as strings.
+ if (stra != strb) return stra > strb ? 1 : -1;
+ else return 0;
+ } else if (a === null) {
+ return 1;
+ } else if (b === null) {
+ return -1;
+ } else {
+ if (a.unit != b.unit) return a.unit > b.unit ? 1 : -1;
+ else if (a.val != b.val) return a.val > b.val ? 1 : -1;
+ else if (a.extra != b.extra) return a.extra > b.extra ? 1 : -1;
+ else return 0;
+ }
+}
+
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+/* PCB rendering code */
+
+var redrawOnDrag = true;
+var boardRotation = 0;
+
+function deg2rad(deg) {
+ return deg * Math.PI / 180;
+}
+
+function calcFontPoint(linepoint, text, offsetx, offsety, tilt) {
+ var point = [
+ linepoint[0] * text.width + offsetx,
+ linepoint[1] * text.height + offsety
+ ];
+ // Adding half a line height here is technically a bug
+ // but pcbnew currently does the same, text is slightly shifted.
+ point[0] -= (point[1] + text.height * 0.5) * tilt;
+ return point;
+}
+
+function drawtext(ctx, text, color, flip) {
+ ctx.save();
+ ctx.translate(...text.pos);
+ var angle = -text.angle;
+ if (text.attr.includes("mirrored")) {
+ ctx.scale(-1, 1);
+ angle = -angle;
+ }
+ var tilt = 0;
+ if (text.attr.includes("italic")) {
+ tilt = 0.125;
+ }
+ var interline = (text.height * 1.5 + text.thickness) / 2;
+ var txt = text.text.split("\n");
+ // KiCad ignores last empty line.
+ if (txt[txt.length-1] == '') txt.pop();
+ ctx.rotate(deg2rad(angle));
+ ctx.fillStyle = color;
+ ctx.strokeStyle = color;
+ ctx.lineCap = "round";
+ ctx.lineWidth = text.thickness;
+ for (var i in txt) {
+ var offsety = (-(txt.length - 1) + i * 2) * interline + text.height / 2;
+ var lineWidth = 0;
+ for (var c of txt[i]) {
+ lineWidth += pcbdata.font_data[c].w * text.width;
+ }
+ var offsetx = 0;
+ switch (text.horiz_justify) {
+ case -1:
+ // Justify left, do nothing
+ break;
+ case 0:
+ // Justify center
+ offsetx -= lineWidth / 2;
+ break;
+ case 1:
+ // Justify right
+ offsetx -= lineWidth;
+ break;
+ }
+ for (var c of txt[i]) {
+ for (var line of pcbdata.font_data[c].l) {
+ // Drawing each segment separately instead of
+ // polyline because round line caps don't work in joints
+ for (var i = 0; i < line.length - 1; i++) {
+ ctx.beginPath();
+ ctx.moveTo(...calcFontPoint(line[i], text, offsetx, offsety, tilt));
+ ctx.lineTo(...calcFontPoint(line[i + 1], text, offsetx, offsety, tilt));
+ ctx.stroke();
+ }
+ }
+ offsetx += pcbdata.font_data[c].w * text.width;
+ }
+ }
+ ctx.restore();
+}
+
+function drawedge(ctx, scalefactor, edge, color) {
+ ctx.strokeStyle = color;
+ ctx.lineWidth = Math.max(1 / scalefactor, edge.width);
+ ctx.lineCap = "round";
+ if (edge.type == "segment") {
+ ctx.beginPath();
+ ctx.moveTo(...edge.start);
+ ctx.lineTo(...edge.end);
+ ctx.stroke();
+ }
+ if (edge.type == "arc") {
+ ctx.beginPath();
+ ctx.arc(
+ ...edge.start,
+ edge.radius,
+ deg2rad(edge.startangle),
+ deg2rad(edge.endangle));
+ ctx.stroke();
+ }
+ if (edge.type == "circle") {
+ ctx.beginPath();
+ ctx.arc(
+ ...edge.start,
+ edge.radius,
+ 0, 2 * Math.PI);
+ ctx.closePath();
+ ctx.stroke();
+ }
+}
+
+function drawRoundRect(ctx, color, size, radius, ctxmethod) {
+ ctx.beginPath();
+ ctx.strokeStyle = color;
+ var x = size[0] * -0.5;
+ var y = size[1] * -0.5;
+ var width = size[0];
+ var height = size[1];
+ ctx.moveTo(x, 0);
+ ctx.arcTo(x, y + height, x + width, y + height, radius);
+ ctx.arcTo(x + width, y + height, x + width, y, radius);
+ ctx.arcTo(x + width, y, x, y, radius);
+ ctx.arcTo(x, y, x, y + height, radius);
+ ctx.closePath();
+ ctxmethod();
+}
+
+function drawOblong(ctx, color, size, ctxmethod) {
+ drawRoundRect(ctx, color, size, Math.min(size[0], size[1]) / 2, ctxmethod);
+}
+
+function drawPolygons(ctx, color, polygons, ctxmethod) {
+ ctx.fillStyle = color;
+ for (var polygon of polygons) {
+ ctx.beginPath();
+ for (var vertex of polygon) {
+ ctx.lineTo(...vertex)
+ }
+ ctx.closePath();
+ ctxmethod();
+ }
+}
+
+function drawPolygonShape(ctx, shape, color) {
+ ctx.save();
+ ctx.translate(...shape.pos);
+ ctx.rotate(deg2rad(-shape.angle));
+ drawPolygons(ctx, color, shape.polygons, ctx.fill.bind(ctx));
+ ctx.restore();
+}
+
+function drawDrawing(ctx, layer, scalefactor, drawing, color) {
+ if (["segment", "arc", "circle"].includes(drawing.type)) {
+ drawedge(ctx, scalefactor, drawing, color);
+ } else if (drawing.type == "polygon") {
+ drawPolygonShape(ctx, drawing, color);
+ } else {
+ drawtext(ctx, drawing, color, layer == "B");
+ }
+}
+
+function drawCircle(ctx, radius, ctxmethod) {
+ ctx.beginPath();
+ ctx.arc(0, 0, radius, 0, 2 * Math.PI);
+ ctx.closePath();
+ ctxmethod();
+}
+
+function drawPad(ctx, pad, color, outline) {
+ ctx.save();
+ ctx.translate(...pad.pos);
+ ctx.rotate(deg2rad(pad.angle));
+ if (pad.offset) {
+ ctx.translate(...pad.offset);
+ }
+ ctx.fillStyle = color;
+ ctx.strokeStyle = color;
+ var ctxmethod = outline ? ctx.stroke.bind(ctx) : ctx.fill.bind(ctx);
+ if (pad.shape == "rect") {
+ var rect = [...pad.size.map(c => -c * 0.5), ...pad.size];
+ if (outline) {
+ ctx.strokeRect(...rect);
+ } else {
+ ctx.fillRect(...rect);
+ }
+ } else if (pad.shape == "oval") {
+ drawOblong(ctx, color, pad.size, ctxmethod);
+ } else if (pad.shape == "circle") {
+ drawCircle(ctx, pad.size[0] / 2, ctxmethod);
+ } else if (pad.shape == "roundrect") {
+ drawRoundRect(ctx, color, pad.size, pad.radius, ctxmethod);
+ } else if (pad.shape == "custom") {
+ drawPolygons(ctx, color, pad.polygons, ctxmethod);
+ }
+ if (pad.type == "th" && !outline) {
+ ctx.fillStyle = "#CCCCCC";
+ if (pad.drillshape == "oblong") {
+ drawOblong(ctx, "#CCCCCC", pad.drillsize, ctxmethod);
+ } else {
+ drawCircle(ctx, pad.drillsize[0] / 2, ctxmethod);
+ }
+ }
+ ctx.restore();
+}
+
+function drawModule(ctx, layer, scalefactor, module, padcolor, outlinecolor, highlight) {
+ if (highlight) {
+ // draw bounding box
+ if (module.layer == layer) {
+ ctx.save();
+ ctx.globalAlpha = 0.2;
+ ctx.translate(...module.bbox.pos);
+ ctx.fillStyle = padcolor;
+ ctx.fillRect(
+ 0, 0,
+ ...module.bbox.size);
+ ctx.globalAlpha = 1;
+ ctx.strokeStyle = padcolor;
+ ctx.strokeRect(
+ 0, 0,
+ ...module.bbox.size);
+ ctx.restore();
+ }
+ }
+ // draw drawings
+ for (var drawing of module.drawings) {
+ if (drawing.layer == layer) {
+ drawDrawing(ctx, layer, scalefactor, drawing.drawing, padcolor);
+ }
+ }
+ // draw pads
+ for (var pad of module.pads) {
+ if (pad.layers.includes(layer)) {
+ drawPad(ctx, pad, padcolor, false);
+ if (pad.pin1 && highlightpin1) {
+ drawPad(ctx, pad, outlinecolor, true);
+ }
+ }
+ }
+}
+
+function drawEdges(canvas, scalefactor) {
+ var ctx = canvas.getContext("2d");
+ var edgecolor = getComputedStyle(topmostdiv).getPropertyValue('--pcb-edge-color');
+ for (var edge of pcbdata.edges) {
+ drawedge(ctx, scalefactor, edge, edgecolor);
+ }
+}
+
+function drawModules(canvas, layer, scalefactor, highlight) {
+ var ctx = canvas.getContext("2d");
+ ctx.lineWidth = 3 / scalefactor;
+ var style = getComputedStyle(topmostdiv);
+ var padcolor = style.getPropertyValue('--pad-color');
+ var outlinecolor = style.getPropertyValue('--pin1-outline-color');
+ if (highlight > 0) {
+ padcolor = style.getPropertyValue('--pad-color-highlight');
+ outlinecolor = style.getPropertyValue('--pin1-outline-color-highlight');
+ }
+ for (var i = 0; i < pcbdata.modules.length; i++) {
+ var mod = pcbdata.modules[i];
+ if (!highlight || highlightedModules.includes(i)) {
+ drawModule(ctx, layer, scalefactor, mod, padcolor, outlinecolor, highlight);
+ }
+ }
+}
+
+function drawSilkscreen(canvas, layer, scalefactor) {
+ var ctx = canvas.getContext("2d");
+ for (var d of pcbdata.silkscreen[layer]) {
+ if (["segment", "arc", "circle"].includes(d.type)) {
+ drawedge(ctx, scalefactor, d, "#aa4");
+ } else if (d.type == "polygon") {
+ drawPolygonShape(ctx, d, "#4aa");
+ } else {
+ drawtext(ctx, d, "#4aa", layer == "B");
+ }
+ }
+}
+
+function clearCanvas(canvas) {
+ var ctx = canvas.getContext("2d");
+ ctx.save();
+ ctx.setTransform(1, 0, 0, 1, 0, 0);
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
+ ctx.restore();
+}
+
+function drawHighlightsOnLayer(canvasdict) {
+ clearCanvas(canvasdict.highlight);
+ drawModules(canvasdict.highlight, canvasdict.layer,
+ canvasdict.transform.s * canvasdict.transform.zoom, true);
+}
+
+function drawHighlights() {
+ drawHighlightsOnLayer(allcanvas.front);
+ drawHighlightsOnLayer(allcanvas.back);
+}
+
+function drawBackground(canvasdict) {
+ clearCanvas(canvasdict.bg);
+ clearCanvas(canvasdict.silk);
+ drawEdges(canvasdict.bg, canvasdict.transform.s);
+ drawModules(canvasdict.bg, canvasdict.layer,
+ canvasdict.transform.s * canvasdict.transform.zoom, false);
+ drawSilkscreen(canvasdict.silk, canvasdict.layer, canvasdict.transform.s);
+}
+
+function prepareCanvas(canvas, flip, transform) {
+ var ctx = canvas.getContext("2d");
+ ctx.setTransform(1, 0, 0, 1, 0, 0);
+ var fontsize = 1.55;
+ ctx.scale(transform.zoom, transform.zoom);
+ ctx.translate(transform.panx, transform.pany);
+ if (flip) {
+ ctx.scale(-1, 1);
+ }
+ ctx.translate(transform.x, transform.y);
+ ctx.rotate(deg2rad(boardRotation));
+ ctx.scale(transform.s, transform.s);
+}
+
+function prepareLayer(canvasdict) {
+ var flip = (canvasdict.layer == "B");
+ for (var c of ["bg", "silk", "highlight"]) {
+ prepareCanvas(canvasdict[c], flip, canvasdict.transform);
+ }
+}
+
+function rotateVector(v, angle) {
+ angle = deg2rad(angle);
+ return [
+ v[0] * Math.cos(angle) - v[1] * Math.sin(angle),
+ v[0] * Math.sin(angle) + v[1] * Math.cos(angle)
+ ];
+}
+
+function applyRotation(bbox) {
+ var corners = [
+ [bbox.minx, bbox.miny],
+ [bbox.minx, bbox.maxy],
+ [bbox.maxx, bbox.miny],
+ [bbox.maxx, bbox.maxy],
+ ];
+ corners = corners.map((v) => rotateVector(v, boardRotation));
+ return {
+ minx: corners.reduce((a, v) => Math.min(a, v[0]), Infinity),
+ miny: corners.reduce((a, v) => Math.min(a, v[1]), Infinity),
+ maxx: corners.reduce((a, v) => Math.max(a, v[0]), -Infinity),
+ maxy: corners.reduce((a, v) => Math.max(a, v[1]), -Infinity),
+ }
+}
+
+function recalcLayerScale(canvasdict) {
+ var canvasdivid = {
+ "F": "frontcanvas",
+ "B": "backcanvas"
+ } [canvasdict.layer];
+ var width = document.getElementById(canvasdivid).clientWidth * 2;
+ var height = document.getElementById(canvasdivid).clientHeight * 2;
+ var bbox = applyRotation(pcbdata.edges_bbox);
+ var scalefactor = 0.98 * Math.min(
+ width / (bbox.maxx - bbox.minx),
+ height / (bbox.maxy - bbox.miny)
+ );
+ if (scalefactor < 0.1) {
+ scalefactor = 1;
+ }
+ canvasdict.transform.s = scalefactor;
+ var flip = (canvasdict.layer == "B");
+ if (flip) {
+ canvasdict.transform.x = -((bbox.maxx + bbox.minx) * scalefactor + width) * 0.5;
+ } else {
+ canvasdict.transform.x = -((bbox.maxx + bbox.minx) * scalefactor - width) * 0.5;
+ }
+ canvasdict.transform.y = -((bbox.maxy + bbox.miny) * scalefactor - height) * 0.5;
+ for (var c of ["bg", "silk", "highlight"]) {
+ canvas = canvasdict[c];
+ canvas.width = width;
+ canvas.height = height;
+ canvas.style.width = (width / 2) + "px";
+ canvas.style.height = (height / 2) + "px";
+ }
+}
+
+function redrawCanvas(layerdict) {
+ prepareLayer(layerdict);
+ drawBackground(layerdict);
+ drawHighlightsOnLayer(layerdict);
+}
+
+function resizeCanvas(layerdict) {
+ recalcLayerScale(layerdict);
+ redrawCanvas(layerdict);
+}
+
+function resizeAll() {
+ resizeCanvas(allcanvas.front);
+ resizeCanvas(allcanvas.back);
+}
+
+function bboxScan(layer, x, y) {
+ var result = [];
+ for (var i = 0; i < pcbdata.modules.length; i++) {
+ var module = pcbdata.modules[i];
+ if (module.layer == layer) {
+ var b = module.bbox;
+ if (b.pos[0] <= x && b.pos[0] + b.size[0] >= x &&
+ b.pos[1] <= y && b.pos[1] + b.size[1] >= y) {
+ result.push(i);
+ }
+ }
+ }
+ return result;
+}
+
+function handleMouseDown(e, layerdict) {
+ if (e.which != 1) {
+ return;
+ }
+ e.preventDefault();
+ e.stopPropagation();
+ layerdict.transform.mousestartx = e.offsetX;
+ layerdict.transform.mousestarty = e.offsetY;
+ layerdict.transform.mousedownx = e.offsetX;
+ layerdict.transform.mousedowny = e.offsetY;
+ layerdict.transform.mousedown = true;
+}
+
+function handleMouseClick(e, layerdict) {
+ var x = e.offsetX;
+ var y = e.offsetY;
+ var t = layerdict.transform;
+ if (layerdict.layer == "B") {
+ x = (2 * x / t.zoom - t.panx + t.x) / -t.s;
+ } else {
+ x = (2 * x / t.zoom - t.panx - t.x) / t.s;
+ }
+ y = (2 * y / t.zoom - t.y - t.pany) / t.s;
+ var v = rotateVector([x, y], -boardRotation);
+ var modules = bboxScan(layerdict.layer, v[0], v[1]);
+ if (modules.length > 0) {
+ modulesClicked(modules);
+ }
+}
+
+function handleMouseUp(e, layerdict) {
+ e.preventDefault();
+ e.stopPropagation();
+ if (e.which == 1 &&
+ layerdict.transform.mousedown &&
+ layerdict.transform.mousedownx == e.offsetX &&
+ layerdict.transform.mousedowny == e.offsetY) {
+ // This is just a click
+ handleMouseClick(e, layerdict);
+ layerdict.transform.mousedown = false;
+ return;
+ }
+ if (e.which == 3) {
+ // Reset pan and zoom on right click.
+ layerdict.transform.panx = 0;
+ layerdict.transform.pany = 0;
+ layerdict.transform.zoom = 1;
+ redrawCanvas(layerdict);
+ } else if (!redrawOnDrag) {
+ redrawCanvas(layerdict);
+ }
+ layerdict.transform.mousedown = false;
+}
+
+function handleMouseMove(e, layerdict) {
+ if (!layerdict.transform.mousedown) {
+ return;
+ }
+ e.preventDefault();
+ e.stopPropagation();
+ var dx = e.offsetX - layerdict.transform.mousestartx;
+ var dy = e.offsetY - layerdict.transform.mousestarty;
+ layerdict.transform.panx += 2 * dx / layerdict.transform.zoom;
+ layerdict.transform.pany += 2 * dy / layerdict.transform.zoom;
+ layerdict.transform.mousestartx = e.offsetX;
+ layerdict.transform.mousestarty = e.offsetY;
+ if (redrawOnDrag) {
+ redrawCanvas(layerdict);
+ }
+}
+
+function handleMouseWheel(e, layerdict) {
+ e.preventDefault();
+ e.stopPropagation();
+ var t = layerdict.transform;
+ var wheeldelta = e.deltaY;
+ if (e.deltaMode == 1) {
+ // FF only, scroll by lines
+ wheeldelta *= 30;
+ } else if (e.deltaMode == 2) {
+ wheeldelta *= 300;
+ }
+ var m = Math.pow(1.1, -wheeldelta / 40);
+ // Limit amount of zoom per tick.
+ if (m > 2) {
+ m = 2;
+ } else if (m < 0.5) {
+ m = 0.5;
+ }
+ t.zoom *= m;
+ var zoomd = (1 - m) / t.zoom;
+ t.panx += 2 * e.offsetX * zoomd;
+ t.pany += 2 * e.offsetY * zoomd;
+ redrawCanvas(layerdict);
+}
+
+function addMouseHandlers(div, layerdict) {
+ div.onmousedown = function(e) {
+ handleMouseDown(e, layerdict);
+ };
+ div.onmousemove = function(e) {
+ handleMouseMove(e, layerdict);
+ };
+ div.onmouseup = function(e) {
+ handleMouseUp(e, layerdict);
+ };
+ div.onmouseout = function(e) {
+ handleMouseUp(e, layerdict);
+ }
+ div.onwheel = function(e) {
+ handleMouseWheel(e, layerdict);
+ }
+ for (var element of [div, layerdict.bg, layerdict.silk, layerdict.highlight]) {
+ element.addEventListener("contextmenu", function(e) {
+ e.preventDefault();
+ }, false);
+ }
+}
+
+function setRedrawOnDrag(value) {
+ redrawOnDrag = value;
+ writeStorage("redrawOnDrag", value);
+}
+
+function setBoardRotation(value) {
+ boardRotation = value * 5;
+ writeStorage("boardRotation", boardRotation);
+ document.getElementById("rotationDegree").textContent = boardRotation;
+ resizeAll();
+}
+
+function initRender() {
+ allcanvas = {
+ front: {
+ transform: {
+ x: 0,
+ y: 0,
+ s: 1,
+ panx: 0,
+ pany: 0,
+ zoom: 1,
+ mousestartx: 0,
+ mousestarty: 0,
+ mousedown: false,
+ },
+ bg: document.getElementById("F_bg"),
+ silk: document.getElementById("F_slk"),
+ highlight: document.getElementById("F_hl"),
+ layer: "F",
+ },
+ back: {
+ transform: {
+ x: 0,
+ y: 0,
+ s: 1,
+ panx: 0,
+ pany: 0,
+ zoom: 1,
+ mousestartx: 0,
+ mousestarty: 0,
+ mousedown: false,
+ },
+ bg: document.getElementById("B_bg"),
+ silk: document.getElementById("B_slk"),
+ highlight: document.getElementById("B_hl"),
+ layer: "B",
+ }
+ };
+ addMouseHandlers(document.getElementById("frontcanvas"), allcanvas.front);
+ addMouseHandlers(document.getElementById("backcanvas"), allcanvas.back);
+}
+
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+/* DOM manipulation and misc code */
+
+var bomsplit;
+var canvassplit;
+var canvaslayout = "default";
+var bomlayout = "default";
+var initDone = false;
+var bomSortFunction = null;
+var currentSortColumn = null;
+var currentSortOrder = null;
+var currentHighlightedRowId;
+var highlightHandlers = [];
+var highlightedModules = [];
+var checkboxes = [];
+var bomCheckboxes = "";
+var highlightpin1 = false;
+var lastClicked;
+
+function dbg(html) {
+ dbgdiv.innerHTML = html;
+}
+
+function setDarkMode(value) {
+ if (value) {
+ topmostdiv.classList.add("dark");
+ } else {
+ topmostdiv.classList.remove("dark");
+ }
+ writeStorage("darkmode", value);
+ if (initDone) {
+ redrawCanvas(allcanvas.front);
+ redrawCanvas(allcanvas.back);
+ }
+}
+
+function setHighlightPin1(value) {
+ writeStorage("highlightpin1", value);
+ highlightpin1 = value;
+ if (initDone) {
+ redrawCanvas(allcanvas.front);
+ redrawCanvas(allcanvas.back);
+ }
+}
+
+function getStoredCheckboxRefs(checkbox) {
+ function convert(ref) {
+ var intref = parseInt(ref);
+ if (isNaN(intref)) {
+ for (var i = 0; i < pcbdata.modules.length; i++) {
+ if (pcbdata.modules[i].ref == ref) {
+ return i;
+ }
+ }
+ return -1;
+ } else {
+ return intref;
+ }
+ }
+ var existingRefs = readStorage("checkbox_" + checkbox);
+ if (!existingRefs) {
+ return new Set();
+ } else {
+ return new Set(existingRefs.split(",").map(r => convert(r)));
+ }
+}
+
+function getCheckboxState(checkbox, references) {
+ var storedRefsSet = getStoredCheckboxRefs(checkbox);
+ var currentRefsSet = new Set(references.map(r => r[1]));
+ // Get difference of current - stored
+ var difference = new Set(currentRefsSet);
+ for (ref of storedRefsSet) {
+ difference.delete(ref);
+ }
+ if (difference.size == 0) {
+ // All the current refs are stored
+ return "checked";
+ } else if (difference.size == currentRefsSet.size) {
+ // None of the current refs are stored
+ return "unchecked";
+ } else {
+ // Some of the refs are stored
+ return "indeterminate";
+ }
+}
+
+function setBomCheckboxState(checkbox, element, references) {
+ var state = getCheckboxState(checkbox, references);
+ element.checked = (state == "checked");
+ element.indeterminate = (state == "indeterminate");
+}
+
+function createCheckboxChangeHandler(checkbox, references) {
+ return function() {
+ refsSet = getStoredCheckboxRefs(checkbox);
+ if (this.checked) {
+ // checkbox ticked
+ for (var ref of references) {
+ refsSet.add(ref[1]);
+ }
+ } else {
+ // checkbox unticked
+ for (var ref of references) {
+ refsSet.delete(ref[1]);
+ }
+ }
+ writeStorage("checkbox_" + checkbox, [...refsSet].join(","));
+ }
+}
+
+function createRowHighlightHandler(rowid, refs) {
+ return function() {
+ if (currentHighlightedRowId) {
+ if (currentHighlightedRowId == rowid) {
+ return;
+ }
+ document.getElementById(currentHighlightedRowId).classList.remove("highlighted");
+ }
+ document.getElementById(rowid).classList.add("highlighted");
+ currentHighlightedRowId = rowid;
+ highlightedModules = refs.map(r => r[1]);
+ drawHighlights();
+ }
+}
+
+function entryMatches(entry) {
+ // check refs
+ for (var ref of entry[3]) {
+ if (ref[0].toLowerCase().indexOf(filter) >= 0) {
+ return true;
+ }
+ }
+ // check value
+ if (entry[1].toLowerCase().indexOf(filter) >= 0) {
+ return true;
+ }
+ // check footprint
+ if (entry[2].toLowerCase().indexOf(filter) >= 0) {
+ return true;
+ }
+ return false;
+}
+
+function findRefInEntry(entry) {
+ return entry[3].filter(r => r[0].toLowerCase() == reflookup);
+}
+
+function highlightFilter(s) {
+ if (!filter) {
+ return s;
+ }
+ var parts = s.toLowerCase().split(filter);
+ if (parts.length == 1) {
+ return s;
+ }
+ var r = "";
+ var pos = 0;
+ for (var i in parts) {
+ if (i > 0) {
+ r += '<mark class="highlight">' +
+ s.substring(pos, pos + filter.length) +
+ '</mark>';
+ pos += filter.length;
+ }
+ r += s.substring(pos, pos + parts[i].length);
+ pos += parts[i].length;
+ }
+ return r;
+}
+
+function checkboxSetUnsetAllHandler(checkboxname) {
+ return function() {
+ var checkboxnum = 0;
+ while (checkboxnum < checkboxes.length &&
+ checkboxes[checkboxnum].toLowerCase() != checkboxname.toLowerCase()) {
+ checkboxnum++;
+ }
+ if (checkboxnum >= checkboxes.length) {
+ return;
+ }
+ var allset = true;
+ var checkbox;
+ var row;
+ for (row of bombody.childNodes) {
+ checkbox = row.childNodes[checkboxnum + 1].childNodes[0];
+ if (!checkbox.checked || checkbox.indeterminate) {
+ allset = false;
+ break;
+ }
+ }
+ for (row of bombody.childNodes) {
+ checkbox = row.childNodes[checkboxnum + 1].childNodes[0];
+ checkbox.checked = !allset;
+ checkbox.indeterminate = false;
+ checkbox.onchange();
+ }
+ }
+}
+
+function createColumnHeader(name, cls, comparator) {
+ var th = document.createElement("TH");
+ th.innerHTML = name;
+ th.classList.add(cls);
+ th.style.cursor = "pointer";
+ var span = document.createElement("SPAN");
+ span.classList.add("sortmark");
+ span.classList.add("none");
+ th.appendChild(span);
+ th.onclick = function() {
+ if (currentSortColumn && this !== currentSortColumn) {
+ // Currently sorted by another column
+ currentSortColumn.childNodes[1].classList.remove(currentSortOrder);
+ currentSortColumn.childNodes[1].classList.add("none");
+ currentSortColumn = null;
+ currentSortOrder = null;
+ }
+ if (currentSortColumn && this === currentSortColumn) {
+ // Already sorted by this column
+ if (currentSortOrder == "asc") {
+ // Sort by this column, descending order
+ bomSortFunction = function(a, b) {
+ return -comparator(a, b);
+ }
+ currentSortColumn.childNodes[1].classList.remove("asc");
+ currentSortColumn.childNodes[1].classList.add("desc");
+ currentSortOrder = "desc";
+ } else {
+ // Unsort
+ bomSortFunction = null;
+ currentSortColumn.childNodes[1].classList.remove("desc");
+ currentSortColumn.childNodes[1].classList.add("none");
+ currentSortColumn = null;
+ currentSortOrder = null;
+ }
+ } else {
+ // Sort by this column, ascending order
+ bomSortFunction = comparator;
+ currentSortColumn = this;
+ currentSortColumn.childNodes[1].classList.remove("none");
+ currentSortColumn.childNodes[1].classList.add("asc");
+ currentSortOrder = "asc";
+ }
+ populateBomBody();
+ }
+ return th;
+}
+
+function populateBomHeader() {
+ while (bomhead.firstChild) {
+ bomhead.removeChild(bomhead.firstChild);
+ }
+ var tr = document.createElement("TR");
+ var th = document.createElement("TH");
+ th.classList.add("numCol");
+ tr.appendChild(th);
+ checkboxes = bomCheckboxes.split(",").filter((e) => e);
+ var checkboxCompareClosure = function(checkbox) {
+ return (a, b) => {
+ var stateA = getCheckboxState(checkbox, a[3]);
+ var stateB = getCheckboxState(checkbox, b[3]);
+ if (stateA > stateB) return -1;
+ if (stateA < stateB) return 1;
+ return 0;
+ }
+ }
+ for (var checkbox of checkboxes) {
+ th = createColumnHeader(
+ checkbox, "bom-checkbox", checkboxCompareClosure(checkbox));
+ th.onclick = fancyDblClickHandler(
+ th, th.onclick.bind(th), checkboxSetUnsetAllHandler(checkbox));
+ tr.appendChild(th);
+ }
+ tr.appendChild(createColumnHeader("References", "References", (a, b) => {
+ var i = 0;
+ while (i < a[3].length && i < b[3].length) {
+ if (a[3][i] != b[3][i]) return a[3][i] > b[3][i] ? 1 : -1;
+ i++;
+ }
+ return a[3].length - b[3].length;
+ }));
+ // Extra fields
+ if (config.extra_fields.length > 0) {
+ var extraFieldCompareClosure = function(fieldIndex) {
+ return (a, b) => {
+ var fa = a[4][fieldIndex];
+ var fb = b[4][fieldIndex];
+ if (fa != fb) return fa > fb ? 1 : -1;
+ else return 0;
+ }
+ }
+ for (var i in config.extra_fields) {
+ tr.appendChild(createColumnHeader(
+ config.extra_fields[i], "extra", extraFieldCompareClosure(i)));
+ }
+ }
+ tr.appendChild(createColumnHeader("Value", "Value", (a, b) => {
+ return valueCompare(a[5], b[5], a[1], b[1]);
+ }));
+ tr.appendChild(createColumnHeader("Footprint", "Footprint", (a, b) => {
+ if (a[2] != b[2]) return a[2] > b[2] ? 1 : -1;
+ else return 0;
+ }));
+ tr.appendChild(createColumnHeader("Quantity", "Quantity", (a, b) => {
+ return a[3].length - b[3].length;
+ }));
+ bomhead.appendChild(tr);
+}
+
+function populateBomBody() {
+ while (bom.firstChild) {
+ bom.removeChild(bom.firstChild);
+ }
+ highlightHandlers = [];
+ currentHighlightedRowId = null;
+ var first = true;
+ switch (canvaslayout) {
+ case 'F':
+ bomtable = pcbdata.bom.F;
+ break;
+ case 'FB':
+ bomtable = pcbdata.bom.both;
+ break;
+ case 'B':
+ bomtable = pcbdata.bom.B;
+ break;
+ }
+ if (bomSortFunction) {
+ bomtable = bomtable.slice().sort(bomSortFunction);
+ }
+ for (var i in bomtable) {
+ var bomentry = bomtable[i];
+ if (filter && !entryMatches(bomentry)) {
+ continue;
+ }
+ var references = bomentry[3];
+ if (reflookup) {
+ references = findRefInEntry(bomentry);
+ if (references.length == 0) {
+ continue;
+ }
+ }
+ var tr = document.createElement("TR");
+ var td = document.createElement("TD");
+ var rownum = +i + 1;
+ tr.id = "bomrow" + rownum;
+ td.textContent = rownum;
+ tr.appendChild(td);
+ // Checkboxes
+ for (var checkbox of checkboxes) {
+ if (checkbox) {
+ td = document.createElement("TD");
+ var input = document.createElement("input");
+ input.type = "checkbox";
+ input.onchange = createCheckboxChangeHandler(checkbox, references);
+ setBomCheckboxState(checkbox, input, references);
+ td.appendChild(input);
+ tr.appendChild(td);
+ }
+ }
+ // References
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(references.map(r => r[0]).join(", "));
+ tr.appendChild(td);
+ // Extra fields
+ for (var i in config.extra_fields) {
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(bomentry[4][i]);
+ tr.appendChild(td);
+ }
+ // Value
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(bomentry[1]);
+ tr.appendChild(td);
+ // Footprint
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(bomentry[2]);
+ tr.appendChild(td);
+ // Quantity
+ td = document.createElement("TD");
+ td.textContent = bomentry[3].length;
+ tr.appendChild(td);
+ bom.appendChild(tr);
+ var handler = createRowHighlightHandler(tr.id, references);
+ tr.onmousemove = handler;
+ highlightHandlers.push({
+ id: tr.id,
+ handler: handler,
+ refs: references
+ });
+ if ((filter || reflookup) && first) {
+ handler();
+ first = false;
+ }
+ }
+}
+
+function highlightPreviousRow() {
+ if (!currentHighlightedRowId) {
+ highlightHandlers[highlightHandlers.length - 1].handler();
+ } else {
+ if (highlightHandlers.length > 1 &&
+ highlightHandlers[0].id == currentHighlightedRowId) {
+ highlightHandlers[highlightHandlers.length - 1].handler();
+ } else {
+ for (var i = 0; i < highlightHandlers.length - 1; i++) {
+ if (highlightHandlers[i + 1].id == currentHighlightedRowId) {
+ highlightHandlers[i].handler();
+ break;
+ }
+ }
+ }
+ }
+ smoothScrollToRow(currentHighlightedRowId);
+}
+
+function highlightNextRow() {
+ if (!currentHighlightedRowId) {
+ highlightHandlers[0].handler();
+ } else {
+ if (highlightHandlers.length > 1 &&
+ highlightHandlers[highlightHandlers.length - 1].id == currentHighlightedRowId) {
+ highlightHandlers[0].handler();
+ } else {
+ for (var i = 1; i < highlightHandlers.length; i++) {
+ if (highlightHandlers[i - 1].id == currentHighlightedRowId) {
+ highlightHandlers[i].handler();
+ break;
+ }
+ }
+ }
+ }
+ smoothScrollToRow(currentHighlightedRowId);
+}
+
+function populateBomTable() {
+ populateBomHeader();
+ populateBomBody();
+}
+
+function modulesClicked(moduleIndexes) {
+ var lastClickedIndex = moduleIndexes.indexOf(lastClicked);
+ var index = moduleIndexes[(lastClickedIndex + 1) % moduleIndexes.length];
+ for (var handler of highlightHandlers) {
+ if (handler.refs.map(r => r[1]).indexOf(index) >= 0) {
+ lastClicked = index;
+ handler.handler();
+ smoothScrollToRow(currentHighlightedRowId);
+ break;
+ }
+ }
+}
+
+function updateFilter(input) {
+ filter = input.toLowerCase();
+ populateBomTable();
+}
+
+function updateRefLookup(input) {
+ reflookup = input.toLowerCase();
+ populateBomTable();
+}
+
+function silkscreenVisible(visible) {
+ if (visible) {
+ allcanvas.front.silk.style.display = "";
+ allcanvas.back.silk.style.display = "";
+ writeStorage("silkscreenVisible", true);
+ } else {
+ allcanvas.front.silk.style.display = "none";
+ allcanvas.back.silk.style.display = "none";
+ writeStorage("silkscreenVisible", false);
+ }
+}
+
+function changeCanvasLayout(layout) {
+ document.getElementById("fl-btn").classList.remove("depressed");
+ document.getElementById("fb-btn").classList.remove("depressed");
+ document.getElementById("bl-btn").classList.remove("depressed");
+ switch (layout) {
+ case 'F':
+ document.getElementById("fl-btn").classList.add("depressed");
+ if (bomlayout != "bom-only") {
+ canvassplit.collapse(1);
+ }
+ break;
+ case 'B':
+ document.getElementById("bl-btn").classList.add("depressed");
+ if (bomlayout != "bom-only") {
+ canvassplit.collapse(0);
+ }
+ break;
+ default:
+ document.getElementById("fb-btn").classList.add("depressed");
+ if (bomlayout != "bom-only") {
+ canvassplit.setSizes([50, 50]);
+ }
+ }
+ canvaslayout = layout;
+ writeStorage("canvaslayout", layout);
+ resizeAll();
+ populateBomTable();
+}
+
+function populateMetadata() {
+ document.getElementById("title").innerHTML = pcbdata.metadata.title;
+ document.getElementById("revision").innerHTML = "Rev: " + pcbdata.metadata.revision;
+ document.getElementById("company").innerHTML = pcbdata.metadata.company;
+ document.getElementById("filedate").innerHTML = pcbdata.metadata.date;
+ if (pcbdata.metadata.title != "") {
+ document.title = pcbdata.metadata.title + " BOM";
+ }
+}
+
+function changeBomLayout(layout) {
+ document.getElementById("bom-btn").classList.remove("depressed");
+ document.getElementById("lr-btn").classList.remove("depressed");
+ document.getElementById("tb-btn").classList.remove("depressed");
+ switch (layout) {
+ case 'bom-only':
+ document.getElementById("bom-btn").classList.add("depressed");
+ if (bomsplit) {
+ bomsplit.destroy();
+ bomsplit = null;
+ canvassplit.destroy();
+ canvassplit = null;
+ }
+ document.getElementById("frontcanvas").style.display = "none";
+ document.getElementById("backcanvas").style.display = "none";
+ document.getElementById("bot").style.height = "";
+ break;
+ case 'top-bottom':
+ document.getElementById("tb-btn").classList.add("depressed");
+ document.getElementById("frontcanvas").style.display = "";
+ document.getElementById("backcanvas").style.display = "";
+ document.getElementById("bot").style.height = "calc(100% - 80px)";
+ document.getElementById("bomdiv").classList.remove("split-horizontal");
+ document.getElementById("canvasdiv").classList.remove("split-horizontal");
+ document.getElementById("frontcanvas").classList.add("split-horizontal");
+ document.getElementById("backcanvas").classList.add("split-horizontal");
+ if (bomsplit) {
+ bomsplit.destroy();
+ bomsplit = null;
+ canvassplit.destroy();
+ canvassplit = null;
+ }
+ bomsplit = Split(['#bomdiv', '#canvasdiv'], {
+ sizes: [50, 50],
+ onDragEnd: resizeAll,
+ direction: "vertical",
+ gutterSize: 5
+ });
+ canvassplit = Split(['#frontcanvas', '#backcanvas'], {
+ sizes: [50, 50],
+ gutterSize: 5,
+ onDragEnd: resizeAll
+ });
+ break;
+ case 'left-right':
+ document.getElementById("lr-btn").classList.add("depressed");
+ document.getElementById("frontcanvas").style.display = "";
+ document.getElementById("backcanvas").style.display = "";
+ document.getElementById("bot").style.height = "calc(100% - 80px)";
+ document.getElementById("bomdiv").classList.add("split-horizontal");
+ document.getElementById("canvasdiv").classList.add("split-horizontal");
+ document.getElementById("frontcanvas").classList.remove("split-horizontal");
+ document.getElementById("backcanvas").classList.remove("split-horizontal");
+ if (bomsplit) {
+ bomsplit.destroy();
+ bomsplit = null;
+ canvassplit.destroy();
+ canvassplit = null;
+ }
+ bomsplit = Split(['#bomdiv', '#canvasdiv'], {
+ sizes: [50, 50],
+ onDragEnd: resizeAll,
+ gutterSize: 5
+ });
+ canvassplit = Split(['#frontcanvas', '#backcanvas'], {
+ sizes: [50, 50],
+ gutterSize: 5,
+ direction: "vertical",
+ onDragEnd: resizeAll
+ });
+ }
+ bomlayout = layout;
+ writeStorage("bomlayout", layout);
+ changeCanvasLayout(canvaslayout);
+}
+
+function focusFilterField() {
+ focusInputField(document.getElementById("filter"));
+}
+
+function focusRefLookupField() {
+ focusInputField(document.getElementById("reflookup"));
+}
+
+function toggleBomCheckbox(bomrowid, checkboxnum) {
+ if (!bomrowid || checkboxnum > checkboxes.length) {
+ return;
+ }
+ var bomrow = document.getElementById(bomrowid);
+ var checkbox = bomrow.childNodes[checkboxnum].childNodes[0];
+ checkbox.checked = !checkbox.checked;
+ checkbox.indeterminate = false;
+ checkbox.onchange();
+}
+
+function checkBomCheckbox(bomrowid, checkboxname) {
+ var checkboxnum = 0;
+ while (checkboxnum < checkboxes.length &&
+ checkboxes[checkboxnum].toLowerCase() != checkboxname.toLowerCase()) {
+ checkboxnum++;
+ }
+ if (!bomrowid || checkboxnum >= checkboxes.length) {
+ return;
+ }
+ var bomrow = document.getElementById(bomrowid);
+ var checkbox = bomrow.childNodes[checkboxnum + 1].childNodes[0];
+ checkbox.checked = true;
+ checkbox.indeterminate = false;
+ checkbox.onchange();
+}
+
+function setBomCheckboxes(value) {
+ bomCheckboxes = value;
+ writeStorage("bomCheckboxes", value);
+ populateBomTable();
+}
+
+document.onkeydown = function(e) {
+ switch (e.key) {
+ case "n":
+ if (document.activeElement.type == "text") {
+ return;
+ }
+ if (currentHighlightedRowId !== null) {
+ checkBomCheckbox(currentHighlightedRowId, "placed");
+ highlightNextRow();
+ e.preventDefault();
+ }
+ break;
+ case "ArrowUp":
+ highlightPreviousRow();
+ e.preventDefault();
+ break;
+ case "ArrowDown":
+ highlightNextRow();
+ e.preventDefault();
+ break;
+ default:
+ break;
+ }
+ if (e.altKey) {
+ switch (e.key) {
+ case "f":
+ focusFilterField();
+ e.preventDefault();
+ break;
+ case "r":
+ focusRefLookupField();
+ e.preventDefault();
+ break;
+ case "z":
+ changeBomLayout("bom-only");
+ e.preventDefault();
+ break;
+ case "x":
+ changeBomLayout("left-right");
+ e.preventDefault();
+ break;
+ case "c":
+ changeBomLayout("top-bottom");
+ e.preventDefault();
+ break;
+ case "v":
+ changeCanvasLayout("F");
+ e.preventDefault();
+ break;
+ case "b":
+ changeCanvasLayout("FB");
+ e.preventDefault();
+ break;
+ case "n":
+ changeCanvasLayout("B");
+ e.preventDefault();
+ break;
+ default:
+ break;
+ }
+ if (e.key >= '1' && e.key <= '9') {
+ toggleBomCheckbox(currentHighlightedRowId, parseInt(e.key));
+ }
+ }
+}
+
+function initDefaults() {
+ bomlayout = readStorage("bomlayout");
+ if (bomlayout === null) {
+ bomlayout = config.bom_view;
+ }
+ if (!['bom-only', 'left-right', 'top-bottom'].includes(bomlayout)) {
+ bomlayout = config.bom_view;
+ }
+ canvaslayout = readStorage("canvaslayout");
+ if (canvaslayout === null) {
+ canvaslayout = config.layer_view;
+ }
+ bomCheckboxes = readStorage("bomCheckboxes");
+ if (bomCheckboxes === null) {
+ bomCheckboxes = config.checkboxes;
+ }
+ document.getElementById("bomCheckboxes").value = bomCheckboxes;
+
+ var b = readStorage("silkscreenVisible");
+ if (b === null) {
+ b = config.show_silkscreen;
+ }
+ document.getElementById("silkscreenCheckbox").checked = b;
+ silkscreenVisible(b);
+
+ b = readStorage("redrawOnDrag");
+ if (b === null) {
+ b = config.redraw_on_drag;
+ }
+ document.getElementById("dragCheckbox").checked = b;
+ setRedrawOnDrag(b);
+
+ b = readStorage("darkmode");
+ if (b === null) {
+ b = config.dark_mode;
+ }
+ document.getElementById("darkmodeCheckbox").checked = b;
+ setDarkMode(b);
+
+ b = readStorage("highlightpin1");
+ if (b === null) {
+ b = config.highlight_pin1;
+ }
+ document.getElementById("highlightpin1Checkbox").checked = b;
+ setHighlightPin1(b);
+
+ boardRotation = readStorage("boardRotation");
+ if (boardRotation === null) {
+ boardRotation = config.board_rotation * 5;
+ } else {
+ boardRotation = parseInt(boardRotation);
+ }
+ document.getElementById("boardRotation").value = boardRotation / 5;
+ document.getElementById("rotationDegree").textContent = boardRotation;
+}
+
+window.onload = function(e) {
+ initUtils();
+ initRender();
+ initStorage();
+ initDefaults();
+ cleanGutters();
+ populateMetadata();
+ dbgdiv = document.getElementById("dbg");
+ bom = document.getElementById("bombody");
+ bomhead = document.getElementById("bomhead");
+ filter = "";
+ reflookup = "";
+ initDone = true;
+ // Triggers render
+ changeBomLayout(bomlayout);
+}
+
+window.onresize = resizeAll;
+window.matchMedia("print").addListener(resizeAll);
+
+///////////////////////////////////////////////
+
+ </script>
+</head>
+
+<body>
+<div id="topmostdiv" style="width: 100%; height: 100%">
+ <div id="top">
+ <div style="float: right;">
+ <div class="hideonprint menu" style="float: right; margin: 10px; top: 8px;">
+ <button class="menubtn"></button>
+ <div class="menu-content">
+ <label class="menu-label menu-label-top">
+ <input id="darkmodeCheckbox" type="checkbox" onchange="setDarkMode(this.checked)">
+ Dark mode
+ </label>
+ <label class="menu-label">
+ <input id="silkscreenCheckbox" type="checkbox" checked onchange="silkscreenVisible(this.checked)">
+ Show silkscreen
+ </label>
+ <label class="menu-label">
+ <input id="highlightpin1Checkbox" type="checkbox" onchange="setHighlightPin1(this.checked)">
+ Highlight first pin
+ </label>
+ <label class="menu-label">
+ <input id="dragCheckbox" type="checkbox" checked onchange="setRedrawOnDrag(this.checked)">
+ Continuous redraw on drag
+ </label>
+ <label class="menu-label">
+ <span>Board rotation</span>
+ <span style="float: right"><span id="rotationDegree">0</span>&#176;</span>
+ <input id="boardRotation" type="range" min="-36" max="36" value="0" class="slider" oninput="setBoardRotation(this.value)">
+ </label>
+ <label class="menu-label">
+ <div style="margin-left: 5px">Bom checkboxes</div>
+ <input id="bomCheckboxes" class="menu-textbox" type=text
+ oninput="setBomCheckboxes(this.value)">
+ </label>
+ <label class="menu-label">
+ <span class="shameless-plug">
+ <span>Created using</span>
+ <a target="blank" href="https://github.com/openscopeproject/InteractiveHtmlBom">InteractiveHtmlBom</a>
+ </span>
+ </label>
+ </div>
+ </div>
+ <div class="button-container hideonprint"
+ style="float: right; margin: 10px; position: relative; top: 8px">
+ <button id="fl-btn" class="left-most-button" onclick="changeCanvasLayout('F')"
+ title="Front only">F
+ </button>
+ <button id="fb-btn" class="middle-button" onclick="changeCanvasLayout('FB')"
+ title="Front and Back">FB
+ </button>
+ <button id="bl-btn" class="right-most-button" onclick="changeCanvasLayout('B')"
+ title="Back only">B
+ </button>
+ </div>
+ <div class="button-container hideonprint"
+ style="float: right; margin: 10px; position: relative; top: 8px">
+ <button id="bom-btn" class="left-most-button" onclick="changeBomLayout('bom-only')"
+ title="BOM only"></button>
+ <button id="lr-btn" class="middle-button" onclick="changeBomLayout('left-right')"
+ title="BOM left, drawings right"></button>
+ <button id="tb-btn" class="right-most-button" onclick="changeBomLayout('top-bottom')"
+ title="BOM top, drawings bot"></button>
+ </div>
+ </div>
+ <div id="fileinfodiv" style="overflow: auto;">
+ <table class="fileinfo">
+ <tbody>
+ <tr>
+ <td id="title" class="title" style="width: 70%">
+ Title
+ </td>
+ <td id="revision" class="title" style="width: 30%">
+ Revision
+ </td>
+ </tr>
+ <tr>
+ <td id="company">
+ Kicad version
+ </td>
+ <td id="filedate">
+ Date
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <div id="bot" class="split" style="height: calc(100% - 80px)">
+ <div id="bomdiv" class="split split-horizontal">
+ <div style="width: 100%">
+ <input id="reflookup" class="searchbox reflookup hideonprint" type="text" placeholder="Ref lookup"
+ oninput="updateRefLookup(this.value)">
+ <input id="filter" class="searchbox filter hideonprint" type="text" placeholder="Filter"
+ oninput="updateFilter(this.value)">
+ <div class="button-container hideonprint" style="float: left">
+ <button id="copy" title="Copy bom table to clipboard"
+ onclick="copyToClipboard()"></button>
+ </div>
+ </div>
+ <div id="dbg"></div>
+ <table class="bom">
+ <thead id="bomhead">
+ </thead>
+ <tbody id="bombody">
+ </tbody>
+ </table>
+ </div>
+ <div id="canvasdiv" class="split split-horizontal">
+ <div id="frontcanvas" class="split" style="overflow: hidden">
+ <div style="position: relative; width: 100%; height: 100%;">
+ <canvas id="F_bg" style="position: absolute; left: 0; top: 0; z-index: 0;"></canvas>
+ <canvas id="F_slk" style="position: absolute; left: 0; top: 0; z-index: 1;"></canvas>
+ <canvas id="F_hl" style="position: absolute; left: 0; top: 0; z-index: 2;"></canvas>
+ </div>
+ </div>
+ <div id="backcanvas" class="split" style="overflow: hidden">
+ <div style="position: relative; width: 100%; height: 100%;">
+ <canvas id="B_bg" style="position: absolute; left: 0; top: 0; z-index: 0;"></canvas>
+ <canvas id="B_slk" style="position: absolute; left: 0; top: 0; z-index: 1;"></canvas>
+ <canvas id="B_hl" style="position: absolute; left: 0; top: 0; z-index: 2;"></canvas>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+</body>
+
+</html>
diff --git a/heater/heater b/heater/heater
new file mode 100644
index 0000000..c989318
--- /dev/null
+++ b/heater/heater
@@ -0,0 +1,24 @@
+Source,/home/easwaran/allProjects/kicad/openplc_modules/heater/heater.sch
+Kicad Rev,Eeschema 5.0.1
+Generated Date,Mon 21 Jan 2019 01:25:10 PM IST
+
+Title,Heater
+Company,FOSSEE
+Revision,Not Set
+Date Issue,2019-01-04
+
+Reference,Value,Library,Library Ref
+R2,27,Device,R_US
+J1,power Input,Connector,Conn_01x04_Female
+Q1,BC517,Transistor_BJT,BC517
+R3,4.7,Device,R_US
+J3,thermistor,Connector,Conn_01x02_Male
+R4,1k,Device,R_US
+Q2,BC517,Transistor_BJT,BC517
+R5,4.7k,Device,R_US
+J4,fan,Connector,Conn_01x02_Male
+J2,MCUpins,Connector,Conn_01x03_Male
+R1,470,Device,R_US
+D1,LED,Device,LED
+R6,470,Device,R_US
+D2,LED,Device,LED
diff --git a/heater/heater.xml b/heater/heater.xml
new file mode 100644
index 0000000..23104ac
--- /dev/null
+++ b/heater/heater.xml
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<export version="D">
+ <design>
+ <source>/home/easwaran/allProjects/kicad/openplc_modules/heater/heater.sch</source>
+ <date>Mon 21 Jan 2019 01:25:10 PM IST</date>
+ <tool>Eeschema 5.0.1</tool>
+ <sheet number="1" name="/" tstamps="/">
+ <title_block>
+ <title>Heater </title>
+ <company>FOSSEE</company>
+ <rev/>
+ <date>2019-01-04</date>
+ <source>heater.sch</source>
+ <comment number="1" value=""/>
+ <comment number="2" value=""/>
+ <comment number="3" value=""/>
+ <comment number="4" value=""/>
+ </title_block>
+ </sheet>
+ </design>
+ <components>
+ <comp ref="R2">
+ <value>27</value>
+ <footprint>Resistors_THT:R_Axial_Power_L38.0mm_W9.0mm_P40.64mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2F30B4</tstamp>
+ </comp>
+ <comp ref="J1">
+ <value>power Input</value>
+ <footprint>Connectors_JST:JST_XH_B04B-XH-A_04x2.50mm_Straight</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x04_Female" description="Generic connector, single row, 01x04, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2F487D</tstamp>
+ </comp>
+ <comp ref="Q1">
+ <value>BC517</value>
+ <footprint>TO_SOT_Packages_THT:TO-92_Inline_Wide</footprint>
+ <datasheet>http://www.fairchildsemi.com/ds/BC/BC517.pdf</datasheet>
+ <libsource lib="Transistor_BJT" part="BC517" description="1A Ic, 30V Vce, Darlington NPN Transistor, TO-92"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C303654</tstamp>
+ </comp>
+ <comp ref="R3">
+ <value>4.7</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C307DD4</tstamp>
+ </comp>
+ <comp ref="J3">
+ <value>thermistor</value>
+ <footprint>Connectors_JST:JST_XH_B02B-XH-A_02x2.50mm_Straight</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x02_Male" description="Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C308B5A</tstamp>
+ </comp>
+ <comp ref="R4">
+ <value>1k</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C336026</tstamp>
+ </comp>
+ <comp ref="Q2">
+ <value>BC517</value>
+ <footprint>TO_SOT_Packages_THT:TO-92_Inline_Wide</footprint>
+ <datasheet>http://www.fairchildsemi.com/ds/BC/BC517.pdf</datasheet>
+ <libsource lib="Transistor_BJT" part="BC517" description="1A Ic, 30V Vce, Darlington NPN Transistor, TO-92"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C346CA2</tstamp>
+ </comp>
+ <comp ref="R5">
+ <value>4.7k</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3474DA</tstamp>
+ </comp>
+ <comp ref="J4">
+ <value>fan</value>
+ <footprint>Connectors_JST:JST_XH_B02B-XH-A_02x2.50mm_Straight</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x02_Male" description="Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C34ABB8</tstamp>
+ </comp>
+ <comp ref="J2">
+ <value>MCUpins</value>
+ <footprint>Connectors_JST:JST_XH_B03B-XH-A_03x2.50mm_Straight</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x03_Male" description="Generic connector, single row, 01x03, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C350621</tstamp>
+ </comp>
+ <comp ref="R1">
+ <value>470</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3591A5</tstamp>
+ </comp>
+ <comp ref="D1">
+ <value>LED</value>
+ <footprint>LEDs:LED_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C359B84</tstamp>
+ </comp>
+ <comp ref="R6">
+ <value>470</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C35A82C</tstamp>
+ </comp>
+ <comp ref="D2">
+ <value>LED</value>
+ <footprint>LEDs:LED_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C35A834</tstamp>
+ </comp>
+ </components>
+ <libparts>
+ <libpart lib="Connector" part="Conn_01x02_Male">
+ <description>Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>Connector*:*_1x??_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">J</field>
+ <field name="Value">Conn_01x02_Male</field>
+ </fields>
+ <pins>
+ <pin num="1" name="Pin_1" type="passive"/>
+ <pin num="2" name="Pin_2" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Connector" part="Conn_01x03_Male">
+ <description>Generic connector, single row, 01x03, script generated (kicad-library-utils/schlib/autogen/connector/)</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>Connector*:*_1x??_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">J</field>
+ <field name="Value">Conn_01x03_Male</field>
+ </fields>
+ <pins>
+ <pin num="1" name="Pin_1" type="passive"/>
+ <pin num="2" name="Pin_2" type="passive"/>
+ <pin num="3" name="Pin_3" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Connector" part="Conn_01x04_Female">
+ <description>Generic connector, single row, 01x04, script generated (kicad-library-utils/schlib/autogen/connector/)</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>Connector*:*_1x??_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">J</field>
+ <field name="Value">Conn_01x04_Female</field>
+ </fields>
+ <pins>
+ <pin num="1" name="Pin_1" type="passive"/>
+ <pin num="2" name="Pin_2" type="passive"/>
+ <pin num="3" name="Pin_3" type="passive"/>
+ <pin num="4" name="Pin_4" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Device" part="LED">
+ <description>Light emitting diode</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>LED*</fp>
+ <fp>LED_SMD:*</fp>
+ <fp>LED_THT:*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">D</field>
+ <field name="Value">LED</field>
+ </fields>
+ <pins>
+ <pin num="1" name="K" type="passive"/>
+ <pin num="2" name="A" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Device" part="R_US">
+ <description>Resistor, US symbol</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>R_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">R</field>
+ <field name="Value">R_US</field>
+ </fields>
+ <pins>
+ <pin num="1" name="~" type="passive"/>
+ <pin num="2" name="~" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Transistor_BJT" part="BC517">
+ <description>1A Ic, 30V Vce, Darlington NPN Transistor, TO-92</description>
+ <docs>http://www.fairchildsemi.com/ds/BC/BC517.pdf</docs>
+ <footprints>
+ <fp>TO?92*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">Q</field>
+ <field name="Value">BC517</field>
+ <field name="Footprint">Package_TO_SOT_THT:TO-92_Inline</field>
+ </fields>
+ <pins>
+ <pin num="1" name="C" type="passive"/>
+ <pin num="2" name="B" type="input"/>
+ <pin num="3" name="E" type="passive"/>
+ </pins>
+ </libpart>
+ </libparts>
+ <libraries>
+ <library logical="Connector">
+ <uri>/usr/share/kicad/library/Connector.lib</uri>
+ </library>
+ <library logical="Device">
+ <uri>/usr/share/kicad/library/Device.lib</uri>
+ </library>
+ <library logical="Transistor_BJT">
+ <uri>/usr/share/kicad/library/Transistor_BJT.lib</uri>
+ </library>
+ </libraries>
+ <nets>
+ <net code="1" name="+12V">
+ <node ref="J4" pin="1"/>
+ <node ref="R2" pin="2"/>
+ <node ref="J1" pin="3"/>
+ </net>
+ <net code="2" name="+5V">
+ <node ref="R4" pin="1"/>
+ <node ref="J1" pin="2"/>
+ </net>
+ <net code="3" name="Net-(J1-Pad4)">
+ <node ref="J1" pin="4"/>
+ </net>
+ <net code="4" name="/fromMcuF">
+ <node ref="R5" pin="2"/>
+ <node ref="R6" pin="1"/>
+ <node ref="J2" pin="1"/>
+ </net>
+ <net code="5" name="Net-(Q1-Pad1)">
+ <node ref="Q1" pin="1"/>
+ <node ref="R2" pin="1"/>
+ </net>
+ <net code="6" name="Net-(J4-Pad2)">
+ <node ref="J4" pin="2"/>
+ <node ref="Q2" pin="1"/>
+ </net>
+ <net code="7" name="GND">
+ <node ref="Q1" pin="3"/>
+ <node ref="J1" pin="1"/>
+ <node ref="J3" pin="1"/>
+ <node ref="D1" pin="1"/>
+ <node ref="D2" pin="1"/>
+ <node ref="Q2" pin="3"/>
+ </net>
+ <net code="8" name="Net-(D2-Pad2)">
+ <node ref="R6" pin="2"/>
+ <node ref="D2" pin="2"/>
+ </net>
+ <net code="9" name="Net-(D1-Pad2)">
+ <node ref="D1" pin="2"/>
+ <node ref="R1" pin="2"/>
+ </net>
+ <net code="10" name="Net-(Q1-Pad2)">
+ <node ref="R3" pin="1"/>
+ <node ref="Q1" pin="2"/>
+ </net>
+ <net code="11" name="/fromMcuR">
+ <node ref="R3" pin="2"/>
+ <node ref="J2" pin="2"/>
+ <node ref="R1" pin="1"/>
+ </net>
+ <net code="12" name="Net-(Q2-Pad2)">
+ <node ref="Q2" pin="2"/>
+ <node ref="R5" pin="1"/>
+ </net>
+ <net code="13" name="/toMcu">
+ <node ref="J2" pin="3"/>
+ <node ref="R4" pin="2"/>
+ <node ref="J3" pin="2"/>
+ </net>
+ </nets>
+</export>
diff --git a/motor/bom/ibom.html b/motor/bom/ibom.html
new file mode 100644
index 0000000..0004e8d
--- /dev/null
+++ b/motor/bom/ibom.html
@@ -0,0 +1,2388 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Interactive BOM for KiCAD</title>
+ <style type="text/css">
+:root {
+ --pcb-edge-color: black;
+ --pad-color: #878787;
+ --pad-color-highlight: #D04040;
+ --pin1-outline-color: #ffb629;
+ --pin1-outline-color-highlight: #b4ff03;
+}
+
+html, body {
+ margin: 0px;
+ height: 100%;
+ font-family: Verdana, sans-serif;
+}
+
+.dark {
+ --pcb-edge-color: #eee;
+ --pad-color: #808080;
+ --pin1-outline-color: #ffa800;
+ --pin1-outline-color-highlight: #ccff00;
+ background-color: #252c30;
+ color: #eee;
+}
+
+button {
+ background-color: #eee;
+ border: 1px solid #888;
+ color: black;
+ height: 44px;
+ width: 44px;
+ text-align: center;
+ text-decoration: none;
+ display: inline-block;
+ font-size: 14px;
+ font-weight: bolder;
+}
+
+.dark button {
+ /* This will be inverted */
+ background-color: #c3b7b5;
+}
+
+button.depressed {
+ background-color: #0a0;
+ color: white;
+}
+
+.dark button.depressed {
+ /* This will be inverted */
+ background-color: #b3b;
+}
+
+button:focus {
+ outline: 0;
+}
+
+button#tb-btn {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' fill='none' stroke='%23000' stroke-width='.4' stroke-linejoin='round'/%3E%3Cpath d='M1.32 290.12h5.82M1.32 291.45h5.82' fill='none' stroke='%23000' stroke-width='.4'/%3E%3Cpath d='M4.37 292.5v4.23M.26 292.63H8.2' fill='none' stroke='%23000' stroke-width='.3'/%3E%3Ctext font-weight='700' font-size='3.17' font-family='sans-serif'%3E%3Ctspan x='1.35' y='295.73'%3EF%3C/tspan%3E%3Ctspan x='5.03' y='295.68'%3EB%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E%0A");
+ background-size: 32px 32px;
+ background-position: 5px 5px;
+ background-repeat: no-repeat;
+}
+
+button#lr-btn {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' fill='none' stroke='%23000' stroke-width='.4' stroke-linejoin='round'/%3E%3Cpath d='M1.06 290.12H3.7m-2.64 1.33H3.7m-2.64 1.32H3.7m-2.64 1.3H3.7m-2.64 1.33H3.7' fill='none' stroke='%23000' stroke-width='.4'/%3E%3Cpath d='M4.37 288.8v7.94m0-4.11h3.96' fill='none' stroke='%23000' stroke-width='.3'/%3E%3Ctext font-weight='700' font-size='3.17' font-family='sans-serif'%3E%3Ctspan x='5.11' y='291.96'%3EF%3C/tspan%3E%3Ctspan x='5.03' y='295.68'%3EB%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E%0A");
+ background-size: 32px 32px;
+ background-position: 5px 5px;
+ background-repeat: no-repeat;
+}
+
+button#bom-btn {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)' fill='none' stroke='%23000' stroke-width='.4'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' stroke-linejoin='round'/%3E%3Cpath d='M1.59 290.12h5.29M1.59 291.45h5.33M1.59 292.75h5.33M1.59 294.09h5.33M1.59 295.41h5.33'/%3E%3C/g%3E%3C/svg%3E");
+ background-size: 32px 32px;
+ background-position: 5px 5px;
+ background-repeat: no-repeat;
+}
+
+button#copy {
+ background-image: url("data:image/svg+xml,%3Csvg height='48' viewBox='0 0 48 48' width='48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h48v48h-48z' fill='none'/%3E%3Cpath d='M32 2h-24c-2.21 0-4 1.79-4 4v28h4v-28h24v-4zm6 8h-22c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h22c2.21 0 4-1.79 4-4v-28c0-2.21-1.79-4-4-4zm0 32h-22v-28h22v28z'/%3E%3C/svg%3E");
+ background-position: 6px 6px;
+ background-repeat: no-repeat;
+ background-size: 26px 26px;
+ border-radius: 6px;
+ height: 40px;
+ width: 40px;
+ margin: 10px 5px;
+}
+
+button#copy:active {
+ box-shadow: inset 0px 0px 5px #6c6c6c;
+}
+
+textarea.clipboard-temp {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 2em;
+ height: 2em;
+ padding: 0;
+ border: None;
+ outline: None;
+ box-shadow: None;
+ background: transparent;
+}
+
+.left-most-button {
+ border-right: 0;
+ border-top-left-radius: 6px;
+ border-bottom-left-radius: 6px;
+}
+
+.middle-button {
+ border-right: 0;
+}
+
+.right-most-button {
+ border-top-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+}
+
+.button-container {
+ font-size: 0;
+}
+
+.dark .button-container {
+ filter: invert(1);
+}
+
+@media print {
+ .hideonprint {
+ display: none;
+ }
+}
+
+canvas {
+ cursor: crosshair;
+}
+
+canvas:active {
+ cursor: grabbing;
+}
+
+.fileinfo {
+ width: 100%;
+ max-width: 1000px;
+ border: none;
+ padding: 5px;
+}
+
+.fileinfo .title {
+ font-size: 20pt;
+ font-weight: bold;
+}
+
+.fileinfo td {
+ overflow: hidden;
+ white-space: nowrap;
+ max-width: 1px;
+ width: 50%;
+ text-overflow: ellipsis;
+}
+
+.bom {
+ border-collapse: collapse;
+ font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace;
+ font-size: 10pt;
+ table-layout: fixed;
+ width: 100%;
+ margin-top: 1px;
+}
+
+.bom th, .bom td {
+ border: 1px solid black;
+ padding: 5px;
+ word-wrap: break-word;
+ text-align: center;
+ position: relative;
+}
+
+.dark .bom th, .dark .bom td {
+ border: 1px solid #777;
+}
+
+.bom th {
+ background-color: #CCCCCC;
+ background-clip: padding-box;
+}
+
+.dark .bom th {
+ background-color: #3b4749;
+}
+
+.bom tr.highlighted:nth-child(n) {
+ background-color: #cfc;
+}
+
+.dark .bom tr.highlighted:nth-child(n) {
+ background-color: #226022;
+}
+
+.bom tr:nth-child(even) {
+ background-color: #f2f2f2;
+}
+
+.dark .bom tr:nth-child(even) {
+ background-color: #313b40;
+}
+
+.bom tr {
+ transition: background-color 0.2s;
+}
+
+.bom .numCol {
+ width: 25px;
+}
+
+.bom .Description {
+ width: 10%;
+}
+
+.bom .Part {
+ width: 10%;
+}
+
+.bom .Value {
+ width: 15%;
+}
+
+.bom .Quantity {
+ width: 65px;
+}
+
+.bom th .sortmark {
+ position: absolute;
+ right: 1px;
+ top: 1px;
+ margin-top: -5px;
+ border-width: 5px;
+ border-style: solid;
+ border-color: transparent transparent #221 transparent;
+ transform-origin: 50% 85%;
+ transition: opacity 0.2s, transform 0.4s;
+}
+
+.dark .bom th .sortmark {
+ filter: invert(1);
+}
+
+.bom th .sortmark.none {
+ opacity: 0;
+}
+
+.bom th .sortmark.desc {
+ transform: rotate(180deg);
+}
+
+.bom th:hover .sortmark.none {
+ opacity: 0.5;
+}
+
+.bom .bom-checkbox {
+ width: 30px;
+ position: relative;
+ user-select: none;
+ -moz-user-select: none;
+}
+
+.bom .bom-checkbox:before {
+ content: "";
+ position: absolute;
+ border-width: 15px;
+ border-style: solid;
+ border-color: #51829f transparent transparent transparent;
+ visibility: hidden;
+ top: -15px;
+}
+
+.bom .bom-checkbox:after {
+ content: "Double click to set/unset all";
+ position: absolute;
+ color: white;
+ top: -35px;
+ left: -26px;
+ background: #51829f;
+ padding: 5px 15px;
+ border-radius: 8px;
+ white-space: nowrap;
+ visibility: hidden;
+}
+
+.bom .bom-checkbox:hover:before, .bom .bom-checkbox:hover:after {
+ visibility: visible;
+ transition: visibility 0.2s linear 1s;
+}
+
+.split {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ overflow-y: auto;
+ overflow-x: hidden;
+ background-color: inherit;
+}
+
+.split.split-horizontal, .gutter.gutter-horizontal {
+ height: 100%;
+ float: left;
+}
+
+.gutter {
+ background-color: #ddd;
+ background-repeat: no-repeat;
+ background-position: 50%;
+ transition: background-color 0.3s;
+}
+
+.dark .gutter {
+ background-color: #777;
+}
+
+.gutter.gutter-horizontal {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
+ cursor: ew-resize;
+ width: 5px;
+}
+
+.gutter.gutter-vertical {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII=');
+ cursor: ns-resize;
+ height: 5px;
+}
+
+.searchbox {
+ float: left;
+ height: 40px;
+ margin: 10px 5px;
+ padding: 12px 32px;
+ font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace;
+ font-size: 18px;
+ box-sizing: border-box;
+ border: 1px solid #888;
+ border-radius: 6px;
+ outline: none;
+ background-color: #eee;
+ transition: background-color 0.2s, border 0.2s;
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABNklEQVQ4T8XSMUvDQBQH8P/LElFa/AIZHcTBQSz0I/gFstTBRR2KUC4ldDxw7h0Bl3RRUATxi4iiODgoiLNrbQYp5J6cpJJqomkX33Z37/14d/dIa33MzDuYI4johOI4XhyNRteO46zNYjDzAxE1yBZprVeZ+QbAUhXEGJMA2Ox2u4+fQIa0mPmsCgCgJYQ4t7lfgF0opQYAdv9ABkKI/UnOFCClXKjX61cA1osQY8x9kiRNKeV7IWA3oyhaSdP0FkAtjxhj3hzH2RBCPOf3pzqYHCilfAAX+URm9oMguPzeWSGQvUcMYC8rOBJCHBRdqxTo9/vbRHRqi8bj8XKv1xvODbiuW2u32/bvf0SlDv4XYOY7z/Mavu+nM1+BmQ+NMc0wDF/LprP0DbTWW0T00ul0nn4b7Q87+X4Qmfiq2wAAAABJRU5ErkJggg==');
+ background-position: 10px 10px;
+ background-repeat: no-repeat;
+}
+
+.dark .searchbox {
+ background-color: #111;
+ color: #eee;
+}
+
+.searchbox::placeholder {
+ color: #ccc;
+}
+
+.dark .searchbox::placeholder {
+ color: #666;
+}
+
+.filter {
+ width: calc(60% - 64px);
+}
+
+.reflookup {
+ width: calc(40% - 10px);
+}
+
+input[type=text]:focus {
+ background-color: white;
+ border: 1px solid #333;
+}
+
+.dark input[type=text]:focus {
+ background-color: #333;
+ border: 1px solid #ccc;
+}
+
+mark.highlight {
+ background-color: #5050ff;
+ color: #fff;
+ padding: 2px;
+ border-radius: 6px;
+}
+
+.dark mark.highlight {
+ background-color: #76a6da;
+ color: #111;
+}
+
+.menubtn {
+ background-color: white;
+ font-size: 16px;
+ border: none;
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 20 20'%3E%3Cpath fill='none' d='M0 0h20v20H0V0z'/%3E%3Cpath d='M15.95 10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12 2.34c-.03-.2-.2-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3 2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6 2.77c-.1.18-.06.39.1.51l1.69 1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37 12.1c-.15.12-.19.34-.1.51l1.6 2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3 2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47 1.35-.78l1.99.8c.18.07.39 0 .49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z'/%3E%3C/svg%3E%0A");
+ background-position: center;
+ background-repeat: no-repeat;
+}
+
+.dark .menubtn {
+ filter: invert(1);
+}
+
+.menu {
+ position: relative;
+ display: inline-block;
+}
+
+.menu-content {
+ display: none;
+ position: absolute;
+ background-color: white;
+ right: 0;
+ min-width: 300px;
+ box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
+ z-index: 100;
+ padding: 8px;
+}
+
+.dark .menu-content {
+ background-color: #111;
+}
+
+.menu:hover .menu-content {
+ display: block;
+}
+
+.menu:hover .menubtn {
+ background-color: #eee;
+}
+
+.dark .menu:hover .menubtn {}
+
+.menu-label {
+ display: inline-block;
+ padding: 8px;
+ border: 1px solid #ccc;
+ border-top: 0;
+ width: calc(100% - 18px);
+}
+
+.menu-label-top {
+ border-top: 1px solid #ccc;
+}
+
+.menu-textbox {
+ float: left;
+ height: 24px;
+ margin: 10px 5px;
+ padding: 5px 5px;
+ font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace;
+ font-size: 14px;
+ box-sizing: border-box;
+ border: 1px solid #888;
+ border-radius: 4px;
+ outline: none;
+ background-color: #eee;
+ transition: background-color 0.2s, border 0.2s;
+ width: calc(100% - 10px);
+}
+
+.dark .menu-textbox {
+ background-color: #222;
+ color: #eee;
+}
+
+#topmostdiv {
+ transition: background-color 0.3s;
+}
+
+#top {
+ height: 78px;
+ border-bottom: 2px solid black;
+}
+
+.dark #top {
+ border-bottom: 2px solid #ccc;
+}
+
+#dbg {
+ display: block;
+}
+
+::-webkit-scrollbar {
+ width: 8px;
+}
+
+::-webkit-scrollbar-track {
+ background: #aaa;
+}
+
+::-webkit-scrollbar-thumb {
+ background: #666;
+ border-radius: 3px;
+}
+
+::-webkit-scrollbar-thumb:hover {
+ background: #555;
+}
+
+.slider {
+ -webkit-appearance: none;
+ width: 100%;
+ margin: 3px 0;
+ padding: 0;
+ outline: none;
+ opacity: 0.7;
+ -webkit-transition: .2s;
+ transition: opacity .2s;
+ border-radius: 3px;
+}
+
+.slider:hover {
+ opacity: 1;
+}
+
+.slider:focus {
+ outline: none;
+}
+
+.slider::-webkit-slider-runnable-track {
+ -webkit-appearance: none;
+ width: 100%;
+ height: 8px;
+ background: #d3d3d3;
+ border-radius: 3px;
+ border: none;
+}
+
+.slider::-webkit-slider-thumb {
+ -webkit-appearance: none;
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ background: #0a0;
+ cursor: pointer;
+ margin-top: -4px;
+}
+
+.dark .slider::-webkit-slider-thumb {
+ background: #3d3;
+}
+
+.slider::-moz-range-thumb {
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ background: #0a0;
+ cursor: pointer;
+}
+
+.slider::-moz-range-track {
+ height: 8px;
+ background: #d3d3d3;
+ border-radius: 3px;
+}
+
+.dark .slider::-moz-range-thumb {
+ background: #3d3;
+}
+
+.slider::-ms-track {
+ width: 100%;
+ height: 8px;
+ border-width: 3px 0;
+ background: transparent;
+ border-color: transparent;
+ color: transparent;
+ transition: opacity .2s;
+}
+
+.slider::-ms-fill-lower {
+ background: #d3d3d3;
+ border: none;
+ border-radius: 3px;
+}
+
+.slider::-ms-fill-upper {
+ background: #d3d3d3;
+ border: none;
+ border-radius: 3px;
+}
+
+.slider::-ms-thumb {
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ background: #0a0;
+ cursor: pointer;
+ margin: 0;
+}
+
+.shameless-plug {
+ font-size: 0.8em;
+ text-align: center;
+ display: block;
+}
+
+.shameless-plug a {
+ color: #0278a4;
+}
+
+.dark .shameless-plug a {
+ color: #00b9fd;
+}
+
+ </style>
+ <script type="text/javascript" >
+///////////////////////////////////////////////
+/*
+ Split.js - v1.3.5
+ MIT License
+ https://github.com/nathancahill/Split.js
+*/
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Split=t()}(this,function(){"use strict";var e=window,t=e.document,n="addEventListener",i="removeEventListener",r="getBoundingClientRect",s=function(){return!1},o=e.attachEvent&&!e[n],a=["","-webkit-","-moz-","-o-"].filter(function(e){var n=t.createElement("div");return n.style.cssText="width:"+e+"calc(9px)",!!n.style.length}).shift()+"calc",l=function(e){return"string"==typeof e||e instanceof String?t.querySelector(e):e};return function(u,c){function z(e,t,n){var i=A(y,t,n);Object.keys(i).forEach(function(t){return e.style[t]=i[t]})}function h(e,t){var n=B(y,t);Object.keys(n).forEach(function(t){return e.style[t]=n[t]})}function f(e){var t=E[this.a],n=E[this.b],i=t.size+n.size;t.size=e/this.size*i,n.size=i-e/this.size*i,z(t.element,t.size,this.aGutterSize),z(n.element,n.size,this.bGutterSize)}function m(e){var t;this.dragging&&((t="touches"in e?e.touches[0][b]-this.start:e[b]-this.start)<=E[this.a].minSize+M+this.aGutterSize?t=E[this.a].minSize+this.aGutterSize:t>=this.size-(E[this.b].minSize+M+this.bGutterSize)&&(t=this.size-(E[this.b].minSize+this.bGutterSize)),f.call(this,t),c.onDrag&&c.onDrag())}function g(){var e=E[this.a].element,t=E[this.b].element;this.size=e[r]()[y]+t[r]()[y]+this.aGutterSize+this.bGutterSize,this.start=e[r]()[G]}function d(){var t=this,n=E[t.a].element,r=E[t.b].element;t.dragging&&c.onDragEnd&&c.onDragEnd(),t.dragging=!1,e[i]("mouseup",t.stop),e[i]("touchend",t.stop),e[i]("touchcancel",t.stop),t.parent[i]("mousemove",t.move),t.parent[i]("touchmove",t.move),delete t.stop,delete t.move,n[i]("selectstart",s),n[i]("dragstart",s),r[i]("selectstart",s),r[i]("dragstart",s),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",t.gutter.style.cursor="",t.parent.style.cursor=""}function S(t){var i=this,r=E[i.a].element,o=E[i.b].element;!i.dragging&&c.onDragStart&&c.onDragStart(),t.preventDefault(),i.dragging=!0,i.move=m.bind(i),i.stop=d.bind(i),e[n]("mouseup",i.stop),e[n]("touchend",i.stop),e[n]("touchcancel",i.stop),i.parent[n]("mousemove",i.move),i.parent[n]("touchmove",i.move),r[n]("selectstart",s),r[n]("dragstart",s),o[n]("selectstart",s),o[n]("dragstart",s),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",i.gutter.style.cursor=j,i.parent.style.cursor=j,g.call(i)}function v(e){e.forEach(function(t,n){if(n>0){var i=F[n-1],r=E[i.a],s=E[i.b];r.size=e[n-1],s.size=t,z(r.element,r.size,i.aGutterSize),z(s.element,s.size,i.bGutterSize)}})}function p(){F.forEach(function(e){e.parent.removeChild(e.gutter),E[e.a].element.style[y]="",E[e.b].element.style[y]=""})}void 0===c&&(c={});var y,b,G,E,w=l(u[0]).parentNode,D=e.getComputedStyle(w).flexDirection,U=c.sizes||u.map(function(){return 100/u.length}),k=void 0!==c.minSize?c.minSize:100,x=Array.isArray(k)?k:u.map(function(){return k}),L=void 0!==c.gutterSize?c.gutterSize:10,M=void 0!==c.snapOffset?c.snapOffset:30,O=c.direction||"horizontal",j=c.cursor||("horizontal"===O?"ew-resize":"ns-resize"),C=c.gutter||function(e,n){var i=t.createElement("div");return i.className="gutter gutter-"+n,i},A=c.elementStyle||function(e,t,n){var i={};return"string"==typeof t||t instanceof String?i[e]=t:i[e]=o?t+"%":a+"("+t+"% - "+n+"px)",i},B=c.gutterStyle||function(e,t){return n={},n[e]=t+"px",n;var n};"horizontal"===O?(y="width","clientWidth",b="clientX",G="left","paddingLeft"):"vertical"===O&&(y="height","clientHeight",b="clientY",G="top","paddingTop");var F=[];return E=u.map(function(e,t){var i,s={element:l(e),size:U[t],minSize:x[t]};if(t>0&&(i={a:t-1,b:t,dragging:!1,isFirst:1===t,isLast:t===u.length-1,direction:O,parent:w},i.aGutterSize=L,i.bGutterSize=L,i.isFirst&&(i.aGutterSize=L/2),i.isLast&&(i.bGutterSize=L/2),"row-reverse"===D||"column-reverse"===D)){var a=i.a;i.a=i.b,i.b=a}if(!o&&t>0){var c=C(t,O);h(c,L),c[n]("mousedown",S.bind(i)),c[n]("touchstart",S.bind(i)),w.insertBefore(c,s.element),i.gutter=c}0===t||t===u.length-1?z(s.element,s.size,L/2):z(s.element,s.size,L);var f=s.element[r]()[y];return f<s.minSize&&(s.minSize=f),t>0&&F.push(i),s}),o?{setSizes:v,destroy:p}:{setSizes:v,getSizes:function(){return E.map(function(e){return e.size})},collapse:function(e){if(e===F.length){var t=F[e-1];g.call(t),o||f.call(t,t.size-t.bGutterSize)}else{var n=F[e];g.call(n),o||f.call(n,n.aGutterSize)}},destroy:p}}});
+
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+var config = {"redraw_on_drag": true, "highlight_pin1": false, "extra_fields": [], "dark_mode": false, "bom_view": "left-right", "board_rotation": 0.0, "checkboxes": "Sourced,Placed", "show_silkscreen": true, "layer_view": "FB"}
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+var pcbdata = {"font_data": {" ": {"l": [], "w": 0.7619047619047619}, "1": {"l": [[[0.7619047619047619, -0.047619047619047616], [0.19047619047619047, -0.047619047619047616]], [[0.47619047619047616, -0.047619047619047616], [0.47619047619047616, -1.0476190476190474], [0.38095238095238093, -0.9047619047619047], [0.2857142857142857, -0.8095238095238095], [0.19047619047619047, -0.7619047619047619]]], "w": 0.9523809523809523}, "0": {"l": [[[0.42857142857142855, -1.0476190476190474], [0.5238095238095237, -1.0476190476190474], [0.6190476190476191, -1.0], [0.6666666666666666, -0.9523809523809523], [0.7142857142857142, -0.8571428571428571], [0.7619047619047619, -0.6666666666666666], [0.7619047619047619, -0.42857142857142855], [0.7142857142857142, -0.23809523809523808], [0.6666666666666666, -0.14285714285714285], [0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.42857142857142855, -0.047619047619047616], [0.3333333333333333, -0.09523809523809523], [0.2857142857142857, -0.14285714285714285], [0.23809523809523808, -0.23809523809523808], [0.19047619047619047, -0.42857142857142855], [0.19047619047619047, -0.6666666666666666], [0.23809523809523808, -0.8571428571428571], [0.2857142857142857, -0.9523809523809523], [0.3333333333333333, -1.0], [0.42857142857142855, -1.0476190476190474]]], "w": 0.9523809523809523}, "3": {"l": [[[0.14285714285714285, -1.0476190476190474], [0.7619047619047619, -1.0476190476190474], [0.42857142857142855, -0.6666666666666666], [0.5714285714285714, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.7619047619047619, -0.47619047619047616], [0.7619047619047619, -0.23809523809523808], [0.7142857142857142, -0.14285714285714285], [0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.2857142857142857, -0.047619047619047616], [0.19047619047619047, -0.09523809523809523], [0.14285714285714285, -0.14285714285714285]]], "w": 0.9523809523809523}, "2": {"l": [[[0.19047619047619047, -0.9523809523809523], [0.23809523809523808, -1.0], [0.3333333333333333, -1.0476190476190474], [0.5714285714285714, -1.0476190476190474], [0.6666666666666666, -1.0], [0.7142857142857142, -0.9523809523809523], [0.7619047619047619, -0.8571428571428571], [0.7619047619047619, -0.7619047619047619], [0.7142857142857142, -0.6190476190476191], [0.14285714285714285, -0.047619047619047616], [0.7619047619047619, -0.047619047619047616]]], "w": 0.9523809523809523}, "5": {"l": [[[0.7142857142857142, -1.0476190476190474], [0.23809523809523808, -1.0476190476190474], [0.19047619047619047, -0.5714285714285714], [0.23809523809523808, -0.6190476190476191], [0.3333333333333333, -0.6666666666666666], [0.5714285714285714, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.7619047619047619, -0.47619047619047616], [0.7619047619047619, -0.23809523809523808], [0.7142857142857142, -0.14285714285714285], [0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.14285714285714285]]], "w": 0.9523809523809523}, "4": {"l": [[[0.6666666666666666, -0.7142857142857142], [0.6666666666666666, -0.047619047619047616]], [[0.42857142857142855, -1.0952380952380951], [0.19047619047619047, -0.38095238095238093], [0.8095238095238095, -0.38095238095238093]]], "w": 0.9523809523809523}, "7": {"l": [[[0.14285714285714285, -1.0476190476190474], [0.8095238095238095, -1.0476190476190474], [0.38095238095238093, -0.047619047619047616]]], "w": 0.9523809523809523}, "9": {"l": [[[0.2857142857142857, -0.047619047619047616], [0.47619047619047616, -0.047619047619047616], [0.5714285714285714, -0.09523809523809523], [0.6190476190476191, -0.14285714285714285], [0.7142857142857142, -0.2857142857142857], [0.7619047619047619, -0.47619047619047616], [0.7619047619047619, -0.8571428571428571], [0.7142857142857142, -0.9523809523809523], [0.6666666666666666, -1.0], [0.5714285714285714, -1.0476190476190474], [0.38095238095238093, -1.0476190476190474], [0.2857142857142857, -1.0], [0.23809523809523808, -0.9523809523809523], [0.19047619047619047, -0.8571428571428571], [0.19047619047619047, -0.6190476190476191], [0.23809523809523808, -0.5238095238095237], [0.2857142857142857, -0.47619047619047616], [0.38095238095238093, -0.42857142857142855], [0.5714285714285714, -0.42857142857142855], [0.6666666666666666, -0.47619047619047616], [0.7142857142857142, -0.5238095238095237], [0.7619047619047619, -0.6190476190476191]]], "w": 0.9523809523809523}, "C": {"l": [[[0.8095238095238095, -0.14285714285714285], [0.7619047619047619, -0.09523809523809523], [0.6190476190476191, -0.047619047619047616], [0.5238095238095237, -0.047619047619047616], [0.38095238095238093, -0.09523809523809523], [0.2857142857142857, -0.19047619047619047], [0.23809523809523808, -0.2857142857142857], [0.19047619047619047, -0.47619047619047616], [0.19047619047619047, -0.6190476190476191], [0.23809523809523808, -0.8095238095238095], [0.2857142857142857, -0.9047619047619047], [0.38095238095238093, -1.0], [0.5238095238095237, -1.0476190476190474], [0.6190476190476191, -1.0476190476190474], [0.7619047619047619, -1.0], [0.8095238095238095, -0.9523809523809523]]], "w": 1.0}, "E": {"l": [[[0.23809523809523808, -0.5714285714285714], [0.5714285714285714, -0.5714285714285714]], [[0.7142857142857142, -0.047619047619047616], [0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474], [0.7142857142857142, -1.0476190476190474]]], "w": 0.9047619047619047}, "D": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.4761904761904761, -1.0476190476190474], [0.619047619047619, -1.0], [0.7142857142857142, -0.9047619047619047], [0.7619047619047619, -0.8095238095238095], [0.8095238095238094, -0.6190476190476191], [0.8095238095238094, -0.47619047619047616], [0.7619047619047619, -0.2857142857142857], [0.7142857142857142, -0.19047619047619047], [0.619047619047619, -0.09523809523809523], [0.4761904761904761, -0.047619047619047616], [0.23809523809523803, -0.047619047619047616]]], "w": 1.0}, "G": {"l": [[[0.7619047619047619, -1.0], [0.6666666666666666, -1.0476190476190474], [0.5238095238095237, -1.0476190476190474], [0.38095238095238093, -1.0], [0.2857142857142857, -0.9047619047619047], [0.23809523809523808, -0.8095238095238095], [0.19047619047619047, -0.6190476190476191], [0.19047619047619047, -0.47619047619047616], [0.23809523809523808, -0.2857142857142857], [0.2857142857142857, -0.19047619047619047], [0.38095238095238093, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.6190476190476191, -0.047619047619047616], [0.7619047619047619, -0.09523809523809523], [0.8095238095238095, -0.14285714285714285], [0.8095238095238095, -0.47619047619047616], [0.6190476190476191, -0.47619047619047616]]], "w": 1.0}, "F": {"l": [[[0.5714285714285714, -0.5714285714285714], [0.23809523809523808, -0.5714285714285714]], [[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474], [0.7142857142857142, -1.0476190476190474]]], "w": 0.8571428571428571}, "K": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474]], [[0.8095238095238094, -0.047619047619047616], [0.3809523809523809, -0.6190476190476191]], [[0.8095238095238094, -1.0476190476190474], [0.23809523809523803, -0.47619047619047616]]], "w": 1.0}, "J": {"l": [[[0.5238095238095237, -1.0476190476190474], [0.5238095238095237, -0.3333333333333333], [0.47619047619047616, -0.19047619047619047], [0.38095238095238093, -0.09523809523809523], [0.23809523809523808, -0.047619047619047616], [0.14285714285714285, -0.047619047619047616]]], "w": 0.7619047619047619}, "M": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474], [0.5714285714285714, -0.3333333333333333], [0.9047619047619047, -1.0476190476190474], [0.9047619047619047, -0.047619047619047616]]], "w": 1.1428571428571428}, "L": {"l": [[[0.7142857142857142, -0.047619047619047616], [0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474]]], "w": 0.8095238095238095}, "O": {"l": [[[0.4285714285714285, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.8095238095238094, -0.9047619047619047], [0.857142857142857, -0.7142857142857142], [0.857142857142857, -0.38095238095238093], [0.8095238095238094, -0.19047619047619047], [0.7142857142857142, -0.09523809523809523], [0.619047619047619, -0.047619047619047616], [0.4285714285714285, -0.047619047619047616], [0.33333333333333326, -0.09523809523809523], [0.23809523809523803, -0.19047619047619047], [0.1904761904761904, -0.38095238095238093], [0.1904761904761904, -0.7142857142857142], [0.23809523809523803, -0.9047619047619047], [0.33333333333333326, -1.0], [0.4285714285714285, -1.0476190476190474]]], "w": 1.0476190476190474}, "N": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.8095238095238094, -0.047619047619047616], [0.8095238095238094, -1.0476190476190474]]], "w": 1.0476190476190474}, "P": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.7619047619047619, -0.9523809523809523], [0.8095238095238094, -0.8571428571428571], [0.8095238095238094, -0.7142857142857142], [0.7619047619047619, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.619047619047619, -0.5238095238095237], [0.23809523809523803, -0.5238095238095237]]], "w": 1.0}, "S": {"l": [[[0.19047619047619047, -0.09523809523809523], [0.3333333333333333, -0.047619047619047616], [0.5714285714285714, -0.047619047619047616], [0.6666666666666666, -0.09523809523809523], [0.7142857142857142, -0.14285714285714285], [0.7619047619047619, -0.23809523809523808], [0.7619047619047619, -0.3333333333333333], [0.7142857142857142, -0.42857142857142855], [0.6666666666666666, -0.47619047619047616], [0.5714285714285714, -0.5238095238095237], [0.38095238095238093, -0.5714285714285714], [0.2857142857142857, -0.6190476190476191], [0.23809523809523808, -0.6666666666666666], [0.19047619047619047, -0.7619047619047619], [0.19047619047619047, -0.8571428571428571], [0.23809523809523808, -0.9523809523809523], [0.2857142857142857, -1.0], [0.38095238095238093, -1.0476190476190474], [0.6190476190476191, -1.0476190476190474], [0.7619047619047619, -1.0]]], "w": 0.9523809523809523}, "R": {"l": [[[0.8095238095238094, -0.047619047619047616], [0.4761904761904761, -0.5238095238095237]], [[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.7619047619047619, -0.9523809523809523], [0.8095238095238094, -0.8571428571428571], [0.8095238095238094, -0.7142857142857142], [0.7619047619047619, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.619047619047619, -0.5238095238095237], [0.23809523809523803, -0.5238095238095237]]], "w": 1.0}, "U": {"l": [[[0.23809523809523803, -1.0476190476190474], [0.23809523809523803, -0.23809523809523808], [0.28571428571428564, -0.14285714285714285], [0.33333333333333326, -0.09523809523809523], [0.4285714285714285, -0.047619047619047616], [0.619047619047619, -0.047619047619047616], [0.7142857142857142, -0.09523809523809523], [0.7619047619047619, -0.14285714285714285], [0.8095238095238094, -0.23809523809523808], [0.8095238095238094, -1.0476190476190474]]], "w": 1.0476190476190474}, "V": {"l": [[[0.09523809523809523, -1.0476190476190474], [0.42857142857142855, -0.047619047619047616], [0.7619047619047619, -1.0476190476190474]]], "w": 0.8571428571428571}, "a": {"l": [[[0.6666666666666666, -0.047619047619047616], [0.6666666666666666, -0.5714285714285714], [0.6190476190476191, -0.6666666666666666], [0.5238095238095237, -0.7142857142857142], [0.3333333333333333, -0.7142857142857142], [0.23809523809523808, -0.6666666666666666]], [[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.19047619047619047], [0.19047619047619047, -0.2857142857142857], [0.23809523809523808, -0.38095238095238093], [0.3333333333333333, -0.42857142857142855], [0.5714285714285714, -0.42857142857142855], [0.6666666666666666, -0.47619047619047616]]], "w": 0.9047619047619047}, "c": {"l": [[[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.19047619047619047, -0.23809523809523808], [0.19047619047619047, -0.5238095238095237], [0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5714285714285714, -0.7142857142857142], [0.6666666666666666, -0.6666666666666666]]], "w": 0.8571428571428571}, "e": {"l": [[[0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.19047619047619047], [0.19047619047619047, -0.5714285714285714], [0.23809523809523808, -0.6666666666666666], [0.3333333333333333, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.5714285714285714], [0.6666666666666666, -0.47619047619047616], [0.19047619047619047, -0.38095238095238093]]], "w": 0.8571428571428571}, "d": {"l": [[[0.6666666666666666, -0.047619047619047616], [0.6666666666666666, -1.0476190476190474]], [[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.19047619047619047, -0.23809523809523808], [0.19047619047619047, -0.5238095238095237], [0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5714285714285714, -0.7142857142857142], [0.6666666666666666, -0.6666666666666666]]], "w": 0.9047619047619047}, "g": {"l": [[[0.6666666666666666, -0.7142857142857142], [0.6666666666666666, 0.09523809523809523], [0.6190476190476191, 0.19047619047619047], [0.5714285714285714, 0.23809523809523808], [0.47619047619047616, 0.2857142857142857], [0.3333333333333333, 0.2857142857142857], [0.23809523809523808, 0.23809523809523808]], [[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.19047619047619047, -0.23809523809523808], [0.19047619047619047, -0.5238095238095237], [0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5714285714285714, -0.7142857142857142], [0.6666666666666666, -0.6666666666666666]]], "w": 0.9047619047619047}, "f": {"l": [[[0.09523809523809523, -0.7142857142857142], [0.47619047619047616, -0.7142857142857142]], [[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.9047619047619047], [0.2857142857142857, -1.0], [0.38095238095238093, -1.0476190476190474], [0.47619047619047616, -1.0476190476190474]]], "w": 0.5714285714285714}, "i": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.7142857142857142]], [[0.23809523809523808, -1.0476190476190474], [0.19047619047619047, -1.0], [0.23809523809523808, -0.9523809523809523], [0.2857142857142857, -1.0], [0.23809523809523808, -1.0476190476190474], [0.23809523809523808, -0.9523809523809523]]], "w": 0.47619047619047616}, "h": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474]], [[0.6666666666666666, -0.047619047619047616], [0.6666666666666666, -0.5714285714285714], [0.6190476190476191, -0.6666666666666666], [0.5238095238095237, -0.7142857142857142], [0.38095238095238093, -0.7142857142857142], [0.2857142857142857, -0.6666666666666666], [0.23809523809523808, -0.6190476190476191]]], "w": 0.9047619047619047}, "m": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.7142857142857142]], [[0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.5714285714285714], [0.6666666666666666, -0.047619047619047616]], [[0.6666666666666666, -0.5714285714285714], [0.7142857142857142, -0.6666666666666666], [0.8095238095238095, -0.7142857142857142], [0.9523809523809523, -0.7142857142857142], [1.0476190476190474, -0.6666666666666666], [1.0952380952380951, -0.5714285714285714], [1.0952380952380951, -0.047619047619047616]]], "w": 1.3333333333333333}, "l": {"l": [[[0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.19047619047619047], [0.23809523809523808, -1.0476190476190474]]], "w": 0.5238095238095237}, "o": {"l": [[[0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.19047619047619047, -0.23809523809523808], [0.19047619047619047, -0.5238095238095237], [0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5238095238095237], [0.7142857142857142, -0.23809523809523808], [0.6666666666666666, -0.14285714285714285], [0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.38095238095238093, -0.047619047619047616]]], "w": 0.9047619047619047}, "n": {"l": [[[0.23809523809523808, -0.7142857142857142], [0.23809523809523808, -0.047619047619047616]], [[0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.5714285714285714], [0.6666666666666666, -0.047619047619047616]]], "w": 0.9047619047619047}, "p": {"l": [[[0.23809523809523808, -0.7142857142857142], [0.23809523809523808, 0.2857142857142857]], [[0.23809523809523808, -0.6666666666666666], [0.3333333333333333, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5238095238095237], [0.7142857142857142, -0.23809523809523808], [0.6666666666666666, -0.14285714285714285], [0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523]]], "w": 0.9047619047619047}, "s": {"l": [[[0.19047619047619047, -0.09523809523809523], [0.2857142857142857, -0.047619047619047616], [0.47619047619047616, -0.047619047619047616], [0.5714285714285714, -0.09523809523809523], [0.6190476190476191, -0.19047619047619047], [0.6190476190476191, -0.23809523809523808], [0.5714285714285714, -0.3333333333333333], [0.47619047619047616, -0.38095238095238093], [0.3333333333333333, -0.38095238095238093], [0.23809523809523808, -0.42857142857142855], [0.19047619047619047, -0.5238095238095237], [0.19047619047619047, -0.5714285714285714], [0.23809523809523808, -0.6666666666666666], [0.3333333333333333, -0.7142857142857142], [0.47619047619047616, -0.7142857142857142], [0.5714285714285714, -0.6666666666666666]]], "w": 0.8095238095238095}, "r": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.7142857142857142]], [[0.23809523809523808, -0.5238095238095237], [0.2857142857142857, -0.6190476190476191], [0.3333333333333333, -0.6666666666666666], [0.42857142857142855, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142]]], "w": 0.6190476190476191}, "u": {"l": [[[0.6666666666666666, -0.7142857142857142], [0.6666666666666666, -0.047619047619047616]], [[0.23809523809523808, -0.7142857142857142], [0.23809523809523808, -0.19047619047619047], [0.2857142857142857, -0.09523809523809523], [0.38095238095238093, -0.047619047619047616], [0.5238095238095237, -0.047619047619047616], [0.6190476190476191, -0.09523809523809523], [0.6666666666666666, -0.14285714285714285]]], "w": 0.9047619047619047}, "t": {"l": [[[0.09523809523809523, -0.7142857142857142], [0.47619047619047616, -0.7142857142857142]], [[0.23809523809523808, -1.0476190476190474], [0.23809523809523808, -0.19047619047619047], [0.2857142857142857, -0.09523809523809523], [0.38095238095238093, -0.047619047619047616], [0.47619047619047616, -0.047619047619047616]]], "w": 0.5714285714285714}, "w": {"l": [[[0.1428571428571428, -0.7142857142857142], [0.33333333333333326, -0.047619047619047616], [0.5238095238095237, -0.5238095238095237], [0.7142857142857142, -0.047619047619047616], [0.9047619047619047, -0.7142857142857142]]], "w": 1.0476190476190474}}, "modules": [{"layer": "F", "center": [123.52499999999999, 106.675], "pads": [{"layers": ["F", "B"], "angle": -90.0, "pos": [123.52499999999999, 96.675], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [123.52499999999999, 99.175], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [123.52499999999999, 101.675], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [123.52499999999999, 104.175], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [123.52499999999999, 106.675], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}], "drawings": [], "ref": "J4", "bbox": {"pos": [121.24999899999999, 93.499999], "size": [5.150002, 16.350002]}}, {"layer": "F", "center": [120.64999999999999, 84.328], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [123.19, 84.328], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [120.64999999999999, 84.328], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}], "drawings": [], "ref": "D4", "bbox": {"pos": [118.674999, 81.052999], "size": [6.500001999999999, 6.550002]}}, {"layer": "F", "center": [120.5, 91.5], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [125.58, 91.5], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [120.5, 91.5], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}], "drawings": [], "ref": "R4", "bbox": {"pos": [118.87499899999999, 89.874999], "size": [7.850002, 3.250002]}}, {"layer": "F", "center": [102.10799999999999, 93.726], "pads": [{"layers": ["F", "B"], "angle": -270.0, "pos": [102.10799999999999, 93.726], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -270.0, "pos": [102.10799999999999, 96.226], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}], "drawings": [], "ref": "C2", "bbox": {"pos": [100.432999, 92.650999], "size": [3.350002, 4.650002]}}, {"layer": "F", "center": [96.774, 96.26599999999999], "pads": [{"layers": ["F", "B"], "angle": -90.0, "pos": [96.774, 93.76599999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [96.774, 96.26599999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}], "drawings": [], "ref": "C1", "bbox": {"pos": [95.09899899999999, 92.69099899999999], "size": [3.350002, 4.650002]}}, {"layer": "F", "center": [93.97999999999999, 112.52199999999999], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [99.06, 112.52199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [93.97999999999999, 112.52199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}], "drawings": [], "ref": "R3", "bbox": {"pos": [92.35499899999999, 110.896999], "size": [7.850002, 3.250002]}}, {"layer": "F", "center": [93.726, 106.934], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [93.726, 106.934], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [98.806, 106.934], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}], "drawings": [], "ref": "R2", "bbox": {"pos": [92.100999, 105.308999], "size": [7.850002, 3.250002]}}, {"layer": "F", "center": [93.726, 101.092], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [98.806, 101.092], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [93.726, 101.092], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}], "drawings": [], "ref": "R1", "bbox": {"pos": [92.100999, 99.466999], "size": [7.850002, 3.250002]}}, {"layer": "F", "center": [102.362, 112.52199999999999], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [104.902, 112.52199999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [102.362, 112.52199999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}], "drawings": [], "ref": "D3", "bbox": {"pos": [101.186999, 110.24699899999999], "size": [4.900002, 4.550002]}}, {"layer": "F", "center": [102.362, 106.934], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [102.362, 106.934], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [104.902, 106.934], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}], "drawings": [], "ref": "D2", "bbox": {"pos": [101.186999, 104.658999], "size": [4.900002, 4.550002]}}, {"layer": "F", "center": [102.362, 101.092], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [104.902, 101.092], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [102.362, 101.092], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}], "drawings": [], "ref": "D1", "bbox": {"pos": [101.186999, 98.816999], "size": [4.900002, 4.550002]}}, {"layer": "F", "center": [109.47399999999999, 90.932], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 90.932], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 108.71199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 93.472], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 106.172], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 96.012], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 103.63199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 98.55199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 101.092], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 101.092], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 98.55199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 103.63199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 96.012], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 106.172], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 93.472], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 108.71199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 90.932], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [2.4, 1.5999999999999999]}], "drawings": [], "ref": "U1", "bbox": {"pos": [107.89899899999999, 89.30699899999999], "size": [10.750002, 21.050002]}}, {"layer": "F", "center": [87.884, 95.50399999999999], "pads": [{"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 88.00399999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 90.50399999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 93.00399999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 95.50399999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}], "drawings": [], "ref": "J1", "bbox": {"pos": [85.608999, 84.828999], "size": [5.150002, 13.850002]}}, {"layer": "F", "center": [87.884, 111.75999999999999], "pads": [{"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 111.75999999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 109.25999999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 106.75999999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 104.25999999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}], "drawings": [], "ref": "J2", "bbox": {"pos": [85.608999, 101.084999], "size": [5.150002, 13.850002]}}, {"layer": "F", "center": [98.298, 88.13799999999999], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [100.838, 90.678], "drillsize": [1.0999999999999999, 1.0999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.0999999999999999, 1.0999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [98.298, 90.678], "drillsize": [1.0999999999999999, 1.0999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.0999999999999999, 1.0999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [98.298, 88.13799999999999], "drillsize": [1.09728, 1.09728], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.99898, 1.99898]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [100.838, 88.13799999999999], "drillsize": [1.09728, 1.09728], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.99898, 1.99898]}], "drawings": [], "ref": "J3", "bbox": {"pos": [96.572999, 84.81299899999999], "size": [6.050002, 6.650002]}}, {"layer": "F", "center": [115.57, 114.80799999999999], "pads": [], "drawings": [], "ref": "REF***", "bbox": {"pos": [112.299285, 112.04528499999999], "size": [6.54143, 5.538887]}}], "edges": [{"start": [80.81, 99.82], "end": [80.81, 83.82], "type": "segment", "width": 0.09999999999999999}, {"start": [84.21, 116.42], "radius": 1.5999999999999999, "type": "circle", "width": 0.09999999999999999}, {"width": 0.09999999999999999, "endangle": 180.0, "start": [84.81, 115.82], "radius": 4.0, "startangle": 90.0, "type": "arc"}, {"start": [127.41, 116.42], "radius": 1.5999999999999999, "type": "circle", "width": 0.09999999999999999}, {"width": 0.09999999999999999, "endangle": 90.0, "start": [126.80999999999999, 115.82], "radius": 4.0, "startangle": 0.0, "type": "arc"}, {"start": [130.81, 83.82], "end": [130.81, 99.82], "type": "segment", "width": 0.09999999999999999}, {"start": [127.41, 83.22], "radius": 1.5999999999999999, "type": "circle", "width": 0.09999999999999999}, {"start": [105.81, 79.82], "end": [126.80999999999999, 79.82], "type": "segment", "width": 0.09999999999999999}, {"width": 0.09999999999999999, "endangle": 270.0, "start": [84.81, 83.82], "radius": 4.0, "startangle": 180.0, "type": "arc"}, {"start": [84.21, 83.22], "radius": 1.5999999999999999, "type": "circle", "width": 0.09999999999999999}, {"start": [130.81, 99.82], "end": [130.81, 115.82], "type": "segment", "width": 0.09999999999999999}, {"start": [105.81, 119.82], "end": [84.81, 119.82], "type": "segment", "width": 0.09999999999999999}, {"start": [80.81, 115.82], "end": [80.81, 99.82], "type": "segment", "width": 0.09999999999999999}, {"width": 0.09999999999999999, "endangle": 0.0, "start": [126.80999999999999, 83.82], "radius": 4.0, "startangle": -90.0, "type": "arc"}, {"start": [84.81, 79.82], "end": [105.81, 79.82], "type": "segment", "width": 0.09999999999999999}, {"start": [126.80999999999999, 119.82], "end": [105.81, 119.82], "type": "segment", "width": 0.09999999999999999}], "bom": {"both": [[2, "1uf", "C_Disc_D3.8mm_W2.6mm_P2.50mm", [["C1", 4], ["C2", 3]], []], [3, "470", "R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical", [["R1", 7], ["R2", 6], ["R3", 5]], []], [1, "1K", "R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical", [["R4", 2]], []], [1, "ground", "LED_D3.0mm", [["D1", 10]], []], [1, "first", "LED_D3.0mm", [["D2", 9]], []], [1, "second", "LED_D3.0mm", [["D3", 8]], []], [1, "error", "LED_D5.0mm", [["D4", 1]], []], [1, "L293D", "DIP-16_W7.62mm_Socket_LongPads", [["U1", 11]], []], [1, "power", "JST_EH_B04B-EH-A_04x2.50mm_Straight", [["J1", 12]], []], [1, "from switches", "JST_EH_B04B-EH-A_04x2.50mm_Straight", [["J2", 13]], []], [1, "towards uC", "JST_EH_B05B-EH-A_05x2.50mm_Straight", [["J4", 0]], []], [1, "motor", "TerminalBlock_Phoenix_MPT-2.54mm_2pol", [["J3", 14]], []]], "B": [], "F": [[2, "1uf", "C_Disc_D3.8mm_W2.6mm_P2.50mm", [["C1", 4], ["C2", 3]], []], [3, "470", "R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical", [["R1", 7], ["R2", 6], ["R3", 5]], []], [1, "1K", "R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical", [["R4", 2]], []], [1, "ground", "LED_D3.0mm", [["D1", 10]], []], [1, "first", "LED_D3.0mm", [["D2", 9]], []], [1, "second", "LED_D3.0mm", [["D3", 8]], []], [1, "error", "LED_D5.0mm", [["D4", 1]], []], [1, "L293D", "DIP-16_W7.62mm_Socket_LongPads", [["U1", 11]], []], [1, "power", "JST_EH_B04B-EH-A_04x2.50mm_Straight", [["J1", 12]], []], [1, "from switches", "JST_EH_B04B-EH-A_04x2.50mm_Straight", [["J2", 13]], []], [1, "towards uC", "JST_EH_B05B-EH-A_05x2.50mm_Straight", [["J4", 0]], []], [1, "motor", "TerminalBlock_Phoenix_MPT-2.54mm_2pol", [["J3", 14]], []]]}, "silkscreen": {"B": [], "F": [{"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "S1", "thickness": 0.09999999999999999, "pos": [119.975, 101.725], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "S2", "thickness": 0.09999999999999999, "pos": [119.975, 104.225], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "S3", "thickness": 0.09999999999999999, "pos": [119.975, 106.64999999999999], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "S3", "thickness": 0.09999999999999999, "pos": [84.8, 111.875], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "S2", "thickness": 0.09999999999999999, "pos": [84.8, 109.3], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "S1", "thickness": 0.09999999999999999, "pos": [84.8, 106.8], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "GND", "thickness": 0.09999999999999999, "pos": [84.8, 104.175], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "12V", "thickness": 0.09999999999999999, "pos": [84.975, 92.95], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "5V", "thickness": 0.09999999999999999, "pos": [84.89999999999999, 90.55], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "GND\n", "thickness": 0.09999999999999999, "pos": [84.77499999999999, 87.825], "height": 0.7999999999999999}, {"width": 1.5, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "motorModule", "thickness": 0.3, "pos": [108.458, 81.53399999999999], "height": 1.5}, {"width": 1.5, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "FOSSEE", "thickness": 0.3, "pos": [108.966, 84.836], "height": 1.5}, {"width": 1.5, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "OpenPLC", "thickness": 0.3, "pos": [93.97999999999999, 81.788], "height": 1.5}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "J4", "thickness": 0.15, "pos": [120.03999999999999, 94.67], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "towards uC", "thickness": 0.15, "pos": [123.625, 110.5], "height": 1.0}, {"start": [126.175, 109.625], "end": [126.175, 107.125], "type": "segment", "width": 0.12}, {"start": [123.675, 109.625], "end": [126.175, 109.625], "type": "segment", "width": 0.12}, {"start": [124.375, 95.02499999999999], "end": [125.875, 95.02499999999999], "type": "segment", "width": 0.12}, {"start": [124.375, 94.02499999999999], "end": [124.375, 95.02499999999999], "type": "segment", "width": 0.12}, {"start": [124.375, 108.32499999999999], "end": [125.875, 108.32499999999999], "type": "segment", "width": 0.12}, {"start": [124.375, 109.32499999999999], "end": [124.375, 108.32499999999999], "type": "segment", "width": 0.12}, {"start": [123.52499999999999, 94.52499999999999], "end": [123.52499999999999, 94.02499999999999], "type": "segment", "width": 0.12}, {"start": [122.27499999999999, 94.52499999999999], "end": [123.52499999999999, 94.52499999999999], "type": "segment", "width": 0.12}, {"start": [122.27499999999999, 108.82499999999999], "end": [122.27499999999999, 94.52499999999999], "type": "segment", "width": 0.12}, {"start": [123.52499999999999, 108.82499999999999], "end": [122.27499999999999, 108.82499999999999], "type": "segment", "width": 0.12}, {"start": [123.52499999999999, 109.32499999999999], "end": [123.52499999999999, 108.82499999999999], "type": "segment", "width": 0.12}, {"start": [121.77499999999999, 94.02499999999999], "end": [121.77499999999999, 109.32499999999999], "type": "segment", "width": 0.12}, {"start": [125.875, 94.02499999999999], "end": [121.77499999999999, 94.02499999999999], "type": "segment", "width": 0.12}, {"start": [125.875, 109.32499999999999], "end": [125.875, 94.02499999999999], "type": "segment", "width": 0.12}, {"start": [121.77499999999999, 109.32499999999999], "end": [125.875, 109.32499999999999], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "D4", "thickness": 0.15, "pos": [117.25, 81.928], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "error", "thickness": 0.15, "pos": [117.25, 84.628], "height": 1.0}, {"start": [119.36, 82.783], "end": [119.36, 85.87299999999999], "type": "segment", "width": 0.12}, {"start": [121.91999999999999, 84.328], "radius": 2.5, "type": "circle", "width": 0.12}, {"width": 0.12, "endangle": 148.89115156915048, "start": [121.91999999999999, 84.328], "radius": 2.9899999999999998, "startangle": -0.008848430849525357, "type": "arc"}, {"width": 0.12, "endangle": 360.0088484308495, "start": [121.91999999999999, 84.328], "radius": 2.9899999999999998, "startangle": 211.10884843084952, "type": "arc"}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R4", "thickness": 0.15, "pos": [127.69999999999999, 90.7], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "1K", "thickness": 0.15, "pos": [127.69999999999999, 92.39999999999999], "height": 1.0}, {"start": [121.80999999999999, 91.5], "end": [124.47999999999999, 91.5], "type": "segment", "width": 0.12}, {"start": [120.5, 91.5], "radius": 1.3099999999999998, "type": "circle", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "C2", "thickness": 0.15, "pos": [104.475, 93.475], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "1uf", "thickness": 0.15, "pos": [99.125, 96.35], "height": 1.0}, {"start": [103.46799999999999, 93.01599999999999], "end": [103.46799999999999, 96.93599999999999], "type": "segment", "width": 0.12}, {"start": [100.74799999999999, 93.01599999999999], "end": [100.74799999999999, 96.93599999999999], "type": "segment", "width": 0.12}, {"start": [103.46799999999999, 93.01599999999999], "end": [102.85799999999999, 93.01599999999999], "type": "segment", "width": 0.12}, {"start": [101.35799999999999, 93.01599999999999], "end": [100.74799999999999, 93.01599999999999], "type": "segment", "width": 0.12}, {"start": [103.46799999999999, 96.93599999999999], "end": [102.85799999999999, 96.93599999999999], "type": "segment", "width": 0.12}, {"start": [101.35799999999999, 96.93599999999999], "end": [100.74799999999999, 96.93599999999999], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "C1", "thickness": 0.15, "pos": [99.125, 93.475], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "1uf", "thickness": 0.15, "pos": [104.425, 96.375], "height": 1.0}, {"start": [97.524, 93.056], "end": [98.134, 93.056], "type": "segment", "width": 0.12}, {"start": [95.414, 93.056], "end": [96.024, 93.056], "type": "segment", "width": 0.12}, {"start": [97.524, 96.976], "end": [98.134, 96.976], "type": "segment", "width": 0.12}, {"start": [95.414, 96.976], "end": [96.024, 96.976], "type": "segment", "width": 0.12}, {"start": [98.134, 96.976], "end": [98.134, 93.056], "type": "segment", "width": 0.12}, {"start": [95.414, 96.976], "end": [95.414, 93.056], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R3", "thickness": 0.15, "pos": [94.0, 110.3], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "470", "thickness": 0.15, "pos": [98.69999999999999, 110.3], "height": 1.0}, {"start": [95.28999999999999, 112.52199999999999], "end": [97.96, 112.52199999999999], "type": "segment", "width": 0.12}, {"start": [93.97999999999999, 112.52199999999999], "radius": 1.3099999999999998, "type": "circle", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R2", "thickness": 0.15, "pos": [94.64999999999999, 104.69999999999999], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "470", "thickness": 0.15, "pos": [98.6, 104.69999999999999], "height": 1.0}, {"start": [93.726, 106.934], "radius": 1.3099999999999998, "type": "circle", "width": 0.12}, {"start": [95.036, 106.934], "end": [97.70599999999999, 106.934], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R1", "thickness": 0.15, "pos": [93.8, 98.8], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "470", "thickness": 0.15, "pos": [98.5, 98.8], "height": 1.0}, {"start": [95.036, 101.092], "end": [97.70599999999999, 101.092], "type": "segment", "width": 0.12}, {"start": [93.726, 101.092], "radius": 1.3099999999999998, "type": "circle", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "second", "thickness": 0.15, "pos": [103.63199999999999, 109.728], "height": 1.0}, {"start": [102.07199999999999, 113.60199999999999], "end": [102.07199999999999, 113.758], "type": "segment", "width": 0.12}, {"start": [102.07199999999999, 111.286], "end": [102.07199999999999, 111.442], "type": "segment", "width": 0.12}, {"width": 0.12, "endangle": 133.9455169668416, "start": [103.63199999999999, 112.52199999999999], "radius": 1.5, "startangle": 46.045516966841596, "type": "arc"}, {"width": 0.12, "endangle": 313.95448303315845, "start": [103.63199999999999, 112.52199999999999], "radius": 1.5, "startangle": 226.05448303315845, "type": "arc"}, {"width": 0.12, "endangle": 141.62086636418596, "start": [103.63199999999999, 112.52199999999999], "radius": 1.99, "startangle": 32.82086636418597, "type": "arc"}, {"width": 0.12, "endangle": 327.179133635814, "start": [103.63199999999999, 112.52199999999999], "radius": 1.99, "startangle": 218.37913363581401, "type": "arc"}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "first", "thickness": 0.15, "pos": [103.63199999999999, 104.1], "height": 1.0}, {"width": 0.12, "endangle": 327.179133635814, "start": [103.63199999999999, 106.934], "radius": 1.99, "startangle": 218.37913363581401, "type": "arc"}, {"width": 0.12, "endangle": 141.62086636418596, "start": [103.63199999999999, 106.934], "radius": 1.99, "startangle": 32.82086636418597, "type": "arc"}, {"width": 0.12, "endangle": 313.95448303315845, "start": [103.63199999999999, 106.934], "radius": 1.5, "startangle": 226.05448303315845, "type": "arc"}, {"width": 0.12, "endangle": 133.9455169668416, "start": [103.63199999999999, 106.934], "radius": 1.5, "startangle": 46.045516966841596, "type": "arc"}, {"start": [102.07199999999999, 105.698], "end": [102.07199999999999, 105.854], "type": "segment", "width": 0.12}, {"start": [102.07199999999999, 108.014], "end": [102.07199999999999, 108.17], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "ground", "thickness": 0.15, "pos": [103.63199999999999, 98.298], "height": 1.0}, {"start": [102.07199999999999, 102.172], "end": [102.07199999999999, 102.32799999999999], "type": "segment", "width": 0.12}, {"start": [102.07199999999999, 99.856], "end": [102.07199999999999, 100.012], "type": "segment", "width": 0.12}, {"width": 0.12, "endangle": 133.9455169668416, "start": [103.63199999999999, 101.092], "radius": 1.5, "startangle": 46.045516966841596, "type": "arc"}, {"width": 0.12, "endangle": 313.95448303315845, "start": [103.63199999999999, 101.092], "radius": 1.5, "startangle": 226.05448303315845, "type": "arc"}, {"width": 0.12, "endangle": 141.62086636418596, "start": [103.63199999999999, 101.092], "radius": 1.99, "startangle": 32.82086636418597, "type": "arc"}, {"width": 0.12, "endangle": 327.179133635814, "start": [103.63199999999999, 101.092], "radius": 1.99, "startangle": 218.37913363581401, "type": "arc"}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "U1", "thickness": 0.15, "pos": [109.6, 88.6], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "L293D", "thickness": 0.15, "pos": [116.5, 88.6], "height": 1.0}, {"start": [118.53399999999999, 89.542], "end": [108.03399999999999, 89.542], "type": "segment", "width": 0.12}, {"start": [118.53399999999999, 110.10199999999999], "end": [118.53399999999999, 89.542], "type": "segment", "width": 0.12}, {"start": [108.03399999999999, 110.10199999999999], "end": [118.53399999999999, 110.10199999999999], "type": "segment", "width": 0.12}, {"start": [108.03399999999999, 89.542], "end": [108.03399999999999, 110.10199999999999], "type": "segment", "width": 0.12}, {"start": [115.53399999999999, 89.60199999999999], "end": [114.28399999999999, 89.60199999999999], "type": "segment", "width": 0.12}, {"start": [115.53399999999999, 110.042], "end": [115.53399999999999, 89.60199999999999], "type": "segment", "width": 0.12}, {"start": [111.03399999999999, 110.042], "end": [115.53399999999999, 110.042], "type": "segment", "width": 0.12}, {"start": [111.03399999999999, 89.60199999999999], "end": [111.03399999999999, 110.042], "type": "segment", "width": 0.12}, {"start": [112.28399999999999, 89.60199999999999], "end": [111.03399999999999, 89.60199999999999], "type": "segment", "width": 0.12}, {"width": 0.12, "endangle": 180.0, "start": [113.28399999999999, 89.60199999999999], "radius": 1.0, "startangle": 0.0, "type": "arc"}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "J1", "thickness": 0.15, "pos": [91.725, 85.85], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "power", "thickness": 0.15, "pos": [82.55, 91.694], "height": 1.0}, {"start": [90.53399999999999, 98.454], "end": [90.53399999999999, 95.954], "type": "segment", "width": 0.12}, {"start": [88.03399999999999, 98.454], "end": [90.53399999999999, 98.454], "type": "segment", "width": 0.12}, {"start": [88.734, 86.354], "end": [90.234, 86.354], "type": "segment", "width": 0.12}, {"start": [88.734, 85.354], "end": [88.734, 86.354], "type": "segment", "width": 0.12}, {"start": [88.734, 97.154], "end": [90.234, 97.154], "type": "segment", "width": 0.12}, {"start": [88.734, 98.154], "end": [88.734, 97.154], "type": "segment", "width": 0.12}, {"start": [87.884, 85.854], "end": [87.884, 85.354], "type": "segment", "width": 0.12}, {"start": [86.634, 85.854], "end": [87.884, 85.854], "type": "segment", "width": 0.12}, {"start": [86.634, 97.654], "end": [86.634, 85.854], "type": "segment", "width": 0.12}, {"start": [87.884, 97.654], "end": [86.634, 97.654], "type": "segment", "width": 0.12}, {"start": [87.884, 98.154], "end": [87.884, 97.654], "type": "segment", "width": 0.12}, {"start": [86.134, 85.354], "end": [86.134, 98.154], "type": "segment", "width": 0.12}, {"start": [90.234, 85.354], "end": [86.134, 85.354], "type": "segment", "width": 0.12}, {"start": [90.234, 98.154], "end": [90.234, 85.354], "type": "segment", "width": 0.12}, {"start": [86.134, 98.154], "end": [90.234, 98.154], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "J2", "thickness": 0.15, "pos": [88.27499999999999, 100.1], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "from switches", "thickness": 0.15, "pos": [82.55, 107.94999999999999], "height": 1.0}, {"start": [86.134, 114.41], "end": [90.234, 114.41], "type": "segment", "width": 0.12}, {"start": [90.234, 114.41], "end": [90.234, 101.61], "type": "segment", "width": 0.12}, {"start": [90.234, 101.61], "end": [86.134, 101.61], "type": "segment", "width": 0.12}, {"start": [86.134, 101.61], "end": [86.134, 114.41], "type": "segment", "width": 0.12}, {"start": [87.884, 114.41], "end": [87.884, 113.91], "type": "segment", "width": 0.12}, {"start": [87.884, 113.91], "end": [86.634, 113.91], "type": "segment", "width": 0.12}, {"start": [86.634, 113.91], "end": [86.634, 102.11], "type": "segment", "width": 0.12}, {"start": [86.634, 102.11], "end": [87.884, 102.11], "type": "segment", "width": 0.12}, {"start": [87.884, 102.11], "end": [87.884, 101.61], "type": "segment", "width": 0.12}, {"start": [88.734, 114.41], "end": [88.734, 113.41], "type": "segment", "width": 0.12}, {"start": [88.734, 113.41], "end": [90.234, 113.41], "type": "segment", "width": 0.12}, {"start": [88.734, 101.61], "end": [88.734, 102.61], "type": "segment", "width": 0.12}, {"start": [88.734, 102.61], "end": [90.234, 102.61], "type": "segment", "width": 0.12}, {"start": [88.03399999999999, 114.71], "end": [90.53399999999999, 114.71], "type": "segment", "width": 0.12}, {"start": [90.53399999999999, 114.71], "end": [90.53399999999999, 112.21], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "J3", "thickness": 0.15, "pos": [99.568, 83.63712], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "motor", "thickness": 0.15, "pos": [103.39999999999999, 88.2], "height": 1.0}, {"start": [96.76892, 85.0392], "end": [96.76892, 91.2368], "type": "segment", "width": 0.15}, {"start": [102.36708, 85.0392], "end": [96.76892, 85.0392], "type": "segment", "width": 0.15}, {"start": [102.36708, 91.2368], "end": [102.36708, 85.0392], "type": "segment", "width": 0.15}, {"start": [96.76892, 91.2368], "end": [102.36708, 91.2368], "type": "segment", "width": 0.15}, {"start": [96.76892, 85.43798], "end": [102.36708, 85.43798], "type": "segment", "width": 0.15}, {"start": [99.568, 91.2368], "end": [99.568, 90.73895999999999], "type": "segment", "width": 0.15}, {"start": [102.16896, 90.73895999999999], "end": [102.16896, 91.2368], "type": "segment", "width": 0.15}, {"start": [96.96704, 91.2368], "end": [96.96704, 90.73895999999999], "type": "segment", "width": 0.15}, {"start": [102.36708, 90.73895999999999], "end": [96.76892, 90.73895999999999], "type": "segment", "width": 0.15}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[-2.4002559999999997, 1.919918], [-2.344799, 1.947568], [-2.295852, 1.9984799999999998], [-2.282371, 2.017338], [-2.267686, 2.0420149999999997], [-2.258158, 2.068816], [-2.252707, 2.104587], [-2.250253, 2.156169], [-2.249714, 2.2242669999999998], [-2.252148, 2.3175879999999998], [-2.260606, 2.387657], [-2.276826, 2.439931], [-2.302546, 2.479869], [-2.339503, 2.5129289999999997], [-2.342218, 2.5148859999999997], [-2.37864, 2.5349079999999997], [-2.422498, 2.544815], [-2.4782759999999997, 2.547257], [-2.568952, 2.547257], [-2.56899, 2.635283], [-2.5698339999999997, 2.6843079999999997], [-2.574976, 2.713065], [-2.588413, 2.730311], [-2.6141419999999997, 2.744808], [-2.6203209999999997, 2.747769], [-2.6492359999999997, 2.7616479999999997], [-2.671624, 2.7704139999999997], [-2.688271, 2.771171], [-2.699964, 2.761023], [-2.70749, 2.737073], [-2.7116339999999997, 2.6964259999999998], [-2.7131849999999997, 2.636186], [-2.712929, 2.553455], [-2.711651, 2.4453389999999997], [-2.711252, 2.413], [-2.709815, 2.3015239999999997], [-2.708528, 2.228603], [-2.569029, 2.228603], [-2.5682449999999997, 2.290499], [-2.5647599999999997, 2.330997], [-2.556876, 2.3577079999999997], [-2.5428949999999997, 2.378244], [-2.533403, 2.38826], [-2.494596, 2.417567], [-2.460237, 2.419952], [-2.424784, 2.39575], [-2.423886, 2.394857], [-2.409461, 2.376153], [-2.400687, 2.350732], [-2.396261, 2.311584], [-2.394882, 2.251697], [-2.394857, 2.2384299999999997], [-2.3981879999999998, 2.155901], [-2.4090309999999997, 2.098691], [-2.42866, 2.0637659999999998], [-2.45835, 2.048094], [-2.4755089999999997, 2.0465139999999997], [-2.516234, 2.0539259999999997], [-2.544168, 2.07833], [-2.560983, 2.12298], [-2.5683499999999997, 2.19113], [-2.569029, 2.228603], [-2.708528, 2.228603], [-2.7082919999999997, 2.215245], [-2.706323, 2.150333], [-2.70355, 2.102958], [-2.6996119999999997, 2.06929], [-2.6941509999999997, 2.045498], [-2.686808, 2.0277529999999997], [-2.6772229999999997, 2.012224], [-2.673113, 2.0063809999999997], [-2.618595, 1.951185], [-2.549664, 1.9198899999999999], [-2.469928, 1.911165], [-2.4002559999999997, 1.919918]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[-1.283907, 1.9277799999999998], [-1.237328, 1.954723], [-1.2049429999999999, 1.981466], [-1.181258, 2.009484], [-1.164941, 2.043748], [-1.154661, 2.0892269999999997], [-1.149086, 2.150892], [-1.146884, 2.233711], [-1.146629, 2.293246], [-1.146629, 2.512391], [-1.2083139999999999, 2.540044], [-1.27, 2.567697], [-1.2772569999999999, 2.32767], [-1.2802559999999998, 2.238028], [-1.283402, 2.172962], [-1.287299, 2.1280259999999998], [-1.2925529999999998, 2.09877], [-1.299769, 2.080748], [-1.30955, 2.069511], [-1.3126879999999999, 2.067079], [-1.360239, 2.048083], [-1.4083029999999999, 2.0556], [-1.436914, 2.0755429999999997], [-1.448553, 2.0896749999999997], [-1.456609, 2.1082199999999998], [-1.4617289999999998, 2.1363339999999997], [-1.464559, 2.179173], [-1.465744, 2.241895], [-1.465943, 2.307261], [-1.465982, 2.389268], [-1.4673859999999999, 2.447316], [-1.472086, 2.486465], [-1.482013, 2.51178], [-1.499097, 2.528323], [-1.5252679999999998, 2.541156], [-1.560225, 2.554491], [-1.598404, 2.569007], [-1.593859, 2.3113889999999997], [-1.592029, 2.2185189999999997], [-1.589888, 2.149889], [-1.586819, 2.100711], [-1.582206, 2.066198], [-1.575432, 2.041562], [-1.5658809999999999, 2.022016], [-1.554366, 2.0047699999999997], [-1.49881, 1.9496799999999999], [-1.43102, 1.917822], [-1.357287, 1.910191], [-1.283907, 1.9277799999999998]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[-2.958885, 1.921962], [-2.8908549999999997, 1.957733], [-2.840649, 2.015301], [-2.822815, 2.0523119999999997], [-2.808937, 2.107882], [-2.801833, 2.178096], [-2.80116, 2.254727], [-2.8065729999999998, 2.329552], [-2.81773, 2.394342], [-2.834286, 2.440873], [-2.839374, 2.448887], [-2.899645, 2.508707], [-2.971231, 2.5445349999999998], [-3.048908, 2.55502], [-3.127452, 2.53881], [-3.149311, 2.529092], [-3.191878, 2.4991429999999997], [-3.229237, 2.4594329999999998], [-3.2327679999999996, 2.4543969999999997], [-3.2471189999999996, 2.4301239999999997], [-3.2566059999999997, 2.404178], [-3.26221, 2.370022], [-3.2649139999999996, 2.321119], [-3.265701, 2.2509349999999997], [-3.265714, 2.2352], [-3.265678, 2.2301919999999997], [-3.120571, 2.2301919999999997], [-3.1197269999999997, 2.29643], [-3.1164039999999997, 2.340386], [-3.1094169999999997, 2.368779], [-3.097584, 2.388325], [-3.0915429999999997, 2.394857], [-3.0568139999999997, 2.41968], [-3.023097, 2.418548], [-2.9890049999999997, 2.397016], [-2.968671, 2.3740289999999997], [-2.956629, 2.340478], [-2.9498659999999997, 2.287569], [-2.949402, 2.281399], [-2.948248, 2.185513], [-2.960312, 2.114299], [-2.98543, 2.068194], [-3.02344, 2.047635], [-3.0370079999999997, 2.0465139999999997], [-3.0726359999999997, 2.052152], [-3.097006, 2.0716859999999997], [-3.111907, 2.109042], [-3.119125, 2.16815], [-3.120571, 2.2301919999999997], [-3.265678, 2.2301919999999997], [-3.265174, 2.1604129999999997], [-3.262904, 2.108159], [-3.257932, 2.071949], [-3.249287, 2.045299], [-3.235995, 2.021722], [-3.233057, 2.017338], [-3.183687, 1.958249], [-3.1298909999999998, 1.9239469999999999], [-3.0643979999999997, 1.910331], [-3.0421579999999997, 1.909665], [-2.958885, 1.921962]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[-1.831697, 1.931239], [-1.774473, 1.969735], [-1.730251, 2.025335], [-1.703833, 2.096086], [-1.6984899999999998, 2.1481619999999997], [-1.6990969999999999, 2.169893], [-1.704178, 2.186531], [-1.7181449999999998, 2.201437], [-1.7454109999999998, 2.2179729999999998], [-1.7903879999999999, 2.2394979999999998], [-1.857489, 2.269374], [-1.857829, 2.269524], [-1.9195929999999999, 2.297813], [-1.970241, 2.322933], [-2.004596, 2.342179], [-2.0174819999999998, 2.352848], [-2.017486, 2.352934], [-2.006128, 2.376166], [-1.979569, 2.401774], [-1.949077, 2.4202209999999997], [-1.93363, 2.423886], [-1.8914849999999999, 2.411212], [-1.855192, 2.379471], [-1.837483, 2.344572], [-1.8204479999999998, 2.318845], [-1.787078, 2.289546], [-1.7478509999999998, 2.2642349999999998], [-1.713244, 2.250471], [-1.7060069999999998, 2.249714], [-1.6978609999999998, 2.2621599999999997], [-1.6973699999999998, 2.2939719999999997], [-1.703357, 2.336866], [-1.714643, 2.382558], [-1.7300499999999999, 2.422761], [-1.730829, 2.424322], [-1.777196, 2.489062], [-1.837289, 2.5330969999999997], [-1.905535, 2.5547109999999997], [-1.976362, 2.5521849999999997], [-2.044196, 2.5238039999999997], [-2.047212, 2.521808], [-2.100573, 2.473448], [-2.13566, 2.410352], [-2.155078, 2.327387], [-2.1576839999999997, 2.304078], [-2.162299, 2.194055], [-2.156767, 2.142748], [-2.017486, 2.142748], [-2.015676, 2.174753], [-2.005778, 2.184093], [-1.981102, 2.177105], [-1.942205, 2.160587], [-1.898725, 2.139881], [-1.8976439999999999, 2.1393329999999997], [-1.8607909999999999, 2.119949], [-1.8459999999999999, 2.107013], [-1.8496469999999998, 2.093451], [-1.865005, 2.0756319999999997], [-1.904077, 2.049845], [-1.946154, 2.0479499999999997], [-1.9838969999999998, 2.0667169999999997], [-2.009966, 2.102915], [-2.017486, 2.142748], [-2.156767, 2.142748], [-2.152806, 2.106027], [-2.12845, 2.036212], [-2.094544, 1.987302], [-2.033347, 1.937878], [-1.9659369999999998, 1.9133589999999998], [-1.89712, 1.911797], [-1.831697, 1.931239]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[-0.624114, 1.851289], [-0.619861, 1.910613], [-0.6149749999999999, 1.9455719999999999], [-0.608205, 1.96082], [-0.598298, 1.961015], [-0.595086, 1.959195], [-0.552356, 1.9460149999999998], [-0.49677299999999996, 1.946785], [-0.44026299999999996, 1.9603329999999999], [-0.404918, 1.9778609999999999], [-0.368679, 2.005861], [-0.34218699999999996, 2.037549], [-0.324001, 2.077813], [-0.312678, 2.1315429999999997], [-0.306778, 2.203626], [-0.304857, 2.2989509999999997], [-0.304823, 2.317237], [-0.30479999999999996, 2.522646], [-0.35050899999999996, 2.53858], [-0.382973, 2.54942], [-0.400785, 2.554468], [-0.40130899999999997, 2.5545139999999997], [-0.403063, 2.540828], [-0.40455599999999997, 2.503076], [-0.405674, 2.446224], [-0.40630299999999997, 2.375234], [-0.4064, 2.332073], [-0.40660199999999996, 2.246973], [-0.407642, 2.185981], [-0.410169, 2.144177], [-0.414836, 2.1166419999999997], [-0.422293, 2.098456], [-0.433189, 2.084698], [-0.43999299999999997, 2.078073], [-0.486728, 2.0513749999999997], [-0.537728, 2.049375], [-0.5839989999999999, 2.071955], [-0.592556, 2.080107], [-0.605107, 2.095436], [-0.613812, 2.1136179999999998], [-0.619369, 2.139909], [-0.622474, 2.1795619999999998], [-0.6238239999999999, 2.237832], [-0.624114, 2.318173], [-0.624114, 2.522646], [-0.669823, 2.53858], [-0.702287, 2.54942], [-0.7200989999999999, 2.554468], [-0.720623, 2.5545139999999997], [-0.721963, 2.540623], [-0.7231719999999999, 2.501439], [-0.7241989999999999, 2.4407], [-0.7249979999999999, 2.362141], [-0.7255189999999999, 2.269498], [-0.725714, 2.166509], [-0.725714, 1.769342], [-0.678543, 1.749444], [-0.631371, 1.729547], [-0.624114, 1.851289]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[0.039744, 1.9509679999999998], [0.096616, 1.972087], [0.09726699999999999, 1.9724929999999998], [0.13244, 1.9983799999999998], [0.158407, 2.0286329999999997], [0.17667, 2.0680579999999997], [0.18873199999999998, 2.1214619999999997], [0.196096, 2.193651], [0.200264, 2.2894319999999997], [0.200629, 2.3030779999999997], [0.205876, 2.508842], [0.161716, 2.531678], [0.129763, 2.54711], [0.11047, 2.554423], [0.109578, 2.5545139999999997], [0.106239, 2.541022], [0.103587, 2.504626], [0.10195599999999999, 2.4514519999999997], [0.1016, 2.408393], [0.101592, 2.338641], [0.09840299999999999, 2.294837], [0.08728799999999999, 2.2739439999999997], [0.063501, 2.272925], [0.022296, 2.288741], [-0.039914, 2.317815], [-0.085659, 2.341963], [-0.10918699999999999, 2.362913], [-0.116104, 2.385747], [-0.116114, 2.3868769999999997], [-0.10470099999999999, 2.426212], [-0.070908, 2.447462], [-0.019191, 2.450539], [0.018061, 2.4500059999999997], [0.037703, 2.4607349999999997], [0.049951999999999996, 2.4865049999999997], [0.057002, 2.5193369999999997], [0.046841999999999995, 2.537966], [0.043017, 2.540632], [0.007000999999999999, 2.5513399999999997], [-0.043434, 2.552856], [-0.095374, 2.545759], [-0.132178, 2.532788], [-0.183062, 2.489585], [-0.21198599999999998, 2.429446], [-0.217714, 2.382462], [-0.21334299999999998, 2.3400819999999998], [-0.19752499999999998, 2.305488], [-0.166203, 2.274763], [-0.115322, 2.2439899999999997], [-0.040824, 2.2092519999999998], [-0.036286, 2.2072879999999997], [0.030820999999999998, 2.176287], [0.07223199999999999, 2.150862], [0.08998099999999999, 2.128014], [0.086107, 2.104745], [0.06264299999999999, 2.078056], [0.055626999999999996, 2.071914], [0.008629999999999999, 2.0481], [-0.040067, 2.049103], [-0.082478, 2.072451], [-0.11061599999999999, 2.115675], [-0.113231, 2.12416], [-0.13869199999999998, 2.165308], [-0.17099899999999998, 2.1851279999999997], [-0.217714, 2.20477], [-0.217714, 2.15395], [-0.203504, 2.080082], [-0.161325, 2.012327], [-0.139376, 1.989661], [-0.089483, 1.960569], [-0.026032999999999997, 1.9474], [0.039744, 1.9509679999999998]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[0.529926, 1.949755], [0.595858, 1.974084], [0.649273, 2.017117], [0.670164, 2.047409], [0.692939, 2.102994], [0.6924659999999999, 2.143186], [0.668562, 2.170217], [0.659717, 2.174813], [0.62153, 2.1891439999999998], [0.602028, 2.185472], [0.595422, 2.161407], [0.595086, 2.148114], [0.582992, 2.09921], [0.5514709999999999, 2.064999], [0.507659, 2.048476], [0.45869499999999996, 2.052634], [0.418894, 2.074227], [0.40545, 2.086544], [0.39592099999999997, 2.101487], [0.38948499999999997, 2.124075], [0.38531699999999997, 2.159328], [0.38259699999999996, 2.212266], [0.380502, 2.2879069999999997], [0.37995999999999996, 2.311857], [0.37798099999999996, 2.39379], [0.375731, 2.4514549999999997], [0.372357, 2.489608], [0.367006, 2.513004], [0.358824, 2.526398], [0.34695899999999996, 2.534545], [0.339362, 2.538144], [0.307102, 2.550452], [0.288111, 2.5545139999999997], [0.281836, 2.5409479999999998], [0.278006, 2.499934], [0.2766, 2.430999], [0.277598, 2.333669], [0.277908, 2.318657], [0.280101, 2.229859], [0.28269299999999997, 2.165019], [0.28638199999999997, 2.119067], [0.291864, 2.086935], [0.29983499999999996, 2.0635529999999997], [0.31099299999999996, 2.043852], [0.31683, 2.0354099999999997], [0.350296, 1.998057], [0.387727, 1.9690029999999998], [0.39230899999999996, 1.966467], [0.459426, 1.946443], [0.529926, 1.949755]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[1.1901169999999999, 2.065358], [1.189933, 2.173837], [1.189219, 2.257287], [1.187675, 2.3197039999999998], [1.185001, 2.365085], [1.1808939999999999, 2.397429], [1.175055, 2.420733], [1.167182, 2.438995], [1.1612209999999998, 2.449418], [1.111855, 2.505945], [1.049264, 2.5413769999999998], [0.9800129999999999, 2.55409], [0.9106679999999999, 2.5424629999999997], [0.869375, 2.521568], [0.826025, 2.485422], [0.796481, 2.441276], [0.778655, 2.3834619999999997], [0.770463, 2.306313], [0.7693019999999999, 2.249714], [0.769458, 2.245647], [0.870857, 2.245647], [0.8714759999999999, 2.31055], [0.8743139999999999, 2.353514], [0.88084, 2.3816219999999997], [0.892523, 2.401953], [0.9064829999999999, 2.417288], [0.9533649999999999, 2.44689], [1.003701, 2.449419], [1.0512759999999999, 2.424705], [1.054979, 2.421356], [1.070783, 2.4039349999999997], [1.080693, 2.383209], [1.086058, 2.352362], [1.088228, 2.304577], [1.088571, 2.251748], [1.0878269999999999, 2.185381], [1.084748, 2.1411059999999997], [1.078061, 2.112009], [1.0664959999999999, 2.091173], [1.057013, 2.080107], [1.0129599999999999, 2.0521979999999997], [0.962224, 2.0488429999999997], [0.9137959999999999, 2.070159], [0.90445, 2.078073], [0.88854, 2.095647], [0.87861, 2.116587], [0.873278, 2.147782], [0.8711629999999999, 2.196122], [0.870857, 2.245647], [0.769458, 2.245647], [0.77281, 2.158568], [0.7847259999999999, 2.090086], [0.8071349999999999, 2.0385999999999997], [0.842124, 1.998443], [0.869375, 1.9778609999999999], [0.9189069999999999, 1.955625], [0.976316, 1.945304], [1.029682, 1.948067], [1.059543, 1.959212], [1.071261, 1.962383], [1.079037, 1.9505569999999999], [1.084465, 1.918866], [1.088571, 1.870593], [1.093067, 1.816829], [1.099313, 1.784482], [1.110676, 1.765985], [1.130528, 1.7537699999999998], [1.143, 1.748362], [1.1901709999999999, 1.7286009999999998], [1.1901169999999999, 2.065358]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[1.779833, 1.9586629999999998], [1.7820479999999999, 1.99685], [1.7837839999999998, 2.0548859999999998], [1.784899, 2.12818], [1.7852569999999999, 2.2050549999999998], [1.7852569999999999, 2.4651959999999997], [1.739326, 2.5111269999999997], [1.7076749999999998, 2.5394289999999997], [1.6798899999999999, 2.550893], [1.641915, 2.5501679999999998], [1.6268399999999998, 2.548321], [1.579726, 2.542948], [1.540756, 2.539869], [1.5312569999999999, 2.5395849999999998], [1.499233, 2.541445], [1.4534319999999998, 2.5461139999999998], [1.435674, 2.548321], [1.3920569999999999, 2.551735], [1.3627449999999999, 2.54432], [1.33368, 2.521427], [1.323188, 2.5111269999999997], [1.2772569999999999, 2.4651959999999997], [1.2772569999999999, 1.978602], [1.314226, 1.961758], [1.346059, 1.949282], [1.3646829999999999, 1.9449139999999998], [1.3694579999999998, 1.958718], [1.373921, 1.997286], [1.377775, 2.056356], [1.380722, 2.131663], [1.382143, 2.195286], [1.3861139999999998, 2.4456569999999997], [1.4207589999999999, 2.4505559999999997], [1.452268, 2.4471309999999997], [1.467708, 2.436041], [1.4720229999999999, 2.415308], [1.475708, 2.371145], [1.478469, 2.3091459999999997], [1.4800119999999999, 2.234909], [1.480235, 2.196706], [1.480457, 1.976783], [1.526166, 1.9608489999999998], [1.5585179999999998, 1.9500149999999998], [1.576115, 1.9449619999999999], [1.5766229999999999, 1.9449139999999998], [1.578388, 1.958648], [1.5803289999999999, 1.99673], [1.582282, 2.0544819999999997], [1.5840839999999998, 2.127227], [1.585343, 2.195286], [1.589314, 2.4456569999999997], [1.6764, 2.4456569999999997], [1.680396, 2.21724], [1.684392, 1.9888219999999999], [1.726847, 1.9668679999999998], [1.758192, 1.951793], [1.7767439999999999, 1.9449509999999999], [1.7772789999999998, 1.9449139999999998], [1.779833, 1.9586629999999998]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[2.144876, 1.956335], [2.186667, 1.975344], [2.2194689999999997, 1.998378], [2.243503, 2.024133], [2.260097, 2.057358], [2.270577, 2.1028], [2.276271, 2.165207], [2.278507, 2.249327], [2.278743, 2.304721], [2.278743, 2.520826], [2.241774, 2.53767], [2.212656, 2.549981], [2.198231, 2.5545139999999997], [2.195472, 2.541025], [2.193282, 2.504653], [2.191942, 2.451542], [2.1916569999999997, 2.409372], [2.1904339999999998, 2.3484469999999997], [2.1871359999999997, 2.300115], [2.182321, 2.270518], [2.178496, 2.264229], [2.152783, 2.270652], [2.112418, 2.287125], [2.065679, 2.309458], [2.020845, 2.333457], [1.9861929999999999, 2.35493], [1.9700019999999998, 2.369685], [1.969938, 2.3698449999999998], [1.9713299999999998, 2.3971519999999997], [1.9838179999999999, 2.423219], [2.005743, 2.4443919999999997], [2.037743, 2.4514739999999997], [2.065092, 2.450649], [2.1038259999999998, 2.450042], [2.124158, 2.459116], [2.1363689999999997, 2.483092], [2.137909, 2.487613], [2.1432029999999997, 2.5218059999999998], [2.129047, 2.5425679999999997], [2.092148, 2.552462], [2.052289, 2.554292], [1.980562, 2.540727], [1.9434319999999998, 2.521355], [1.897576, 2.475845], [1.8732559999999998, 2.4199829999999998], [1.871073, 2.360957], [1.891629, 2.3059529999999997], [1.9225489999999998, 2.271486], [1.95342, 2.252189], [2.001942, 2.227759], [2.058485, 2.202985], [2.06791, 2.1991989999999997], [2.130019, 2.171791], [2.165822, 2.147634], [2.177337, 2.1236189999999997], [2.1665799999999997, 2.096635], [2.148114, 2.0755429999999997], [2.104469, 2.049572], [2.0564459999999998, 2.047624], [2.012406, 2.067637], [1.9807089999999998, 2.107551], [1.976549, 2.117848], [1.952327, 2.1557239999999998], [1.9169649999999998, 2.183842], [1.8723429999999999, 2.206917], [1.8723429999999999, 2.141485], [1.8749689999999999, 2.101506], [1.8862299999999999, 2.069997], [1.9111989999999999, 2.036378], [1.935169, 2.010484], [1.9724409999999999, 1.973817], [2.001401, 1.954121], [2.032505, 1.9462199999999998], [2.067713, 1.9449139999999998], [2.144876, 1.956335]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[2.6526, 1.9587519999999998], [2.6699479999999998, 1.9663339999999998], [2.711356, 1.999128], [2.746765, 2.046547], [2.768664, 2.0971509999999998], [2.772229, 2.122098], [2.7602789999999997, 2.156927], [2.734067, 2.175357], [2.705964, 2.1865159999999997], [2.693095, 2.1885719999999997], [2.686829, 2.1736489999999997], [2.6744559999999997, 2.141175], [2.669028, 2.126502], [2.6385899999999998, 2.075744], [2.5945199999999997, 2.050427], [2.53801, 2.051206], [2.5338249999999998, 2.052203], [2.5036549999999997, 2.066507], [2.481476, 2.0943929999999997], [2.4663269999999997, 2.139287], [2.4572499999999997, 2.204615], [2.453286, 2.2938039999999997], [2.452914, 2.341261], [2.45273, 2.416071], [2.4515219999999998, 2.467069], [2.448309, 2.4994709999999998], [2.442109, 2.5184949999999997], [2.43194, 2.529356], [2.416819, 2.5372719999999997], [2.415946, 2.53767], [2.386828, 2.549981], [2.372403, 2.5545139999999997], [2.370186, 2.540809], [2.368289, 2.502925], [2.366847, 2.445715], [2.365998, 2.374027], [2.3658289999999997, 2.321565], [2.366692, 2.220047], [2.3700699999999997, 2.143032], [2.377142, 2.086023], [2.389088, 2.044526], [2.4070899999999997, 2.014043], [2.432327, 1.9900799999999998], [2.4572469999999997, 1.973355], [2.517171, 1.9510969999999999], [2.5869109999999997, 1.946076], [2.6526, 1.9587519999999998]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[3.1535949999999997, 1.966966], [3.2110209999999997, 2.0044969999999998], [3.2387189999999997, 2.038096], [3.260662, 2.099064], [3.2624049999999998, 2.1473079999999998], [3.258457, 2.211816], [3.109686, 2.276934], [3.037349, 2.310202], [2.990084, 2.336964], [2.9655069999999997, 2.360144], [2.9612369999999997, 2.382667], [2.9748889999999997, 2.4074549999999997], [2.989943, 2.423886], [3.033746, 2.4502349999999997], [3.0813889999999997, 2.4520809999999997], [3.125145, 2.431546], [3.157289, 2.390752], [3.163038, 2.376347], [3.1905759999999996, 2.331356], [3.222258, 2.312182], [3.265714, 2.295779], [3.265714, 2.357966], [3.261872, 2.400283], [3.246823, 2.435969], [3.21528, 2.476943], [3.2105919999999997, 2.482267], [3.175506, 2.51872], [3.1453469999999997, 2.538283], [3.107615, 2.5472829999999997], [3.076335, 2.55023], [3.0203849999999997, 2.5509649999999997], [2.980555, 2.54166], [2.955708, 2.527846], [2.9166559999999997, 2.497467], [2.8896249999999997, 2.464613], [2.8725169999999998, 2.423294], [2.863238, 2.367521], [2.859693, 2.291305], [2.85941, 2.2526219999999997], [2.860372, 2.206247], [2.948007, 2.206247], [2.949023, 2.2311259999999997], [2.951556, 2.2352], [2.968274, 2.229665], [3.0042489999999997, 2.215017], [3.0523309999999997, 2.19419], [3.062386, 2.189714], [3.1231519999999997, 2.158814], [3.1566319999999997, 2.1316569999999997], [3.1639899999999996, 2.10622], [3.146391, 2.080481], [3.131856, 2.069109], [3.0794099999999998, 2.046364], [3.030322, 2.050122], [2.989227, 2.077884], [2.960758, 2.1271519999999997], [2.951631, 2.166257], [2.948007, 2.206247], [2.860372, 2.206247], [2.861285, 2.162249], [2.8681959999999997, 2.0953839999999997], [2.881884, 2.0466949999999997], [2.904096, 2.010849], [2.936574, 1.982513], [2.950733, 1.973355], [3.015053, 1.9495069999999999], [3.085473, 1.948006], [3.1535949999999997, 1.966966]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[0.10390999999999999, -2.7576519999999998], [0.182454, -2.757222], [0.23929799999999998, -2.756058], [0.278105, -2.753793], [0.302538, -2.75006], [0.316262, -2.744494], [0.32294, -2.7367269999999997], [0.32623599999999997, -2.7263949999999997], [0.326556, -2.725057], [0.33156199999999997, -2.7009209999999997], [0.340829, -2.653299], [0.353392, -2.587259], [0.368287, -2.507872], [0.384551, -2.420204], [0.385119, -2.417125], [0.40141, -2.3312109999999997], [0.41665199999999997, -2.2553039999999998], [0.429861, -2.193955], [0.440054, -2.151718], [0.446248, -2.133145], [0.44654299999999997, -2.132816], [0.464788, -2.123747], [0.502405, -2.1086329999999998], [0.551271, -2.090738], [0.551543, -2.090642], [0.613093, -2.067507], [0.685657, -2.038035], [0.754057, -2.008403], [0.7572939999999999, -2.006938], [0.868702, -1.9563739999999998], [1.115399, -2.12484], [1.191077, -2.1761969999999997], [1.259631, -2.222111], [1.317088, -2.25997], [1.359476, -2.287163], [1.382825, -2.301079], [1.3850419999999999, -2.302111], [1.40201, -2.297516], [1.433701, -2.2753449999999997], [1.481352, -2.234553], [1.546198, -2.174095], [1.6123969999999999, -2.109773], [1.6762139999999999, -2.046388], [1.733329, -1.988549], [1.780305, -1.939825], [1.8137029999999998, -1.9037899999999999], [1.830085, -1.884016], [1.8306939999999998, -1.882998], [1.8325049999999998, -1.8694279999999999], [1.825683, -1.847267], [1.8085399999999998, -1.8135219999999999], [1.779393, -1.7651999999999999], [1.7365549999999998, -1.6993079999999998], [1.6794479999999998, -1.614483], [1.628766, -1.539823], [1.583461, -1.4728599999999998], [1.54615, -1.417484], [1.519452, -1.37758], [1.505985, -1.357038], [1.505137, -1.3556439999999998], [1.506781, -1.3359619999999999], [1.519245, -1.297707], [1.5400479999999999, -1.248111], [1.547462, -1.232272], [1.5798139999999998, -1.16171], [1.614328, -1.081647], [1.6423649999999999, -1.012371], [1.6625679999999998, -0.960955], [1.678615, -0.921881], [1.6878879999999998, -0.901459], [1.689041, -0.899886], [1.7060959999999998, -0.8972789999999999], [1.746298, -0.890137], [1.8043019999999999, -0.879477], [1.874763, -0.866315], [1.952335, -0.851667], [2.031672, -0.8365509999999999], [2.107431, -0.821982], [2.174264, -0.808978], [2.226828, -0.798555], [2.259776, -0.7917299999999999], [2.267857, -0.789801], [2.276205, -0.785038], [2.2825059999999997, -0.7742819999999999], [2.287045, -0.753902], [2.290104, -0.720266], [2.291967, -0.6697449999999999], [2.292918, -0.598708], [2.29324, -0.503524], [2.293257, -0.464508], [2.293257, -0.147201], [2.217057, -0.132161], [2.174663, -0.12400499999999999], [2.1113999999999997, -0.11210099999999999], [2.0349619999999997, -0.097884], [1.9530429999999999, -0.08279], [1.9304, -0.07864499999999999], [1.854806, -0.063947], [1.788953, -0.049495], [1.7383659999999999, -0.036625], [1.7085739999999998, -0.026678], [1.703612, -0.023712999999999998], [1.6914259999999999, -0.002717], [1.673953, 0.037967], [1.654577, 0.090322], [1.650734, 0.1016], [1.6253389999999999, 0.17152299999999998], [1.5938169999999998, 0.250418], [1.5629689999999998, 0.321266], [1.562817, 0.32159499999999996], [1.511447, 0.432733], [1.680399, 0.681253], [1.8493519999999999, 0.9297719999999999], [1.632429, 1.147058], [1.566819, 1.2117259999999999], [1.5069789999999998, 1.2687329999999999], [1.456267, 1.315033], [1.418046, 1.347584], [1.395675, 1.363343], [1.392466, 1.3643429999999999], [1.373626, 1.356469], [1.33518, 1.334578], [1.2813299999999999, 1.301267], [1.216276, 1.259131], [1.14594, 1.211943], [1.074555, 1.16381], [1.010908, 1.121928], [0.9590409999999999, 1.088871], [0.922995, 1.067218], [0.906867, 1.059543], [0.887189, 1.066037], [0.8498749999999999, 1.08315], [0.8026209999999999, 1.107326], [0.797612, 1.110013], [0.733977, 1.141927], [0.690341, 1.157579], [0.663202, 1.157745], [0.649057, 1.1432039999999999], [0.648975, 1.143], [0.641905, 1.1257789999999999], [0.625042, 1.084899], [0.599695, 1.023525], [0.567171, 0.944819], [0.528778, 0.851947], [0.485822, 0.748072], [0.444222, 0.647502], [0.39850399999999997, 0.536516], [0.356526, 0.433703], [0.319548, 0.342215], [0.288827, 0.26520099999999996], [0.26562199999999997, 0.205815], [0.25118999999999997, 0.167209], [0.246743, 0.1528], [0.257896, 0.136272], [0.28706899999999996, 0.10993], [0.325971, 0.080887], [0.436757, -0.010961], [0.523351, -0.116241], [0.584716, -0.232734], [0.619815, -0.358224], [0.6276079999999999, -0.49049299999999996], [0.621943, -0.551543], [0.591078, -0.678205], [0.53792, -0.790059], [0.465767, -0.885999], [0.377917, -0.964924], [0.277665, -1.02573], [0.16831, -1.067313], [0.053147, -1.0885719999999999], [-0.064525, -1.088401], [-0.18141, -1.065699], [-0.294211, -1.0193619999999999], [-0.39963099999999996, -0.948287], [-0.44363199999999997, -0.9080889999999999], [-0.528021, -0.804871], [-0.586778, -0.692075], [-0.620296, -0.57299], [-0.628965, -0.450905], [-0.613177, -0.329107], [-0.573322, -0.210884], [-0.5097929999999999, -0.099525], [-0.422979, 0.001684], [-0.325971, 0.080887], [-0.285563, 0.111162], [-0.25701799999999997, 0.137219], [-0.246743, 0.152825], [-0.252123, 0.169843], [-0.26742499999999997, 0.2105], [-0.291388, 0.271642], [-0.322756, 0.35011899999999996], [-0.360268, 0.44278], [-0.402667, 0.546472], [-0.444337, 0.6475259999999999], [-0.49030999999999997, 0.7586069999999999], [-0.532893, 0.861541], [-0.5707789999999999, 0.9531649999999999], [-0.60266, 1.030316], [-0.6272289999999999, 1.089831], [-0.64318, 1.128544], [-0.64909, 1.143], [-0.663052, 1.1576849999999999], [-0.69006, 1.1576419999999998], [-0.733587, 1.142099], [-0.79711, 1.110284], [-0.797612, 1.110013], [-0.84544, 1.085323], [-0.884103, 1.067338], [-0.905905, 1.059614], [-0.906867, 1.059543], [-0.923279, 1.067378], [-0.959513, 1.089165], [-1.011526, 1.122328], [-1.075275, 1.164291], [-1.14594, 1.211943], [-1.217884, 1.2601909999999998], [-1.282726, 1.3021509999999998], [-1.336265, 1.335227], [-1.3743029999999998, 1.3568209999999998], [-1.392467, 1.3643429999999999], [-1.409192, 1.354457], [-1.44282, 1.3268259999999998], [-1.48999, 1.284495], [-1.547342, 1.230505], [-1.611516, 1.167899], [-1.6325029999999998, 1.1469829999999999], [-1.8495009999999998, 0.929623], [-1.684332, 0.6872199999999999], [-1.634136, 0.612781], [-1.5900809999999999, 0.545972], [-1.554638, 0.49066499999999996], [-1.530281, 0.450729], [-1.5194779999999999, 0.430036], [-1.519162, 0.42856299999999997], [-1.524857, 0.409058], [-1.540174, 0.369822], [-1.562463, 0.31743], [-1.578107, 0.28235499999999997], [-1.607359, 0.215201], [-1.634906, 0.147358], [-1.6562629999999998, 0.09003399999999999], [-1.662065, 0.072572], [-1.678548, 0.025938], [-1.6946599999999998, -0.010095], [-1.7035099999999999, -0.023712999999999998], [-1.72304, -0.032048], [-1.765666, -0.043863], [-1.825855, -0.057818999999999995], [-1.898078, -0.072578], [-1.9304, -0.07864499999999999], [-2.0124779999999998, -0.09372699999999999], [-2.091205, -0.108331], [-2.158891, -0.12101999999999999], [-2.20784, -0.130358], [-2.217057, -0.132161], [-2.293257, -0.147201], [-2.293257, -0.464508], [-2.2930859999999997, -0.568846], [-2.2923839999999998, -0.647787], [-2.290866, -0.704962], [-2.288251, -0.7440009999999999], [-2.284254, -0.768535], [-2.278591, -0.782195], [-2.2709799999999998, -0.788611], [-2.267857, -0.789801], [-2.249022, -0.79402], [-2.2074119999999997, -0.802438], [-2.14837, -0.814039], [-2.0772429999999997, -0.827805], [-1.999375, -0.8427199999999999], [-1.920113, -0.857768], [-1.8448019999999998, -0.871931], [-1.778787, -0.8841939999999999], [-1.7274129999999999, -0.893539], [-1.696025, -0.8989499999999999], [-1.689041, -0.899886], [-1.682715, -0.912404], [-1.66871, -0.945754], [-1.649645, -0.9936229999999999], [-1.642366, -1.012371], [-1.6130039999999999, -1.084805], [-1.5784289999999999, -1.16483], [-1.547463, -1.232272], [-1.5246769999999998, -1.283841], [-1.509518, -1.326215], [-1.5044579999999999, -1.352166], [-1.505264, -1.3556439999999998], [-1.5159589999999998, -1.372064], [-1.5403799999999999, -1.408583], [-1.575905, -1.4613129999999999], [-1.619913, -1.526365], [-1.669783, -1.5998489999999999], [-1.679644, -1.614355], [-1.7375079999999998, -1.700296], [-1.780044, -1.765739], [-1.808946, -1.813696], [-1.82591, -1.8471799999999998], [-1.832633, -1.869205], [-1.8308099999999998, -1.8827829999999999], [-1.8307639999999998, -1.882869], [-1.816414, -1.9007029999999998], [-1.7846769999999998, -1.9351829999999999], [-1.7389899999999998, -1.982732], [-1.682796, -2.039778], [-1.619532, -2.102745], [-1.612398, -2.109773], [-1.53267, -2.1869799999999997], [-1.4711429999999999, -2.24367], [-1.426579, -2.28089], [-1.397743, -2.2996849999999998], [-1.3850419999999999, -2.302111], [-1.366506, -2.2915289999999997], [-1.328039, -2.267084], [-1.273614, -2.231388], [-1.2072019999999999, -2.1870529999999997], [-1.1327749999999999, -2.136689], [-1.115399, -2.12484], [-0.868703, -1.9563739999999998], [-0.7572939999999999, -2.006938], [-0.689543, -2.036405], [-0.616817, -2.066041], [-0.5542969999999999, -2.08967], [-0.551543, -2.090642], [-0.50264, -2.108543], [-0.464943, -2.12368], [-0.446575, -2.13279], [-0.446544, -2.132816], [-0.44071499999999997, -2.149283], [-0.43080799999999997, -2.189781], [-0.417805, -2.249758], [-0.40269099999999997, -2.3246599999999997], [-0.38644799999999996, -2.409936], [-0.385119, -2.417125], [-0.36882499999999996, -2.5049859999999997], [-0.353867, -2.58474], [-0.341209, -2.651319], [-0.331814, -2.699653], [-0.326646, -2.724675], [-0.326556, -2.725057], [-0.323411, -2.7357009999999997], [-0.31729599999999997, -2.743738], [-0.304547, -2.749533], [-0.2815, -2.753453], [-0.24449099999999999, -2.755865], [-0.189856, -2.757135], [-0.11393299999999999, -2.7576289999999997], [-0.013056, -2.757714], [0.0, -2.757714], [0.10390999999999999, -2.7576519999999998]]]}]}, "edges_bbox": {"minx": 80.759999, "miny": 79.769999, "maxx": 130.86000099999998, "maxy": 119.87000099999999}, "metadata": {"date": "2019-01-17 16:42:24", "company": "", "revision": "", "title": "motor"}}
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+/* Utility functions */
+
+var storagePrefix = 'KiCad_HTML_BOM__' + pcbdata.metadata.title + '__' +
+ pcbdata.metadata.revision + '__';
+var storage;
+
+function initStorage(key) {
+ try {
+ window.localStorage.getItem("blank");
+ storage = window.localStorage;
+ } catch (e) {
+ // localStorage not available
+ }
+ if (!storage) {
+ try {
+ window.sessionStorage.getItem("blank");
+ storage = window.sessionStorage;
+ } catch (e) {
+ // sessionStorage also not available
+ }
+ }
+}
+
+function readStorage(key) {
+ if (storage) {
+ return storage.getItem(storagePrefix + '#' + key);
+ } else {
+ return null;
+ }
+}
+
+function writeStorage(key, value) {
+ if (storage) {
+ storage.setItem(storagePrefix + '#' + key, value);
+ }
+}
+
+function fancyDblClickHandler(el, onsingle, ondouble) {
+ return function() {
+ if (el.getAttribute("data-dblclick") == null) {
+ el.setAttribute("data-dblclick", 1);
+ setTimeout(function() {
+ if (el.getAttribute("data-dblclick") == 1) {
+ onsingle();
+ }
+ el.removeAttribute("data-dblclick");
+ }, 200);
+ } else {
+ el.removeAttribute("data-dblclick");
+ ondouble();
+ }
+ }
+}
+
+function smoothScrollToRow(rowid) {
+ document.getElementById(rowid).scrollIntoView({
+ behavior: "smooth",
+ block: "center",
+ inline: "nearest"
+ });
+}
+
+function focusInputField(input) {
+ input.scrollIntoView(false);
+ input.focus();
+ input.select();
+}
+
+function copyToClipboard() {
+ var text = '';
+ for (var node of bomhead.childNodes[0].childNodes) {
+ if (node.firstChild) {
+ text = text + node.firstChild.nodeValue;
+ }
+ if (node != bomhead.childNodes[0].lastChild) {
+ text += '\t';
+ }
+ }
+ text += '\n';
+ for (var row of bombody.childNodes) {
+ for (var cell of row.childNodes) {
+ for (var node of cell.childNodes) {
+ if (node.nodeName == "INPUT") {
+ if (node.checked) {
+ text = text + '✓';
+ }
+ } else if (node.nodeName == "MARK") {
+ text = text + node.firstChild.nodeValue;
+ } else {
+ text = text + node.nodeValue;
+ }
+ }
+ if (cell != row.lastChild) {
+ text += '\t';
+ }
+ }
+ text += '\n';
+ }
+ var textArea = document.createElement("textarea");
+ textArea.classList.add('clipboard-temp');
+ textArea.value = text;
+
+ document.body.appendChild(textArea);
+ textArea.focus();
+ textArea.select();
+
+ try {
+ if (document.execCommand('copy')) {
+ console.log('Bom copied to clipboard.');
+ }
+ } catch (err) {
+ console.log('Can not copy to clipboard.');
+ }
+
+ document.body.removeChild(textArea);
+}
+
+function removeGutterNode(node) {
+ for (var i = 0; i < node.childNodes.length; i++) {
+ if (node.childNodes[i].classList &&
+ node.childNodes[i].classList.contains("gutter")) {
+ node.removeChild(node.childNodes[i]);
+ break;
+ }
+ }
+}
+
+function cleanGutters() {
+ removeGutterNode(document.getElementById("bot"));
+ removeGutterNode(document.getElementById("canvasdiv"));
+}
+
+var units = {
+ prefixes: {
+ giga: ["G", "g", "giga", "Giga", "GIGA"],
+ mega: ["M", "mega", "Mega", "MEGA"],
+ kilo: ["K", "k", "kilo", "Kilo", "KILO"],
+ milli: ["m", "milli", "Milli", "MILLI"],
+ micro: ["U", "u", "micro", "Micro", "MICRO", "μ", "µ"], // different utf8 μ
+ nano: ["N", "n", "nano", "Nano", "NANO"],
+ pico: ["P", "p", "pico", "Pico", "PICO"],
+ },
+ unitsShort: ["R", "r", "Ω", "F", "f", "H", "h"],
+ unitsLong: [
+ "OHM", "Ohm", "ohm", "ohms",
+ "FARAD", "Farad", "farad",
+ "HENRY", "Henry", "henry"
+ ],
+ getMultiplier: function(s) {
+ if (this.prefixes.giga.includes(s)) return 1e9;
+ if (this.prefixes.mega.includes(s)) return 1e6;
+ if (this.prefixes.kilo.includes(s)) return 1e3;
+ if (this.prefixes.milli.includes(s)) return 1e-3;
+ if (this.prefixes.micro.includes(s)) return 1e-6;
+ if (this.prefixes.nano.includes(s)) return 1e-9;
+ if (this.prefixes.pico.includes(s)) return 1e-12;
+ return 1;
+ },
+ valueRegex: null,
+}
+
+function initUtils() {
+ var allPrefixes = units.prefixes.giga
+ .concat(units.prefixes.mega)
+ .concat(units.prefixes.kilo)
+ .concat(units.prefixes.milli)
+ .concat(units.prefixes.micro)
+ .concat(units.prefixes.nano)
+ .concat(units.prefixes.pico);
+ var allUnits = units.unitsShort.concat(units.unitsLong);
+ units.valueRegex = new RegExp("^([0-9\.]+)" +
+ "\\s*(" + allPrefixes.join("|") + ")?" +
+ "(" + allUnits.join("|") + ")?" +
+ "(\\b.*)?$", "");
+ units.valueAltRegex = new RegExp("^([0-9]*)" +
+ "(" + units.unitsShort.join("|") + ")?" +
+ "([GgMmKkUuNnPp])?" +
+ "([0-9]*)" +
+ "(\\b.*)?$", "");
+ for (var bomtable of Object.values(pcbdata.bom)) {
+ for (var row of bomtable) {
+ row.push(parseValue(row[1], row[3][0][0]));
+ }
+ }
+}
+
+function parseValue(val, ref) {
+ var inferUnit = (unit, ref) => {
+ if (unit) {
+ unit = unit.toLowerCase();
+ if (unit == 'Ω' || unit == "ohm" || unit == "ohms") {
+ unit = 'r';
+ }
+ unit = unit[0];
+ } else {
+ ref = /^([a-z]+)\d+$/i.exec(ref);
+ if (ref) {
+ ref = ref[1].toLowerCase();
+ if (ref == "c") unit = 'f';
+ else if (ref == "l") unit = 'h';
+ else if (ref == "r" || ref == "rv") unit = 'r';
+ else unit = null;
+ }
+ }
+ return unit;
+ };
+ val = val.replace(/,/g, "");
+ var match = units.valueRegex.exec(val);
+ var unit;
+ if (match) {
+ val = parseFloat(match[1]);
+ if (match[2]) {
+ val = val * units.getMultiplier(match[2]);
+ }
+ unit = inferUnit(match[3], ref);
+ if (!unit) return null;
+ else return {
+ val: val,
+ unit: unit,
+ extra: match[4],
+ }
+ }
+ match = units.valueAltRegex.exec(val);
+ if (match && (match[1] || match[4])) {
+ val = parseFloat(match[1] + "." + match[4]);
+ if (match[3]) {
+ val = val * units.getMultiplier(match[3]);
+ }
+ unit = inferUnit(match[2], ref);
+ if (!unit) return null;
+ else return {
+ val: val,
+ unit: unit,
+ extra: match[5],
+ }
+ }
+ return null;
+}
+
+function valueCompare(a, b, stra, strb) {
+ if (a === null && b === null) {
+ // Failed to parse both values, compare them as strings.
+ if (stra != strb) return stra > strb ? 1 : -1;
+ else return 0;
+ } else if (a === null) {
+ return 1;
+ } else if (b === null) {
+ return -1;
+ } else {
+ if (a.unit != b.unit) return a.unit > b.unit ? 1 : -1;
+ else if (a.val != b.val) return a.val > b.val ? 1 : -1;
+ else if (a.extra != b.extra) return a.extra > b.extra ? 1 : -1;
+ else return 0;
+ }
+}
+
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+/* PCB rendering code */
+
+var redrawOnDrag = true;
+var boardRotation = 0;
+
+function deg2rad(deg) {
+ return deg * Math.PI / 180;
+}
+
+function calcFontPoint(linepoint, text, offsetx, offsety, tilt) {
+ var point = [
+ linepoint[0] * text.width + offsetx,
+ linepoint[1] * text.height + offsety
+ ];
+ // Adding half a line height here is technically a bug
+ // but pcbnew currently does the same, text is slightly shifted.
+ point[0] -= (point[1] + text.height * 0.5) * tilt;
+ return point;
+}
+
+function drawtext(ctx, text, color, flip) {
+ ctx.save();
+ ctx.translate(...text.pos);
+ var angle = -text.angle;
+ if (text.attr.includes("mirrored")) {
+ ctx.scale(-1, 1);
+ angle = -angle;
+ }
+ var tilt = 0;
+ if (text.attr.includes("italic")) {
+ tilt = 0.125;
+ }
+ var interline = (text.height * 1.5 + text.thickness) / 2;
+ var txt = text.text.split("\n");
+ // KiCad ignores last empty line.
+ if (txt[txt.length-1] == '') txt.pop();
+ ctx.rotate(deg2rad(angle));
+ ctx.fillStyle = color;
+ ctx.strokeStyle = color;
+ ctx.lineCap = "round";
+ ctx.lineWidth = text.thickness;
+ for (var i in txt) {
+ var offsety = (-(txt.length - 1) + i * 2) * interline + text.height / 2;
+ var lineWidth = 0;
+ for (var c of txt[i]) {
+ lineWidth += pcbdata.font_data[c].w * text.width;
+ }
+ var offsetx = 0;
+ switch (text.horiz_justify) {
+ case -1:
+ // Justify left, do nothing
+ break;
+ case 0:
+ // Justify center
+ offsetx -= lineWidth / 2;
+ break;
+ case 1:
+ // Justify right
+ offsetx -= lineWidth;
+ break;
+ }
+ for (var c of txt[i]) {
+ for (var line of pcbdata.font_data[c].l) {
+ // Drawing each segment separately instead of
+ // polyline because round line caps don't work in joints
+ for (var i = 0; i < line.length - 1; i++) {
+ ctx.beginPath();
+ ctx.moveTo(...calcFontPoint(line[i], text, offsetx, offsety, tilt));
+ ctx.lineTo(...calcFontPoint(line[i + 1], text, offsetx, offsety, tilt));
+ ctx.stroke();
+ }
+ }
+ offsetx += pcbdata.font_data[c].w * text.width;
+ }
+ }
+ ctx.restore();
+}
+
+function drawedge(ctx, scalefactor, edge, color) {
+ ctx.strokeStyle = color;
+ ctx.lineWidth = Math.max(1 / scalefactor, edge.width);
+ ctx.lineCap = "round";
+ if (edge.type == "segment") {
+ ctx.beginPath();
+ ctx.moveTo(...edge.start);
+ ctx.lineTo(...edge.end);
+ ctx.stroke();
+ }
+ if (edge.type == "arc") {
+ ctx.beginPath();
+ ctx.arc(
+ ...edge.start,
+ edge.radius,
+ deg2rad(edge.startangle),
+ deg2rad(edge.endangle));
+ ctx.stroke();
+ }
+ if (edge.type == "circle") {
+ ctx.beginPath();
+ ctx.arc(
+ ...edge.start,
+ edge.radius,
+ 0, 2 * Math.PI);
+ ctx.closePath();
+ ctx.stroke();
+ }
+}
+
+function drawRoundRect(ctx, color, size, radius, ctxmethod) {
+ ctx.beginPath();
+ ctx.strokeStyle = color;
+ var x = size[0] * -0.5;
+ var y = size[1] * -0.5;
+ var width = size[0];
+ var height = size[1];
+ ctx.moveTo(x, 0);
+ ctx.arcTo(x, y + height, x + width, y + height, radius);
+ ctx.arcTo(x + width, y + height, x + width, y, radius);
+ ctx.arcTo(x + width, y, x, y, radius);
+ ctx.arcTo(x, y, x, y + height, radius);
+ ctx.closePath();
+ ctxmethod();
+}
+
+function drawOblong(ctx, color, size, ctxmethod) {
+ drawRoundRect(ctx, color, size, Math.min(size[0], size[1]) / 2, ctxmethod);
+}
+
+function drawPolygons(ctx, color, polygons, ctxmethod) {
+ ctx.fillStyle = color;
+ for (var polygon of polygons) {
+ ctx.beginPath();
+ for (var vertex of polygon) {
+ ctx.lineTo(...vertex)
+ }
+ ctx.closePath();
+ ctxmethod();
+ }
+}
+
+function drawPolygonShape(ctx, shape, color) {
+ ctx.save();
+ ctx.translate(...shape.pos);
+ ctx.rotate(deg2rad(-shape.angle));
+ drawPolygons(ctx, color, shape.polygons, ctx.fill.bind(ctx));
+ ctx.restore();
+}
+
+function drawDrawing(ctx, layer, scalefactor, drawing, color) {
+ if (["segment", "arc", "circle"].includes(drawing.type)) {
+ drawedge(ctx, scalefactor, drawing, color);
+ } else if (drawing.type == "polygon") {
+ drawPolygonShape(ctx, drawing, color);
+ } else {
+ drawtext(ctx, drawing, color, layer == "B");
+ }
+}
+
+function drawCircle(ctx, radius, ctxmethod) {
+ ctx.beginPath();
+ ctx.arc(0, 0, radius, 0, 2 * Math.PI);
+ ctx.closePath();
+ ctxmethod();
+}
+
+function drawPad(ctx, pad, color, outline) {
+ ctx.save();
+ ctx.translate(...pad.pos);
+ ctx.rotate(deg2rad(pad.angle));
+ if (pad.offset) {
+ ctx.translate(...pad.offset);
+ }
+ ctx.fillStyle = color;
+ ctx.strokeStyle = color;
+ var ctxmethod = outline ? ctx.stroke.bind(ctx) : ctx.fill.bind(ctx);
+ if (pad.shape == "rect") {
+ var rect = [...pad.size.map(c => -c * 0.5), ...pad.size];
+ if (outline) {
+ ctx.strokeRect(...rect);
+ } else {
+ ctx.fillRect(...rect);
+ }
+ } else if (pad.shape == "oval") {
+ drawOblong(ctx, color, pad.size, ctxmethod);
+ } else if (pad.shape == "circle") {
+ drawCircle(ctx, pad.size[0] / 2, ctxmethod);
+ } else if (pad.shape == "roundrect") {
+ drawRoundRect(ctx, color, pad.size, pad.radius, ctxmethod);
+ } else if (pad.shape == "custom") {
+ drawPolygons(ctx, color, pad.polygons, ctxmethod);
+ }
+ if (pad.type == "th" && !outline) {
+ ctx.fillStyle = "#CCCCCC";
+ if (pad.drillshape == "oblong") {
+ drawOblong(ctx, "#CCCCCC", pad.drillsize, ctxmethod);
+ } else {
+ drawCircle(ctx, pad.drillsize[0] / 2, ctxmethod);
+ }
+ }
+ ctx.restore();
+}
+
+function drawModule(ctx, layer, scalefactor, module, padcolor, outlinecolor, highlight) {
+ if (highlight) {
+ // draw bounding box
+ if (module.layer == layer) {
+ ctx.save();
+ ctx.globalAlpha = 0.2;
+ ctx.translate(...module.bbox.pos);
+ ctx.fillStyle = padcolor;
+ ctx.fillRect(
+ 0, 0,
+ ...module.bbox.size);
+ ctx.globalAlpha = 1;
+ ctx.strokeStyle = padcolor;
+ ctx.strokeRect(
+ 0, 0,
+ ...module.bbox.size);
+ ctx.restore();
+ }
+ }
+ // draw drawings
+ for (var drawing of module.drawings) {
+ if (drawing.layer == layer) {
+ drawDrawing(ctx, layer, scalefactor, drawing.drawing, padcolor);
+ }
+ }
+ // draw pads
+ for (var pad of module.pads) {
+ if (pad.layers.includes(layer)) {
+ drawPad(ctx, pad, padcolor, false);
+ if (pad.pin1 && highlightpin1) {
+ drawPad(ctx, pad, outlinecolor, true);
+ }
+ }
+ }
+}
+
+function drawEdges(canvas, scalefactor) {
+ var ctx = canvas.getContext("2d");
+ var edgecolor = getComputedStyle(topmostdiv).getPropertyValue('--pcb-edge-color');
+ for (var edge of pcbdata.edges) {
+ drawedge(ctx, scalefactor, edge, edgecolor);
+ }
+}
+
+function drawModules(canvas, layer, scalefactor, highlight) {
+ var ctx = canvas.getContext("2d");
+ ctx.lineWidth = 3 / scalefactor;
+ var style = getComputedStyle(topmostdiv);
+ var padcolor = style.getPropertyValue('--pad-color');
+ var outlinecolor = style.getPropertyValue('--pin1-outline-color');
+ if (highlight > 0) {
+ padcolor = style.getPropertyValue('--pad-color-highlight');
+ outlinecolor = style.getPropertyValue('--pin1-outline-color-highlight');
+ }
+ for (var i = 0; i < pcbdata.modules.length; i++) {
+ var mod = pcbdata.modules[i];
+ if (!highlight || highlightedModules.includes(i)) {
+ drawModule(ctx, layer, scalefactor, mod, padcolor, outlinecolor, highlight);
+ }
+ }
+}
+
+function drawSilkscreen(canvas, layer, scalefactor) {
+ var ctx = canvas.getContext("2d");
+ for (var d of pcbdata.silkscreen[layer]) {
+ if (["segment", "arc", "circle"].includes(d.type)) {
+ drawedge(ctx, scalefactor, d, "#aa4");
+ } else if (d.type == "polygon") {
+ drawPolygonShape(ctx, d, "#4aa");
+ } else {
+ drawtext(ctx, d, "#4aa", layer == "B");
+ }
+ }
+}
+
+function clearCanvas(canvas) {
+ var ctx = canvas.getContext("2d");
+ ctx.save();
+ ctx.setTransform(1, 0, 0, 1, 0, 0);
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
+ ctx.restore();
+}
+
+function drawHighlightsOnLayer(canvasdict) {
+ clearCanvas(canvasdict.highlight);
+ drawModules(canvasdict.highlight, canvasdict.layer,
+ canvasdict.transform.s * canvasdict.transform.zoom, true);
+}
+
+function drawHighlights() {
+ drawHighlightsOnLayer(allcanvas.front);
+ drawHighlightsOnLayer(allcanvas.back);
+}
+
+function drawBackground(canvasdict) {
+ clearCanvas(canvasdict.bg);
+ clearCanvas(canvasdict.silk);
+ drawEdges(canvasdict.bg, canvasdict.transform.s);
+ drawModules(canvasdict.bg, canvasdict.layer,
+ canvasdict.transform.s * canvasdict.transform.zoom, false);
+ drawSilkscreen(canvasdict.silk, canvasdict.layer, canvasdict.transform.s);
+}
+
+function prepareCanvas(canvas, flip, transform) {
+ var ctx = canvas.getContext("2d");
+ ctx.setTransform(1, 0, 0, 1, 0, 0);
+ var fontsize = 1.55;
+ ctx.scale(transform.zoom, transform.zoom);
+ ctx.translate(transform.panx, transform.pany);
+ if (flip) {
+ ctx.scale(-1, 1);
+ }
+ ctx.translate(transform.x, transform.y);
+ ctx.rotate(deg2rad(boardRotation));
+ ctx.scale(transform.s, transform.s);
+}
+
+function prepareLayer(canvasdict) {
+ var flip = (canvasdict.layer == "B");
+ for (var c of ["bg", "silk", "highlight"]) {
+ prepareCanvas(canvasdict[c], flip, canvasdict.transform);
+ }
+}
+
+function rotateVector(v, angle) {
+ angle = deg2rad(angle);
+ return [
+ v[0] * Math.cos(angle) - v[1] * Math.sin(angle),
+ v[0] * Math.sin(angle) + v[1] * Math.cos(angle)
+ ];
+}
+
+function applyRotation(bbox) {
+ var corners = [
+ [bbox.minx, bbox.miny],
+ [bbox.minx, bbox.maxy],
+ [bbox.maxx, bbox.miny],
+ [bbox.maxx, bbox.maxy],
+ ];
+ corners = corners.map((v) => rotateVector(v, boardRotation));
+ return {
+ minx: corners.reduce((a, v) => Math.min(a, v[0]), Infinity),
+ miny: corners.reduce((a, v) => Math.min(a, v[1]), Infinity),
+ maxx: corners.reduce((a, v) => Math.max(a, v[0]), -Infinity),
+ maxy: corners.reduce((a, v) => Math.max(a, v[1]), -Infinity),
+ }
+}
+
+function recalcLayerScale(canvasdict) {
+ var canvasdivid = {
+ "F": "frontcanvas",
+ "B": "backcanvas"
+ } [canvasdict.layer];
+ var width = document.getElementById(canvasdivid).clientWidth * 2;
+ var height = document.getElementById(canvasdivid).clientHeight * 2;
+ var bbox = applyRotation(pcbdata.edges_bbox);
+ var scalefactor = 0.98 * Math.min(
+ width / (bbox.maxx - bbox.minx),
+ height / (bbox.maxy - bbox.miny)
+ );
+ if (scalefactor < 0.1) {
+ scalefactor = 1;
+ }
+ canvasdict.transform.s = scalefactor;
+ var flip = (canvasdict.layer == "B");
+ if (flip) {
+ canvasdict.transform.x = -((bbox.maxx + bbox.minx) * scalefactor + width) * 0.5;
+ } else {
+ canvasdict.transform.x = -((bbox.maxx + bbox.minx) * scalefactor - width) * 0.5;
+ }
+ canvasdict.transform.y = -((bbox.maxy + bbox.miny) * scalefactor - height) * 0.5;
+ for (var c of ["bg", "silk", "highlight"]) {
+ canvas = canvasdict[c];
+ canvas.width = width;
+ canvas.height = height;
+ canvas.style.width = (width / 2) + "px";
+ canvas.style.height = (height / 2) + "px";
+ }
+}
+
+function redrawCanvas(layerdict) {
+ prepareLayer(layerdict);
+ drawBackground(layerdict);
+ drawHighlightsOnLayer(layerdict);
+}
+
+function resizeCanvas(layerdict) {
+ recalcLayerScale(layerdict);
+ redrawCanvas(layerdict);
+}
+
+function resizeAll() {
+ resizeCanvas(allcanvas.front);
+ resizeCanvas(allcanvas.back);
+}
+
+function bboxScan(layer, x, y) {
+ var result = [];
+ for (var i = 0; i < pcbdata.modules.length; i++) {
+ var module = pcbdata.modules[i];
+ if (module.layer == layer) {
+ var b = module.bbox;
+ if (b.pos[0] <= x && b.pos[0] + b.size[0] >= x &&
+ b.pos[1] <= y && b.pos[1] + b.size[1] >= y) {
+ result.push(i);
+ }
+ }
+ }
+ return result;
+}
+
+function handleMouseDown(e, layerdict) {
+ if (e.which != 1) {
+ return;
+ }
+ e.preventDefault();
+ e.stopPropagation();
+ layerdict.transform.mousestartx = e.offsetX;
+ layerdict.transform.mousestarty = e.offsetY;
+ layerdict.transform.mousedownx = e.offsetX;
+ layerdict.transform.mousedowny = e.offsetY;
+ layerdict.transform.mousedown = true;
+}
+
+function handleMouseClick(e, layerdict) {
+ var x = e.offsetX;
+ var y = e.offsetY;
+ var t = layerdict.transform;
+ if (layerdict.layer == "B") {
+ x = (2 * x / t.zoom - t.panx + t.x) / -t.s;
+ } else {
+ x = (2 * x / t.zoom - t.panx - t.x) / t.s;
+ }
+ y = (2 * y / t.zoom - t.y - t.pany) / t.s;
+ var v = rotateVector([x, y], -boardRotation);
+ var modules = bboxScan(layerdict.layer, v[0], v[1]);
+ if (modules.length > 0) {
+ modulesClicked(modules);
+ }
+}
+
+function handleMouseUp(e, layerdict) {
+ e.preventDefault();
+ e.stopPropagation();
+ if (e.which == 1 &&
+ layerdict.transform.mousedown &&
+ layerdict.transform.mousedownx == e.offsetX &&
+ layerdict.transform.mousedowny == e.offsetY) {
+ // This is just a click
+ handleMouseClick(e, layerdict);
+ layerdict.transform.mousedown = false;
+ return;
+ }
+ if (e.which == 3) {
+ // Reset pan and zoom on right click.
+ layerdict.transform.panx = 0;
+ layerdict.transform.pany = 0;
+ layerdict.transform.zoom = 1;
+ redrawCanvas(layerdict);
+ } else if (!redrawOnDrag) {
+ redrawCanvas(layerdict);
+ }
+ layerdict.transform.mousedown = false;
+}
+
+function handleMouseMove(e, layerdict) {
+ if (!layerdict.transform.mousedown) {
+ return;
+ }
+ e.preventDefault();
+ e.stopPropagation();
+ var dx = e.offsetX - layerdict.transform.mousestartx;
+ var dy = e.offsetY - layerdict.transform.mousestarty;
+ layerdict.transform.panx += 2 * dx / layerdict.transform.zoom;
+ layerdict.transform.pany += 2 * dy / layerdict.transform.zoom;
+ layerdict.transform.mousestartx = e.offsetX;
+ layerdict.transform.mousestarty = e.offsetY;
+ if (redrawOnDrag) {
+ redrawCanvas(layerdict);
+ }
+}
+
+function handleMouseWheel(e, layerdict) {
+ e.preventDefault();
+ e.stopPropagation();
+ var t = layerdict.transform;
+ var wheeldelta = e.deltaY;
+ if (e.deltaMode == 1) {
+ // FF only, scroll by lines
+ wheeldelta *= 30;
+ } else if (e.deltaMode == 2) {
+ wheeldelta *= 300;
+ }
+ var m = Math.pow(1.1, -wheeldelta / 40);
+ // Limit amount of zoom per tick.
+ if (m > 2) {
+ m = 2;
+ } else if (m < 0.5) {
+ m = 0.5;
+ }
+ t.zoom *= m;
+ var zoomd = (1 - m) / t.zoom;
+ t.panx += 2 * e.offsetX * zoomd;
+ t.pany += 2 * e.offsetY * zoomd;
+ redrawCanvas(layerdict);
+}
+
+function addMouseHandlers(div, layerdict) {
+ div.onmousedown = function(e) {
+ handleMouseDown(e, layerdict);
+ };
+ div.onmousemove = function(e) {
+ handleMouseMove(e, layerdict);
+ };
+ div.onmouseup = function(e) {
+ handleMouseUp(e, layerdict);
+ };
+ div.onmouseout = function(e) {
+ handleMouseUp(e, layerdict);
+ }
+ div.onwheel = function(e) {
+ handleMouseWheel(e, layerdict);
+ }
+ for (var element of [div, layerdict.bg, layerdict.silk, layerdict.highlight]) {
+ element.addEventListener("contextmenu", function(e) {
+ e.preventDefault();
+ }, false);
+ }
+}
+
+function setRedrawOnDrag(value) {
+ redrawOnDrag = value;
+ writeStorage("redrawOnDrag", value);
+}
+
+function setBoardRotation(value) {
+ boardRotation = value * 5;
+ writeStorage("boardRotation", boardRotation);
+ document.getElementById("rotationDegree").textContent = boardRotation;
+ resizeAll();
+}
+
+function initRender() {
+ allcanvas = {
+ front: {
+ transform: {
+ x: 0,
+ y: 0,
+ s: 1,
+ panx: 0,
+ pany: 0,
+ zoom: 1,
+ mousestartx: 0,
+ mousestarty: 0,
+ mousedown: false,
+ },
+ bg: document.getElementById("F_bg"),
+ silk: document.getElementById("F_slk"),
+ highlight: document.getElementById("F_hl"),
+ layer: "F",
+ },
+ back: {
+ transform: {
+ x: 0,
+ y: 0,
+ s: 1,
+ panx: 0,
+ pany: 0,
+ zoom: 1,
+ mousestartx: 0,
+ mousestarty: 0,
+ mousedown: false,
+ },
+ bg: document.getElementById("B_bg"),
+ silk: document.getElementById("B_slk"),
+ highlight: document.getElementById("B_hl"),
+ layer: "B",
+ }
+ };
+ addMouseHandlers(document.getElementById("frontcanvas"), allcanvas.front);
+ addMouseHandlers(document.getElementById("backcanvas"), allcanvas.back);
+}
+
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+/* DOM manipulation and misc code */
+
+var bomsplit;
+var canvassplit;
+var canvaslayout = "default";
+var bomlayout = "default";
+var initDone = false;
+var bomSortFunction = null;
+var currentSortColumn = null;
+var currentSortOrder = null;
+var currentHighlightedRowId;
+var highlightHandlers = [];
+var highlightedModules = [];
+var checkboxes = [];
+var bomCheckboxes = "";
+var highlightpin1 = false;
+var lastClicked;
+
+function dbg(html) {
+ dbgdiv.innerHTML = html;
+}
+
+function setDarkMode(value) {
+ if (value) {
+ topmostdiv.classList.add("dark");
+ } else {
+ topmostdiv.classList.remove("dark");
+ }
+ writeStorage("darkmode", value);
+ if (initDone) {
+ redrawCanvas(allcanvas.front);
+ redrawCanvas(allcanvas.back);
+ }
+}
+
+function setHighlightPin1(value) {
+ writeStorage("highlightpin1", value);
+ highlightpin1 = value;
+ if (initDone) {
+ redrawCanvas(allcanvas.front);
+ redrawCanvas(allcanvas.back);
+ }
+}
+
+function getStoredCheckboxRefs(checkbox) {
+ function convert(ref) {
+ var intref = parseInt(ref);
+ if (isNaN(intref)) {
+ for (var i = 0; i < pcbdata.modules.length; i++) {
+ if (pcbdata.modules[i].ref == ref) {
+ return i;
+ }
+ }
+ return -1;
+ } else {
+ return intref;
+ }
+ }
+ var existingRefs = readStorage("checkbox_" + checkbox);
+ if (!existingRefs) {
+ return new Set();
+ } else {
+ return new Set(existingRefs.split(",").map(r => convert(r)));
+ }
+}
+
+function getCheckboxState(checkbox, references) {
+ var storedRefsSet = getStoredCheckboxRefs(checkbox);
+ var currentRefsSet = new Set(references.map(r => r[1]));
+ // Get difference of current - stored
+ var difference = new Set(currentRefsSet);
+ for (ref of storedRefsSet) {
+ difference.delete(ref);
+ }
+ if (difference.size == 0) {
+ // All the current refs are stored
+ return "checked";
+ } else if (difference.size == currentRefsSet.size) {
+ // None of the current refs are stored
+ return "unchecked";
+ } else {
+ // Some of the refs are stored
+ return "indeterminate";
+ }
+}
+
+function setBomCheckboxState(checkbox, element, references) {
+ var state = getCheckboxState(checkbox, references);
+ element.checked = (state == "checked");
+ element.indeterminate = (state == "indeterminate");
+}
+
+function createCheckboxChangeHandler(checkbox, references) {
+ return function() {
+ refsSet = getStoredCheckboxRefs(checkbox);
+ if (this.checked) {
+ // checkbox ticked
+ for (var ref of references) {
+ refsSet.add(ref[1]);
+ }
+ } else {
+ // checkbox unticked
+ for (var ref of references) {
+ refsSet.delete(ref[1]);
+ }
+ }
+ writeStorage("checkbox_" + checkbox, [...refsSet].join(","));
+ }
+}
+
+function createRowHighlightHandler(rowid, refs) {
+ return function() {
+ if (currentHighlightedRowId) {
+ if (currentHighlightedRowId == rowid) {
+ return;
+ }
+ document.getElementById(currentHighlightedRowId).classList.remove("highlighted");
+ }
+ document.getElementById(rowid).classList.add("highlighted");
+ currentHighlightedRowId = rowid;
+ highlightedModules = refs.map(r => r[1]);
+ drawHighlights();
+ }
+}
+
+function entryMatches(entry) {
+ // check refs
+ for (var ref of entry[3]) {
+ if (ref[0].toLowerCase().indexOf(filter) >= 0) {
+ return true;
+ }
+ }
+ // check value
+ if (entry[1].toLowerCase().indexOf(filter) >= 0) {
+ return true;
+ }
+ // check footprint
+ if (entry[2].toLowerCase().indexOf(filter) >= 0) {
+ return true;
+ }
+ return false;
+}
+
+function findRefInEntry(entry) {
+ return entry[3].filter(r => r[0].toLowerCase() == reflookup);
+}
+
+function highlightFilter(s) {
+ if (!filter) {
+ return s;
+ }
+ var parts = s.toLowerCase().split(filter);
+ if (parts.length == 1) {
+ return s;
+ }
+ var r = "";
+ var pos = 0;
+ for (var i in parts) {
+ if (i > 0) {
+ r += '<mark class="highlight">' +
+ s.substring(pos, pos + filter.length) +
+ '</mark>';
+ pos += filter.length;
+ }
+ r += s.substring(pos, pos + parts[i].length);
+ pos += parts[i].length;
+ }
+ return r;
+}
+
+function checkboxSetUnsetAllHandler(checkboxname) {
+ return function() {
+ var checkboxnum = 0;
+ while (checkboxnum < checkboxes.length &&
+ checkboxes[checkboxnum].toLowerCase() != checkboxname.toLowerCase()) {
+ checkboxnum++;
+ }
+ if (checkboxnum >= checkboxes.length) {
+ return;
+ }
+ var allset = true;
+ var checkbox;
+ var row;
+ for (row of bombody.childNodes) {
+ checkbox = row.childNodes[checkboxnum + 1].childNodes[0];
+ if (!checkbox.checked || checkbox.indeterminate) {
+ allset = false;
+ break;
+ }
+ }
+ for (row of bombody.childNodes) {
+ checkbox = row.childNodes[checkboxnum + 1].childNodes[0];
+ checkbox.checked = !allset;
+ checkbox.indeterminate = false;
+ checkbox.onchange();
+ }
+ }
+}
+
+function createColumnHeader(name, cls, comparator) {
+ var th = document.createElement("TH");
+ th.innerHTML = name;
+ th.classList.add(cls);
+ th.style.cursor = "pointer";
+ var span = document.createElement("SPAN");
+ span.classList.add("sortmark");
+ span.classList.add("none");
+ th.appendChild(span);
+ th.onclick = function() {
+ if (currentSortColumn && this !== currentSortColumn) {
+ // Currently sorted by another column
+ currentSortColumn.childNodes[1].classList.remove(currentSortOrder);
+ currentSortColumn.childNodes[1].classList.add("none");
+ currentSortColumn = null;
+ currentSortOrder = null;
+ }
+ if (currentSortColumn && this === currentSortColumn) {
+ // Already sorted by this column
+ if (currentSortOrder == "asc") {
+ // Sort by this column, descending order
+ bomSortFunction = function(a, b) {
+ return -comparator(a, b);
+ }
+ currentSortColumn.childNodes[1].classList.remove("asc");
+ currentSortColumn.childNodes[1].classList.add("desc");
+ currentSortOrder = "desc";
+ } else {
+ // Unsort
+ bomSortFunction = null;
+ currentSortColumn.childNodes[1].classList.remove("desc");
+ currentSortColumn.childNodes[1].classList.add("none");
+ currentSortColumn = null;
+ currentSortOrder = null;
+ }
+ } else {
+ // Sort by this column, ascending order
+ bomSortFunction = comparator;
+ currentSortColumn = this;
+ currentSortColumn.childNodes[1].classList.remove("none");
+ currentSortColumn.childNodes[1].classList.add("asc");
+ currentSortOrder = "asc";
+ }
+ populateBomBody();
+ }
+ return th;
+}
+
+function populateBomHeader() {
+ while (bomhead.firstChild) {
+ bomhead.removeChild(bomhead.firstChild);
+ }
+ var tr = document.createElement("TR");
+ var th = document.createElement("TH");
+ th.classList.add("numCol");
+ tr.appendChild(th);
+ checkboxes = bomCheckboxes.split(",").filter((e) => e);
+ var checkboxCompareClosure = function(checkbox) {
+ return (a, b) => {
+ var stateA = getCheckboxState(checkbox, a[3]);
+ var stateB = getCheckboxState(checkbox, b[3]);
+ if (stateA > stateB) return -1;
+ if (stateA < stateB) return 1;
+ return 0;
+ }
+ }
+ for (var checkbox of checkboxes) {
+ th = createColumnHeader(
+ checkbox, "bom-checkbox", checkboxCompareClosure(checkbox));
+ th.onclick = fancyDblClickHandler(
+ th, th.onclick.bind(th), checkboxSetUnsetAllHandler(checkbox));
+ tr.appendChild(th);
+ }
+ tr.appendChild(createColumnHeader("References", "References", (a, b) => {
+ var i = 0;
+ while (i < a[3].length && i < b[3].length) {
+ if (a[3][i] != b[3][i]) return a[3][i] > b[3][i] ? 1 : -1;
+ i++;
+ }
+ return a[3].length - b[3].length;
+ }));
+ // Extra fields
+ if (config.extra_fields.length > 0) {
+ var extraFieldCompareClosure = function(fieldIndex) {
+ return (a, b) => {
+ var fa = a[4][fieldIndex];
+ var fb = b[4][fieldIndex];
+ if (fa != fb) return fa > fb ? 1 : -1;
+ else return 0;
+ }
+ }
+ for (var i in config.extra_fields) {
+ tr.appendChild(createColumnHeader(
+ config.extra_fields[i], "extra", extraFieldCompareClosure(i)));
+ }
+ }
+ tr.appendChild(createColumnHeader("Value", "Value", (a, b) => {
+ return valueCompare(a[5], b[5], a[1], b[1]);
+ }));
+ tr.appendChild(createColumnHeader("Footprint", "Footprint", (a, b) => {
+ if (a[2] != b[2]) return a[2] > b[2] ? 1 : -1;
+ else return 0;
+ }));
+ tr.appendChild(createColumnHeader("Quantity", "Quantity", (a, b) => {
+ return a[3].length - b[3].length;
+ }));
+ bomhead.appendChild(tr);
+}
+
+function populateBomBody() {
+ while (bom.firstChild) {
+ bom.removeChild(bom.firstChild);
+ }
+ highlightHandlers = [];
+ currentHighlightedRowId = null;
+ var first = true;
+ switch (canvaslayout) {
+ case 'F':
+ bomtable = pcbdata.bom.F;
+ break;
+ case 'FB':
+ bomtable = pcbdata.bom.both;
+ break;
+ case 'B':
+ bomtable = pcbdata.bom.B;
+ break;
+ }
+ if (bomSortFunction) {
+ bomtable = bomtable.slice().sort(bomSortFunction);
+ }
+ for (var i in bomtable) {
+ var bomentry = bomtable[i];
+ if (filter && !entryMatches(bomentry)) {
+ continue;
+ }
+ var references = bomentry[3];
+ if (reflookup) {
+ references = findRefInEntry(bomentry);
+ if (references.length == 0) {
+ continue;
+ }
+ }
+ var tr = document.createElement("TR");
+ var td = document.createElement("TD");
+ var rownum = +i + 1;
+ tr.id = "bomrow" + rownum;
+ td.textContent = rownum;
+ tr.appendChild(td);
+ // Checkboxes
+ for (var checkbox of checkboxes) {
+ if (checkbox) {
+ td = document.createElement("TD");
+ var input = document.createElement("input");
+ input.type = "checkbox";
+ input.onchange = createCheckboxChangeHandler(checkbox, references);
+ setBomCheckboxState(checkbox, input, references);
+ td.appendChild(input);
+ tr.appendChild(td);
+ }
+ }
+ // References
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(references.map(r => r[0]).join(", "));
+ tr.appendChild(td);
+ // Extra fields
+ for (var i in config.extra_fields) {
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(bomentry[4][i]);
+ tr.appendChild(td);
+ }
+ // Value
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(bomentry[1]);
+ tr.appendChild(td);
+ // Footprint
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(bomentry[2]);
+ tr.appendChild(td);
+ // Quantity
+ td = document.createElement("TD");
+ td.textContent = bomentry[3].length;
+ tr.appendChild(td);
+ bom.appendChild(tr);
+ var handler = createRowHighlightHandler(tr.id, references);
+ tr.onmousemove = handler;
+ highlightHandlers.push({
+ id: tr.id,
+ handler: handler,
+ refs: references
+ });
+ if ((filter || reflookup) && first) {
+ handler();
+ first = false;
+ }
+ }
+}
+
+function highlightPreviousRow() {
+ if (!currentHighlightedRowId) {
+ highlightHandlers[highlightHandlers.length - 1].handler();
+ } else {
+ if (highlightHandlers.length > 1 &&
+ highlightHandlers[0].id == currentHighlightedRowId) {
+ highlightHandlers[highlightHandlers.length - 1].handler();
+ } else {
+ for (var i = 0; i < highlightHandlers.length - 1; i++) {
+ if (highlightHandlers[i + 1].id == currentHighlightedRowId) {
+ highlightHandlers[i].handler();
+ break;
+ }
+ }
+ }
+ }
+ smoothScrollToRow(currentHighlightedRowId);
+}
+
+function highlightNextRow() {
+ if (!currentHighlightedRowId) {
+ highlightHandlers[0].handler();
+ } else {
+ if (highlightHandlers.length > 1 &&
+ highlightHandlers[highlightHandlers.length - 1].id == currentHighlightedRowId) {
+ highlightHandlers[0].handler();
+ } else {
+ for (var i = 1; i < highlightHandlers.length; i++) {
+ if (highlightHandlers[i - 1].id == currentHighlightedRowId) {
+ highlightHandlers[i].handler();
+ break;
+ }
+ }
+ }
+ }
+ smoothScrollToRow(currentHighlightedRowId);
+}
+
+function populateBomTable() {
+ populateBomHeader();
+ populateBomBody();
+}
+
+function modulesClicked(moduleIndexes) {
+ var lastClickedIndex = moduleIndexes.indexOf(lastClicked);
+ var index = moduleIndexes[(lastClickedIndex + 1) % moduleIndexes.length];
+ for (var handler of highlightHandlers) {
+ if (handler.refs.map(r => r[1]).indexOf(index) >= 0) {
+ lastClicked = index;
+ handler.handler();
+ smoothScrollToRow(currentHighlightedRowId);
+ break;
+ }
+ }
+}
+
+function updateFilter(input) {
+ filter = input.toLowerCase();
+ populateBomTable();
+}
+
+function updateRefLookup(input) {
+ reflookup = input.toLowerCase();
+ populateBomTable();
+}
+
+function silkscreenVisible(visible) {
+ if (visible) {
+ allcanvas.front.silk.style.display = "";
+ allcanvas.back.silk.style.display = "";
+ writeStorage("silkscreenVisible", true);
+ } else {
+ allcanvas.front.silk.style.display = "none";
+ allcanvas.back.silk.style.display = "none";
+ writeStorage("silkscreenVisible", false);
+ }
+}
+
+function changeCanvasLayout(layout) {
+ document.getElementById("fl-btn").classList.remove("depressed");
+ document.getElementById("fb-btn").classList.remove("depressed");
+ document.getElementById("bl-btn").classList.remove("depressed");
+ switch (layout) {
+ case 'F':
+ document.getElementById("fl-btn").classList.add("depressed");
+ if (bomlayout != "bom-only") {
+ canvassplit.collapse(1);
+ }
+ break;
+ case 'B':
+ document.getElementById("bl-btn").classList.add("depressed");
+ if (bomlayout != "bom-only") {
+ canvassplit.collapse(0);
+ }
+ break;
+ default:
+ document.getElementById("fb-btn").classList.add("depressed");
+ if (bomlayout != "bom-only") {
+ canvassplit.setSizes([50, 50]);
+ }
+ }
+ canvaslayout = layout;
+ writeStorage("canvaslayout", layout);
+ resizeAll();
+ populateBomTable();
+}
+
+function populateMetadata() {
+ document.getElementById("title").innerHTML = pcbdata.metadata.title;
+ document.getElementById("revision").innerHTML = "Rev: " + pcbdata.metadata.revision;
+ document.getElementById("company").innerHTML = pcbdata.metadata.company;
+ document.getElementById("filedate").innerHTML = pcbdata.metadata.date;
+ if (pcbdata.metadata.title != "") {
+ document.title = pcbdata.metadata.title + " BOM";
+ }
+}
+
+function changeBomLayout(layout) {
+ document.getElementById("bom-btn").classList.remove("depressed");
+ document.getElementById("lr-btn").classList.remove("depressed");
+ document.getElementById("tb-btn").classList.remove("depressed");
+ switch (layout) {
+ case 'bom-only':
+ document.getElementById("bom-btn").classList.add("depressed");
+ if (bomsplit) {
+ bomsplit.destroy();
+ bomsplit = null;
+ canvassplit.destroy();
+ canvassplit = null;
+ }
+ document.getElementById("frontcanvas").style.display = "none";
+ document.getElementById("backcanvas").style.display = "none";
+ document.getElementById("bot").style.height = "";
+ break;
+ case 'top-bottom':
+ document.getElementById("tb-btn").classList.add("depressed");
+ document.getElementById("frontcanvas").style.display = "";
+ document.getElementById("backcanvas").style.display = "";
+ document.getElementById("bot").style.height = "calc(100% - 80px)";
+ document.getElementById("bomdiv").classList.remove("split-horizontal");
+ document.getElementById("canvasdiv").classList.remove("split-horizontal");
+ document.getElementById("frontcanvas").classList.add("split-horizontal");
+ document.getElementById("backcanvas").classList.add("split-horizontal");
+ if (bomsplit) {
+ bomsplit.destroy();
+ bomsplit = null;
+ canvassplit.destroy();
+ canvassplit = null;
+ }
+ bomsplit = Split(['#bomdiv', '#canvasdiv'], {
+ sizes: [50, 50],
+ onDragEnd: resizeAll,
+ direction: "vertical",
+ gutterSize: 5
+ });
+ canvassplit = Split(['#frontcanvas', '#backcanvas'], {
+ sizes: [50, 50],
+ gutterSize: 5,
+ onDragEnd: resizeAll
+ });
+ break;
+ case 'left-right':
+ document.getElementById("lr-btn").classList.add("depressed");
+ document.getElementById("frontcanvas").style.display = "";
+ document.getElementById("backcanvas").style.display = "";
+ document.getElementById("bot").style.height = "calc(100% - 80px)";
+ document.getElementById("bomdiv").classList.add("split-horizontal");
+ document.getElementById("canvasdiv").classList.add("split-horizontal");
+ document.getElementById("frontcanvas").classList.remove("split-horizontal");
+ document.getElementById("backcanvas").classList.remove("split-horizontal");
+ if (bomsplit) {
+ bomsplit.destroy();
+ bomsplit = null;
+ canvassplit.destroy();
+ canvassplit = null;
+ }
+ bomsplit = Split(['#bomdiv', '#canvasdiv'], {
+ sizes: [50, 50],
+ onDragEnd: resizeAll,
+ gutterSize: 5
+ });
+ canvassplit = Split(['#frontcanvas', '#backcanvas'], {
+ sizes: [50, 50],
+ gutterSize: 5,
+ direction: "vertical",
+ onDragEnd: resizeAll
+ });
+ }
+ bomlayout = layout;
+ writeStorage("bomlayout", layout);
+ changeCanvasLayout(canvaslayout);
+}
+
+function focusFilterField() {
+ focusInputField(document.getElementById("filter"));
+}
+
+function focusRefLookupField() {
+ focusInputField(document.getElementById("reflookup"));
+}
+
+function toggleBomCheckbox(bomrowid, checkboxnum) {
+ if (!bomrowid || checkboxnum > checkboxes.length) {
+ return;
+ }
+ var bomrow = document.getElementById(bomrowid);
+ var checkbox = bomrow.childNodes[checkboxnum].childNodes[0];
+ checkbox.checked = !checkbox.checked;
+ checkbox.indeterminate = false;
+ checkbox.onchange();
+}
+
+function checkBomCheckbox(bomrowid, checkboxname) {
+ var checkboxnum = 0;
+ while (checkboxnum < checkboxes.length &&
+ checkboxes[checkboxnum].toLowerCase() != checkboxname.toLowerCase()) {
+ checkboxnum++;
+ }
+ if (!bomrowid || checkboxnum >= checkboxes.length) {
+ return;
+ }
+ var bomrow = document.getElementById(bomrowid);
+ var checkbox = bomrow.childNodes[checkboxnum + 1].childNodes[0];
+ checkbox.checked = true;
+ checkbox.indeterminate = false;
+ checkbox.onchange();
+}
+
+function setBomCheckboxes(value) {
+ bomCheckboxes = value;
+ writeStorage("bomCheckboxes", value);
+ populateBomTable();
+}
+
+document.onkeydown = function(e) {
+ switch (e.key) {
+ case "n":
+ if (document.activeElement.type == "text") {
+ return;
+ }
+ if (currentHighlightedRowId !== null) {
+ checkBomCheckbox(currentHighlightedRowId, "placed");
+ highlightNextRow();
+ e.preventDefault();
+ }
+ break;
+ case "ArrowUp":
+ highlightPreviousRow();
+ e.preventDefault();
+ break;
+ case "ArrowDown":
+ highlightNextRow();
+ e.preventDefault();
+ break;
+ default:
+ break;
+ }
+ if (e.altKey) {
+ switch (e.key) {
+ case "f":
+ focusFilterField();
+ e.preventDefault();
+ break;
+ case "r":
+ focusRefLookupField();
+ e.preventDefault();
+ break;
+ case "z":
+ changeBomLayout("bom-only");
+ e.preventDefault();
+ break;
+ case "x":
+ changeBomLayout("left-right");
+ e.preventDefault();
+ break;
+ case "c":
+ changeBomLayout("top-bottom");
+ e.preventDefault();
+ break;
+ case "v":
+ changeCanvasLayout("F");
+ e.preventDefault();
+ break;
+ case "b":
+ changeCanvasLayout("FB");
+ e.preventDefault();
+ break;
+ case "n":
+ changeCanvasLayout("B");
+ e.preventDefault();
+ break;
+ default:
+ break;
+ }
+ if (e.key >= '1' && e.key <= '9') {
+ toggleBomCheckbox(currentHighlightedRowId, parseInt(e.key));
+ }
+ }
+}
+
+function initDefaults() {
+ bomlayout = readStorage("bomlayout");
+ if (bomlayout === null) {
+ bomlayout = config.bom_view;
+ }
+ if (!['bom-only', 'left-right', 'top-bottom'].includes(bomlayout)) {
+ bomlayout = config.bom_view;
+ }
+ canvaslayout = readStorage("canvaslayout");
+ if (canvaslayout === null) {
+ canvaslayout = config.layer_view;
+ }
+ bomCheckboxes = readStorage("bomCheckboxes");
+ if (bomCheckboxes === null) {
+ bomCheckboxes = config.checkboxes;
+ }
+ document.getElementById("bomCheckboxes").value = bomCheckboxes;
+
+ var b = readStorage("silkscreenVisible");
+ if (b === null) {
+ b = config.show_silkscreen;
+ }
+ document.getElementById("silkscreenCheckbox").checked = b;
+ silkscreenVisible(b);
+
+ b = readStorage("redrawOnDrag");
+ if (b === null) {
+ b = config.redraw_on_drag;
+ }
+ document.getElementById("dragCheckbox").checked = b;
+ setRedrawOnDrag(b);
+
+ b = readStorage("darkmode");
+ if (b === null) {
+ b = config.dark_mode;
+ }
+ document.getElementById("darkmodeCheckbox").checked = b;
+ setDarkMode(b);
+
+ b = readStorage("highlightpin1");
+ if (b === null) {
+ b = config.highlight_pin1;
+ }
+ document.getElementById("highlightpin1Checkbox").checked = b;
+ setHighlightPin1(b);
+
+ boardRotation = readStorage("boardRotation");
+ if (boardRotation === null) {
+ boardRotation = config.board_rotation * 5;
+ } else {
+ boardRotation = parseInt(boardRotation);
+ }
+ document.getElementById("boardRotation").value = boardRotation / 5;
+ document.getElementById("rotationDegree").textContent = boardRotation;
+}
+
+window.onload = function(e) {
+ initUtils();
+ initRender();
+ initStorage();
+ initDefaults();
+ cleanGutters();
+ populateMetadata();
+ dbgdiv = document.getElementById("dbg");
+ bom = document.getElementById("bombody");
+ bomhead = document.getElementById("bomhead");
+ filter = "";
+ reflookup = "";
+ initDone = true;
+ // Triggers render
+ changeBomLayout(bomlayout);
+}
+
+window.onresize = resizeAll;
+window.matchMedia("print").addListener(resizeAll);
+
+///////////////////////////////////////////////
+
+ </script>
+</head>
+
+<body>
+<div id="topmostdiv" style="width: 100%; height: 100%">
+ <div id="top">
+ <div style="float: right;">
+ <div class="hideonprint menu" style="float: right; margin: 10px; top: 8px;">
+ <button class="menubtn"></button>
+ <div class="menu-content">
+ <label class="menu-label menu-label-top">
+ <input id="darkmodeCheckbox" type="checkbox" onchange="setDarkMode(this.checked)">
+ Dark mode
+ </label>
+ <label class="menu-label">
+ <input id="silkscreenCheckbox" type="checkbox" checked onchange="silkscreenVisible(this.checked)">
+ Show silkscreen
+ </label>
+ <label class="menu-label">
+ <input id="highlightpin1Checkbox" type="checkbox" onchange="setHighlightPin1(this.checked)">
+ Highlight first pin
+ </label>
+ <label class="menu-label">
+ <input id="dragCheckbox" type="checkbox" checked onchange="setRedrawOnDrag(this.checked)">
+ Continuous redraw on drag
+ </label>
+ <label class="menu-label">
+ <span>Board rotation</span>
+ <span style="float: right"><span id="rotationDegree">0</span>&#176;</span>
+ <input id="boardRotation" type="range" min="-36" max="36" value="0" class="slider" oninput="setBoardRotation(this.value)">
+ </label>
+ <label class="menu-label">
+ <div style="margin-left: 5px">Bom checkboxes</div>
+ <input id="bomCheckboxes" class="menu-textbox" type=text
+ oninput="setBomCheckboxes(this.value)">
+ </label>
+ <label class="menu-label">
+ <span class="shameless-plug">
+ <span>Created using</span>
+ <a target="blank" href="https://github.com/openscopeproject/InteractiveHtmlBom">InteractiveHtmlBom</a>
+ </span>
+ </label>
+ </div>
+ </div>
+ <div class="button-container hideonprint"
+ style="float: right; margin: 10px; position: relative; top: 8px">
+ <button id="fl-btn" class="left-most-button" onclick="changeCanvasLayout('F')"
+ title="Front only">F
+ </button>
+ <button id="fb-btn" class="middle-button" onclick="changeCanvasLayout('FB')"
+ title="Front and Back">FB
+ </button>
+ <button id="bl-btn" class="right-most-button" onclick="changeCanvasLayout('B')"
+ title="Back only">B
+ </button>
+ </div>
+ <div class="button-container hideonprint"
+ style="float: right; margin: 10px; position: relative; top: 8px">
+ <button id="bom-btn" class="left-most-button" onclick="changeBomLayout('bom-only')"
+ title="BOM only"></button>
+ <button id="lr-btn" class="middle-button" onclick="changeBomLayout('left-right')"
+ title="BOM left, drawings right"></button>
+ <button id="tb-btn" class="right-most-button" onclick="changeBomLayout('top-bottom')"
+ title="BOM top, drawings bot"></button>
+ </div>
+ </div>
+ <div id="fileinfodiv" style="overflow: auto;">
+ <table class="fileinfo">
+ <tbody>
+ <tr>
+ <td id="title" class="title" style="width: 70%">
+ Title
+ </td>
+ <td id="revision" class="title" style="width: 30%">
+ Revision
+ </td>
+ </tr>
+ <tr>
+ <td id="company">
+ Kicad version
+ </td>
+ <td id="filedate">
+ Date
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <div id="bot" class="split" style="height: calc(100% - 80px)">
+ <div id="bomdiv" class="split split-horizontal">
+ <div style="width: 100%">
+ <input id="reflookup" class="searchbox reflookup hideonprint" type="text" placeholder="Ref lookup"
+ oninput="updateRefLookup(this.value)">
+ <input id="filter" class="searchbox filter hideonprint" type="text" placeholder="Filter"
+ oninput="updateFilter(this.value)">
+ <div class="button-container hideonprint" style="float: left">
+ <button id="copy" title="Copy bom table to clipboard"
+ onclick="copyToClipboard()"></button>
+ </div>
+ </div>
+ <div id="dbg"></div>
+ <table class="bom">
+ <thead id="bomhead">
+ </thead>
+ <tbody id="bombody">
+ </tbody>
+ </table>
+ </div>
+ <div id="canvasdiv" class="split split-horizontal">
+ <div id="frontcanvas" class="split" style="overflow: hidden">
+ <div style="position: relative; width: 100%; height: 100%;">
+ <canvas id="F_bg" style="position: absolute; left: 0; top: 0; z-index: 0;"></canvas>
+ <canvas id="F_slk" style="position: absolute; left: 0; top: 0; z-index: 1;"></canvas>
+ <canvas id="F_hl" style="position: absolute; left: 0; top: 0; z-index: 2;"></canvas>
+ </div>
+ </div>
+ <div id="backcanvas" class="split" style="overflow: hidden">
+ <div style="position: relative; width: 100%; height: 100%;">
+ <canvas id="B_bg" style="position: absolute; left: 0; top: 0; z-index: 0;"></canvas>
+ <canvas id="B_slk" style="position: absolute; left: 0; top: 0; z-index: 1;"></canvas>
+ <canvas id="B_hl" style="position: absolute; left: 0; top: 0; z-index: 2;"></canvas>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+</body>
+
+</html>
diff --git a/motor/motor b/motor/motor
new file mode 100644
index 0000000..9f662e3
--- /dev/null
+++ b/motor/motor
@@ -0,0 +1,25 @@
+Source,/home/easwaran/allProjects/kicad/openplc_modules/motor/motor.sch
+Kicad Rev,Eeschema 5.0.1
+Generated Date,Mon 21 Jan 2019 01:25:19 PM IST
+
+Title,Not Set
+Company,Not Set
+Revision,Not Set
+Date Issue,Not Set
+
+Reference,Value,Library,Library Ref
+J3,motor,Connector,Screw_Terminal_01x02
+U1,L293D,Driver_Motor,L293D
+J4,towards uC,Connector,Conn_01x05_Male
+J1,power,Connector,Conn_01x04_Male
+J2,from switches,Connector,Conn_01x04_Male
+C2,1uf,Device,C
+C1,1uf,Device,C
+D1,LED,Device,LED
+D2,LED,Device,LED
+D3,LED,Device,LED
+R1,470,Device,R_US
+R2,470,Device,R_US
+R3,470,Device,R_US
+R4,1K,Device,R_US
+D4,error,Device,LED
diff --git a/motor/motor.kicad_pcb b/motor/motor.kicad_pcb
index d35d5e0..3a39cc1 100644
--- a/motor/motor.kicad_pcb
+++ b/motor/motor.kicad_pcb
@@ -11,7 +11,7 @@
(page A4)
(layers
- (0 F.Cu signal hide)
+ (0 F.Cu signal)
(31 B.Cu signal)
(32 B.Adhes user)
(33 F.Adhes user)
diff --git a/motor/motor.kicad_pcb-bak b/motor/motor.kicad_pcb-bak
index e9994e7..d35d5e0 100644
--- a/motor/motor.kicad_pcb-bak
+++ b/motor/motor.kicad_pcb-bak
@@ -2,7 +2,7 @@
(general
(thickness 1.6)
- (drawings 29)
+ (drawings 31)
(tracks 117)
(zones 0)
(modules 16)
@@ -1066,6 +1066,30 @@
(xy -0.113933 -2.757629) (xy -0.013056 -2.757714) (xy 0 -2.757714) (xy 0.10391 -2.757652)) (layer F.SilkS) (width 0.01))
)
+ (dimension 50 (width 0.3) (layer Margin)
+ (gr_text "50.000 mm" (at 105.8 68.5) (layer Margin)
+ (effects (font (size 1.5 1.5) (thickness 0.3)))
+ )
+ (feature1 (pts (xy 130.8 83.9) (xy 130.8 70.013579)))
+ (feature2 (pts (xy 80.8 83.9) (xy 80.8 70.013579)))
+ (crossbar (pts (xy 80.8 70.6) (xy 130.8 70.6)))
+ (arrow1a (pts (xy 130.8 70.6) (xy 129.673496 71.186421)))
+ (arrow1b (pts (xy 130.8 70.6) (xy 129.673496 70.013579)))
+ (arrow2a (pts (xy 80.8 70.6) (xy 81.926504 71.186421)))
+ (arrow2b (pts (xy 80.8 70.6) (xy 81.926504 70.013579)))
+ )
+ (dimension 40 (width 0.3) (layer Margin)
+ (gr_text "40.000 mm" (at 142.8 99.8 90) (layer Margin)
+ (effects (font (size 1.5 1.5) (thickness 0.3)))
+ )
+ (feature1 (pts (xy 126.5 79.8) (xy 141.286421 79.8)))
+ (feature2 (pts (xy 126.5 119.8) (xy 141.286421 119.8)))
+ (crossbar (pts (xy 140.7 119.8) (xy 140.7 79.8)))
+ (arrow1a (pts (xy 140.7 79.8) (xy 141.286421 80.926504)))
+ (arrow1b (pts (xy 140.7 79.8) (xy 140.113579 80.926504)))
+ (arrow2a (pts (xy 140.7 119.8) (xy 141.286421 118.673496)))
+ (arrow2b (pts (xy 140.7 119.8) (xy 140.113579 118.673496)))
+ )
(gr_line (start 80.81 99.82) (end 80.81 83.82) (layer Edge.Cuts) (width 0.1))
(gr_circle (center 84.21 116.42) (end 85.81 116.42) (layer Edge.Cuts) (width 0.1))
(gr_arc (start 84.81 115.82) (end 80.81 115.82) (angle -90) (layer Edge.Cuts) (width 0.1))
diff --git a/motor/motor.xml b/motor/motor.xml
new file mode 100644
index 0000000..3679a4c
--- /dev/null
+++ b/motor/motor.xml
@@ -0,0 +1,375 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<export version="D">
+ <design>
+ <source>/home/easwaran/allProjects/kicad/openplc_modules/motor/motor.sch</source>
+ <date>Mon 21 Jan 2019 01:25:19 PM IST</date>
+ <tool>Eeschema 5.0.1</tool>
+ <sheet number="1" name="/" tstamps="/">
+ <title_block>
+ <title/>
+ <company/>
+ <rev/>
+ <date/>
+ <source>motor.sch</source>
+ <comment number="1" value=""/>
+ <comment number="2" value=""/>
+ <comment number="3" value=""/>
+ <comment number="4" value=""/>
+ </title_block>
+ </sheet>
+ </design>
+ <components>
+ <comp ref="J3">
+ <value>motor</value>
+ <footprint>TerminalBlocks_Phoenix:TerminalBlock_Phoenix_MPT-2.54mm_2pol</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Screw_Terminal_01x02" description="Generic screw terminal, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2DBD8E</tstamp>
+ </comp>
+ <comp ref="U1">
+ <value>L293D</value>
+ <footprint>Housings_DIP:DIP-16_W7.62mm_Socket_LongPads</footprint>
+ <datasheet>http://www.ti.com/lit/ds/symlink/l293.pdf</datasheet>
+ <libsource lib="Driver_Motor" part="L293D" description="Quadruple Half-H Drivers"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2E03BE</tstamp>
+ </comp>
+ <comp ref="J4">
+ <value>towards uC</value>
+ <footprint>Connectors_JST:JST_EH_B05B-EH-A_05x2.50mm_Straight</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x05_Male" description="Generic connector, single row, 01x05, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2E1BA3</tstamp>
+ </comp>
+ <comp ref="J1">
+ <value>power</value>
+ <footprint>Connectors_JST:JST_EH_B04B-EH-A_04x2.50mm_Straight</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x04_Male" description="Generic connector, single row, 01x04, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2E1CA4</tstamp>
+ </comp>
+ <comp ref="J2">
+ <value>from switches</value>
+ <footprint>Connectors_JST:JST_EH_B04B-EH-A_04x2.50mm_Straight</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x04_Male" description="Generic connector, single row, 01x04, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2E2661</tstamp>
+ </comp>
+ <comp ref="C2">
+ <value>1uf</value>
+ <footprint>Capacitors_THT:C_Disc_D3.8mm_W2.6mm_P2.50mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="C" description="Unpolarized capacitor"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2E4D95</tstamp>
+ </comp>
+ <comp ref="C1">
+ <value>1uf</value>
+ <footprint>Capacitors_THT:C_Disc_D3.8mm_W2.6mm_P2.50mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="C" description="Unpolarized capacitor"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2E4DE2</tstamp>
+ </comp>
+ <comp ref="D1">
+ <value>LED</value>
+ <footprint>LEDs:LED_D3.0mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2E5DA0</tstamp>
+ </comp>
+ <comp ref="D2">
+ <value>LED</value>
+ <footprint>LEDs:LED_D3.0mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2E5E42</tstamp>
+ </comp>
+ <comp ref="D3">
+ <value>LED</value>
+ <footprint>LEDs:LED_D3.0mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2E5E7E</tstamp>
+ </comp>
+ <comp ref="R1">
+ <value>470</value>
+ <footprint>Resistors_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2E932B</tstamp>
+ </comp>
+ <comp ref="R2">
+ <value>470</value>
+ <footprint>Resistors_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2E9401</tstamp>
+ </comp>
+ <comp ref="R3">
+ <value>470</value>
+ <footprint>Resistors_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2E9431</tstamp>
+ </comp>
+ <comp ref="R4">
+ <value>1K</value>
+ <footprint>Resistors_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C332B9A</tstamp>
+ </comp>
+ <comp ref="D4">
+ <value>error</value>
+ <footprint>LEDs:LED_D5.0mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C333823</tstamp>
+ </comp>
+ </components>
+ <libparts>
+ <libpart lib="Connector" part="Conn_01x04_Male">
+ <description>Generic connector, single row, 01x04, script generated (kicad-library-utils/schlib/autogen/connector/)</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>Connector*:*_1x??_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">J</field>
+ <field name="Value">Conn_01x04_Male</field>
+ </fields>
+ <pins>
+ <pin num="1" name="Pin_1" type="passive"/>
+ <pin num="2" name="Pin_2" type="passive"/>
+ <pin num="3" name="Pin_3" type="passive"/>
+ <pin num="4" name="Pin_4" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Connector" part="Conn_01x05_Male">
+ <description>Generic connector, single row, 01x05, script generated (kicad-library-utils/schlib/autogen/connector/)</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>Connector*:*_1x??_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">J</field>
+ <field name="Value">Conn_01x05_Male</field>
+ </fields>
+ <pins>
+ <pin num="1" name="Pin_1" type="passive"/>
+ <pin num="2" name="Pin_2" type="passive"/>
+ <pin num="3" name="Pin_3" type="passive"/>
+ <pin num="4" name="Pin_4" type="passive"/>
+ <pin num="5" name="Pin_5" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Connector" part="Screw_Terminal_01x02">
+ <description>Generic screw terminal, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>TerminalBlock*:*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">J</field>
+ <field name="Value">Screw_Terminal_01x02</field>
+ </fields>
+ <pins>
+ <pin num="1" name="Pin_1" type="passive"/>
+ <pin num="2" name="Pin_2" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Device" part="C">
+ <description>Unpolarized capacitor</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>C_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">C</field>
+ <field name="Value">C</field>
+ </fields>
+ <pins>
+ <pin num="1" name="~" type="passive"/>
+ <pin num="2" name="~" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Device" part="LED">
+ <description>Light emitting diode</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>LED*</fp>
+ <fp>LED_SMD:*</fp>
+ <fp>LED_THT:*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">D</field>
+ <field name="Value">LED</field>
+ </fields>
+ <pins>
+ <pin num="1" name="K" type="passive"/>
+ <pin num="2" name="A" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Device" part="R_US">
+ <description>Resistor, US symbol</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>R_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">R</field>
+ <field name="Value">R_US</field>
+ </fields>
+ <pins>
+ <pin num="1" name="~" type="passive"/>
+ <pin num="2" name="~" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Driver_Motor" part="L293">
+ <aliases>
+ <alias>L293D</alias>
+ </aliases>
+ <description>Quadruple Half-H Drivers</description>
+ <docs>http://www.ti.com/lit/ds/symlink/l293.pdf</docs>
+ <footprints>
+ <fp>DIP*W7.62mm*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">U</field>
+ <field name="Value">L293</field>
+ <field name="Footprint">Package_DIP:DIP-16_W7.62mm</field>
+ </fields>
+ <pins>
+ <pin num="1" name="EN1,2" type="input"/>
+ <pin num="2" name="1A" type="input"/>
+ <pin num="3" name="1Y" type="output"/>
+ <pin num="4" name="GND" type="power_in"/>
+ <pin num="5" name="GND" type="power_in"/>
+ <pin num="6" name="2Y" type="output"/>
+ <pin num="7" name="2A" type="input"/>
+ <pin num="8" name="VCC2" type="power_in"/>
+ <pin num="9" name="EN3,4" type="input"/>
+ <pin num="10" name="3A" type="input"/>
+ <pin num="11" name="3Y" type="output"/>
+ <pin num="12" name="GND" type="power_in"/>
+ <pin num="13" name="GND" type="power_in"/>
+ <pin num="14" name="4Y" type="output"/>
+ <pin num="15" name="4A" type="input"/>
+ <pin num="16" name="VCC1" type="power_in"/>
+ </pins>
+ </libpart>
+ </libparts>
+ <libraries>
+ <library logical="Connector">
+ <uri>/usr/share/kicad/library/Connector.lib</uri>
+ </library>
+ <library logical="Device">
+ <uri>/usr/share/kicad/library/Device.lib</uri>
+ </library>
+ <library logical="Driver_Motor">
+ <uri>/usr/share/kicad/library/Driver_Motor.lib</uri>
+ </library>
+ </libraries>
+ <nets>
+ <net code="1" name="GND">
+ <node ref="J2" pin="4"/>
+ <node ref="D4" pin="1"/>
+ <node ref="C2" pin="2"/>
+ <node ref="U1" pin="5"/>
+ <node ref="U1" pin="4"/>
+ <node ref="C1" pin="1"/>
+ <node ref="U1" pin="13"/>
+ <node ref="U1" pin="12"/>
+ <node ref="J1" pin="4"/>
+ </net>
+ <net code="2" name="Net-(D1-Pad1)">
+ <node ref="D1" pin="1"/>
+ <node ref="R1" pin="2"/>
+ </net>
+ <net code="3" name="Net-(D2-Pad1)">
+ <node ref="R2" pin="2"/>
+ <node ref="D2" pin="1"/>
+ </net>
+ <net code="4" name="Net-(D3-Pad1)">
+ <node ref="R3" pin="2"/>
+ <node ref="D3" pin="1"/>
+ </net>
+ <net code="5" name="/sw3">
+ <node ref="R3" pin="1"/>
+ <node ref="J4" pin="1"/>
+ <node ref="J2" pin="1"/>
+ </net>
+ <net code="6" name="/sw2">
+ <node ref="J2" pin="2"/>
+ <node ref="R2" pin="1"/>
+ <node ref="J4" pin="2"/>
+ </net>
+ <net code="7" name="/sw1">
+ <node ref="J2" pin="3"/>
+ <node ref="J4" pin="3"/>
+ <node ref="R1" pin="1"/>
+ </net>
+ <net code="8" name="/1a">
+ <node ref="U1" pin="9"/>
+ <node ref="J4" pin="4"/>
+ <node ref="U1" pin="2"/>
+ </net>
+ <net code="9" name="/2a">
+ <node ref="U1" pin="7"/>
+ <node ref="U1" pin="15"/>
+ <node ref="J4" pin="5"/>
+ </net>
+ <net code="10" name="Net-(R4-Pad1)">
+ <node ref="U1" pin="14"/>
+ <node ref="R4" pin="1"/>
+ </net>
+ <net code="11" name="Net-(D4-Pad2)">
+ <node ref="R4" pin="2"/>
+ <node ref="D4" pin="2"/>
+ </net>
+ <net code="12" name="Net-(J1-Pad1)">
+ <node ref="J1" pin="1"/>
+ </net>
+ <net code="13" name="Net-(C1-Pad2)">
+ <node ref="U1" pin="3"/>
+ <node ref="J3" pin="1"/>
+ <node ref="C1" pin="2"/>
+ </net>
+ <net code="14" name="Net-(C2-Pad1)">
+ <node ref="J3" pin="2"/>
+ <node ref="U1" pin="6"/>
+ <node ref="C2" pin="1"/>
+ </net>
+ <net code="15" name="Net-(U1-Pad11)">
+ <node ref="U1" pin="11"/>
+ </net>
+ <net code="16" name="Net-(U1-Pad10)">
+ <node ref="U1" pin="10"/>
+ </net>
+ <net code="17" name="+12V">
+ <node ref="J1" pin="2"/>
+ <node ref="U1" pin="8"/>
+ </net>
+ <net code="18" name="+5V">
+ <node ref="U1" pin="16"/>
+ <node ref="U1" pin="1"/>
+ <node ref="D3" pin="2"/>
+ <node ref="D2" pin="2"/>
+ <node ref="J1" pin="3"/>
+ <node ref="D1" pin="2"/>
+ </net>
+ </nets>
+</export>
diff --git a/switches/bom/ibom.html b/switches/bom/ibom.html
new file mode 100644
index 0000000..e9a5c02
--- /dev/null
+++ b/switches/bom/ibom.html
@@ -0,0 +1,2388 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Interactive BOM for KiCAD</title>
+ <style type="text/css">
+:root {
+ --pcb-edge-color: black;
+ --pad-color: #878787;
+ --pad-color-highlight: #D04040;
+ --pin1-outline-color: #ffb629;
+ --pin1-outline-color-highlight: #b4ff03;
+}
+
+html, body {
+ margin: 0px;
+ height: 100%;
+ font-family: Verdana, sans-serif;
+}
+
+.dark {
+ --pcb-edge-color: #eee;
+ --pad-color: #808080;
+ --pin1-outline-color: #ffa800;
+ --pin1-outline-color-highlight: #ccff00;
+ background-color: #252c30;
+ color: #eee;
+}
+
+button {
+ background-color: #eee;
+ border: 1px solid #888;
+ color: black;
+ height: 44px;
+ width: 44px;
+ text-align: center;
+ text-decoration: none;
+ display: inline-block;
+ font-size: 14px;
+ font-weight: bolder;
+}
+
+.dark button {
+ /* This will be inverted */
+ background-color: #c3b7b5;
+}
+
+button.depressed {
+ background-color: #0a0;
+ color: white;
+}
+
+.dark button.depressed {
+ /* This will be inverted */
+ background-color: #b3b;
+}
+
+button:focus {
+ outline: 0;
+}
+
+button#tb-btn {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' fill='none' stroke='%23000' stroke-width='.4' stroke-linejoin='round'/%3E%3Cpath d='M1.32 290.12h5.82M1.32 291.45h5.82' fill='none' stroke='%23000' stroke-width='.4'/%3E%3Cpath d='M4.37 292.5v4.23M.26 292.63H8.2' fill='none' stroke='%23000' stroke-width='.3'/%3E%3Ctext font-weight='700' font-size='3.17' font-family='sans-serif'%3E%3Ctspan x='1.35' y='295.73'%3EF%3C/tspan%3E%3Ctspan x='5.03' y='295.68'%3EB%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E%0A");
+ background-size: 32px 32px;
+ background-position: 5px 5px;
+ background-repeat: no-repeat;
+}
+
+button#lr-btn {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' fill='none' stroke='%23000' stroke-width='.4' stroke-linejoin='round'/%3E%3Cpath d='M1.06 290.12H3.7m-2.64 1.33H3.7m-2.64 1.32H3.7m-2.64 1.3H3.7m-2.64 1.33H3.7' fill='none' stroke='%23000' stroke-width='.4'/%3E%3Cpath d='M4.37 288.8v7.94m0-4.11h3.96' fill='none' stroke='%23000' stroke-width='.3'/%3E%3Ctext font-weight='700' font-size='3.17' font-family='sans-serif'%3E%3Ctspan x='5.11' y='291.96'%3EF%3C/tspan%3E%3Ctspan x='5.03' y='295.68'%3EB%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E%0A");
+ background-size: 32px 32px;
+ background-position: 5px 5px;
+ background-repeat: no-repeat;
+}
+
+button#bom-btn {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)' fill='none' stroke='%23000' stroke-width='.4'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' stroke-linejoin='round'/%3E%3Cpath d='M1.59 290.12h5.29M1.59 291.45h5.33M1.59 292.75h5.33M1.59 294.09h5.33M1.59 295.41h5.33'/%3E%3C/g%3E%3C/svg%3E");
+ background-size: 32px 32px;
+ background-position: 5px 5px;
+ background-repeat: no-repeat;
+}
+
+button#copy {
+ background-image: url("data:image/svg+xml,%3Csvg height='48' viewBox='0 0 48 48' width='48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h48v48h-48z' fill='none'/%3E%3Cpath d='M32 2h-24c-2.21 0-4 1.79-4 4v28h4v-28h24v-4zm6 8h-22c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h22c2.21 0 4-1.79 4-4v-28c0-2.21-1.79-4-4-4zm0 32h-22v-28h22v28z'/%3E%3C/svg%3E");
+ background-position: 6px 6px;
+ background-repeat: no-repeat;
+ background-size: 26px 26px;
+ border-radius: 6px;
+ height: 40px;
+ width: 40px;
+ margin: 10px 5px;
+}
+
+button#copy:active {
+ box-shadow: inset 0px 0px 5px #6c6c6c;
+}
+
+textarea.clipboard-temp {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 2em;
+ height: 2em;
+ padding: 0;
+ border: None;
+ outline: None;
+ box-shadow: None;
+ background: transparent;
+}
+
+.left-most-button {
+ border-right: 0;
+ border-top-left-radius: 6px;
+ border-bottom-left-radius: 6px;
+}
+
+.middle-button {
+ border-right: 0;
+}
+
+.right-most-button {
+ border-top-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+}
+
+.button-container {
+ font-size: 0;
+}
+
+.dark .button-container {
+ filter: invert(1);
+}
+
+@media print {
+ .hideonprint {
+ display: none;
+ }
+}
+
+canvas {
+ cursor: crosshair;
+}
+
+canvas:active {
+ cursor: grabbing;
+}
+
+.fileinfo {
+ width: 100%;
+ max-width: 1000px;
+ border: none;
+ padding: 5px;
+}
+
+.fileinfo .title {
+ font-size: 20pt;
+ font-weight: bold;
+}
+
+.fileinfo td {
+ overflow: hidden;
+ white-space: nowrap;
+ max-width: 1px;
+ width: 50%;
+ text-overflow: ellipsis;
+}
+
+.bom {
+ border-collapse: collapse;
+ font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace;
+ font-size: 10pt;
+ table-layout: fixed;
+ width: 100%;
+ margin-top: 1px;
+}
+
+.bom th, .bom td {
+ border: 1px solid black;
+ padding: 5px;
+ word-wrap: break-word;
+ text-align: center;
+ position: relative;
+}
+
+.dark .bom th, .dark .bom td {
+ border: 1px solid #777;
+}
+
+.bom th {
+ background-color: #CCCCCC;
+ background-clip: padding-box;
+}
+
+.dark .bom th {
+ background-color: #3b4749;
+}
+
+.bom tr.highlighted:nth-child(n) {
+ background-color: #cfc;
+}
+
+.dark .bom tr.highlighted:nth-child(n) {
+ background-color: #226022;
+}
+
+.bom tr:nth-child(even) {
+ background-color: #f2f2f2;
+}
+
+.dark .bom tr:nth-child(even) {
+ background-color: #313b40;
+}
+
+.bom tr {
+ transition: background-color 0.2s;
+}
+
+.bom .numCol {
+ width: 25px;
+}
+
+.bom .Description {
+ width: 10%;
+}
+
+.bom .Part {
+ width: 10%;
+}
+
+.bom .Value {
+ width: 15%;
+}
+
+.bom .Quantity {
+ width: 65px;
+}
+
+.bom th .sortmark {
+ position: absolute;
+ right: 1px;
+ top: 1px;
+ margin-top: -5px;
+ border-width: 5px;
+ border-style: solid;
+ border-color: transparent transparent #221 transparent;
+ transform-origin: 50% 85%;
+ transition: opacity 0.2s, transform 0.4s;
+}
+
+.dark .bom th .sortmark {
+ filter: invert(1);
+}
+
+.bom th .sortmark.none {
+ opacity: 0;
+}
+
+.bom th .sortmark.desc {
+ transform: rotate(180deg);
+}
+
+.bom th:hover .sortmark.none {
+ opacity: 0.5;
+}
+
+.bom .bom-checkbox {
+ width: 30px;
+ position: relative;
+ user-select: none;
+ -moz-user-select: none;
+}
+
+.bom .bom-checkbox:before {
+ content: "";
+ position: absolute;
+ border-width: 15px;
+ border-style: solid;
+ border-color: #51829f transparent transparent transparent;
+ visibility: hidden;
+ top: -15px;
+}
+
+.bom .bom-checkbox:after {
+ content: "Double click to set/unset all";
+ position: absolute;
+ color: white;
+ top: -35px;
+ left: -26px;
+ background: #51829f;
+ padding: 5px 15px;
+ border-radius: 8px;
+ white-space: nowrap;
+ visibility: hidden;
+}
+
+.bom .bom-checkbox:hover:before, .bom .bom-checkbox:hover:after {
+ visibility: visible;
+ transition: visibility 0.2s linear 1s;
+}
+
+.split {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ overflow-y: auto;
+ overflow-x: hidden;
+ background-color: inherit;
+}
+
+.split.split-horizontal, .gutter.gutter-horizontal {
+ height: 100%;
+ float: left;
+}
+
+.gutter {
+ background-color: #ddd;
+ background-repeat: no-repeat;
+ background-position: 50%;
+ transition: background-color 0.3s;
+}
+
+.dark .gutter {
+ background-color: #777;
+}
+
+.gutter.gutter-horizontal {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
+ cursor: ew-resize;
+ width: 5px;
+}
+
+.gutter.gutter-vertical {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII=');
+ cursor: ns-resize;
+ height: 5px;
+}
+
+.searchbox {
+ float: left;
+ height: 40px;
+ margin: 10px 5px;
+ padding: 12px 32px;
+ font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace;
+ font-size: 18px;
+ box-sizing: border-box;
+ border: 1px solid #888;
+ border-radius: 6px;
+ outline: none;
+ background-color: #eee;
+ transition: background-color 0.2s, border 0.2s;
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABNklEQVQ4T8XSMUvDQBQH8P/LElFa/AIZHcTBQSz0I/gFstTBRR2KUC4ldDxw7h0Bl3RRUATxi4iiODgoiLNrbQYp5J6cpJJqomkX33Z37/14d/dIa33MzDuYI4johOI4XhyNRteO46zNYjDzAxE1yBZprVeZ+QbAUhXEGJMA2Ox2u4+fQIa0mPmsCgCgJYQ4t7lfgF0opQYAdv9ABkKI/UnOFCClXKjX61cA1osQY8x9kiRNKeV7IWA3oyhaSdP0FkAtjxhj3hzH2RBCPOf3pzqYHCilfAAX+URm9oMguPzeWSGQvUcMYC8rOBJCHBRdqxTo9/vbRHRqi8bj8XKv1xvODbiuW2u32/bvf0SlDv4XYOY7z/Mavu+nM1+BmQ+NMc0wDF/LprP0DbTWW0T00ul0nn4b7Q87+X4Qmfiq2wAAAABJRU5ErkJggg==');
+ background-position: 10px 10px;
+ background-repeat: no-repeat;
+}
+
+.dark .searchbox {
+ background-color: #111;
+ color: #eee;
+}
+
+.searchbox::placeholder {
+ color: #ccc;
+}
+
+.dark .searchbox::placeholder {
+ color: #666;
+}
+
+.filter {
+ width: calc(60% - 64px);
+}
+
+.reflookup {
+ width: calc(40% - 10px);
+}
+
+input[type=text]:focus {
+ background-color: white;
+ border: 1px solid #333;
+}
+
+.dark input[type=text]:focus {
+ background-color: #333;
+ border: 1px solid #ccc;
+}
+
+mark.highlight {
+ background-color: #5050ff;
+ color: #fff;
+ padding: 2px;
+ border-radius: 6px;
+}
+
+.dark mark.highlight {
+ background-color: #76a6da;
+ color: #111;
+}
+
+.menubtn {
+ background-color: white;
+ font-size: 16px;
+ border: none;
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 20 20'%3E%3Cpath fill='none' d='M0 0h20v20H0V0z'/%3E%3Cpath d='M15.95 10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12 2.34c-.03-.2-.2-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3 2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6 2.77c-.1.18-.06.39.1.51l1.69 1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37 12.1c-.15.12-.19.34-.1.51l1.6 2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3 2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47 1.35-.78l1.99.8c.18.07.39 0 .49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z'/%3E%3C/svg%3E%0A");
+ background-position: center;
+ background-repeat: no-repeat;
+}
+
+.dark .menubtn {
+ filter: invert(1);
+}
+
+.menu {
+ position: relative;
+ display: inline-block;
+}
+
+.menu-content {
+ display: none;
+ position: absolute;
+ background-color: white;
+ right: 0;
+ min-width: 300px;
+ box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
+ z-index: 100;
+ padding: 8px;
+}
+
+.dark .menu-content {
+ background-color: #111;
+}
+
+.menu:hover .menu-content {
+ display: block;
+}
+
+.menu:hover .menubtn {
+ background-color: #eee;
+}
+
+.dark .menu:hover .menubtn {}
+
+.menu-label {
+ display: inline-block;
+ padding: 8px;
+ border: 1px solid #ccc;
+ border-top: 0;
+ width: calc(100% - 18px);
+}
+
+.menu-label-top {
+ border-top: 1px solid #ccc;
+}
+
+.menu-textbox {
+ float: left;
+ height: 24px;
+ margin: 10px 5px;
+ padding: 5px 5px;
+ font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace;
+ font-size: 14px;
+ box-sizing: border-box;
+ border: 1px solid #888;
+ border-radius: 4px;
+ outline: none;
+ background-color: #eee;
+ transition: background-color 0.2s, border 0.2s;
+ width: calc(100% - 10px);
+}
+
+.dark .menu-textbox {
+ background-color: #222;
+ color: #eee;
+}
+
+#topmostdiv {
+ transition: background-color 0.3s;
+}
+
+#top {
+ height: 78px;
+ border-bottom: 2px solid black;
+}
+
+.dark #top {
+ border-bottom: 2px solid #ccc;
+}
+
+#dbg {
+ display: block;
+}
+
+::-webkit-scrollbar {
+ width: 8px;
+}
+
+::-webkit-scrollbar-track {
+ background: #aaa;
+}
+
+::-webkit-scrollbar-thumb {
+ background: #666;
+ border-radius: 3px;
+}
+
+::-webkit-scrollbar-thumb:hover {
+ background: #555;
+}
+
+.slider {
+ -webkit-appearance: none;
+ width: 100%;
+ margin: 3px 0;
+ padding: 0;
+ outline: none;
+ opacity: 0.7;
+ -webkit-transition: .2s;
+ transition: opacity .2s;
+ border-radius: 3px;
+}
+
+.slider:hover {
+ opacity: 1;
+}
+
+.slider:focus {
+ outline: none;
+}
+
+.slider::-webkit-slider-runnable-track {
+ -webkit-appearance: none;
+ width: 100%;
+ height: 8px;
+ background: #d3d3d3;
+ border-radius: 3px;
+ border: none;
+}
+
+.slider::-webkit-slider-thumb {
+ -webkit-appearance: none;
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ background: #0a0;
+ cursor: pointer;
+ margin-top: -4px;
+}
+
+.dark .slider::-webkit-slider-thumb {
+ background: #3d3;
+}
+
+.slider::-moz-range-thumb {
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ background: #0a0;
+ cursor: pointer;
+}
+
+.slider::-moz-range-track {
+ height: 8px;
+ background: #d3d3d3;
+ border-radius: 3px;
+}
+
+.dark .slider::-moz-range-thumb {
+ background: #3d3;
+}
+
+.slider::-ms-track {
+ width: 100%;
+ height: 8px;
+ border-width: 3px 0;
+ background: transparent;
+ border-color: transparent;
+ color: transparent;
+ transition: opacity .2s;
+}
+
+.slider::-ms-fill-lower {
+ background: #d3d3d3;
+ border: none;
+ border-radius: 3px;
+}
+
+.slider::-ms-fill-upper {
+ background: #d3d3d3;
+ border: none;
+ border-radius: 3px;
+}
+
+.slider::-ms-thumb {
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ background: #0a0;
+ cursor: pointer;
+ margin: 0;
+}
+
+.shameless-plug {
+ font-size: 0.8em;
+ text-align: center;
+ display: block;
+}
+
+.shameless-plug a {
+ color: #0278a4;
+}
+
+.dark .shameless-plug a {
+ color: #00b9fd;
+}
+
+ </style>
+ <script type="text/javascript" >
+///////////////////////////////////////////////
+/*
+ Split.js - v1.3.5
+ MIT License
+ https://github.com/nathancahill/Split.js
+*/
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Split=t()}(this,function(){"use strict";var e=window,t=e.document,n="addEventListener",i="removeEventListener",r="getBoundingClientRect",s=function(){return!1},o=e.attachEvent&&!e[n],a=["","-webkit-","-moz-","-o-"].filter(function(e){var n=t.createElement("div");return n.style.cssText="width:"+e+"calc(9px)",!!n.style.length}).shift()+"calc",l=function(e){return"string"==typeof e||e instanceof String?t.querySelector(e):e};return function(u,c){function z(e,t,n){var i=A(y,t,n);Object.keys(i).forEach(function(t){return e.style[t]=i[t]})}function h(e,t){var n=B(y,t);Object.keys(n).forEach(function(t){return e.style[t]=n[t]})}function f(e){var t=E[this.a],n=E[this.b],i=t.size+n.size;t.size=e/this.size*i,n.size=i-e/this.size*i,z(t.element,t.size,this.aGutterSize),z(n.element,n.size,this.bGutterSize)}function m(e){var t;this.dragging&&((t="touches"in e?e.touches[0][b]-this.start:e[b]-this.start)<=E[this.a].minSize+M+this.aGutterSize?t=E[this.a].minSize+this.aGutterSize:t>=this.size-(E[this.b].minSize+M+this.bGutterSize)&&(t=this.size-(E[this.b].minSize+this.bGutterSize)),f.call(this,t),c.onDrag&&c.onDrag())}function g(){var e=E[this.a].element,t=E[this.b].element;this.size=e[r]()[y]+t[r]()[y]+this.aGutterSize+this.bGutterSize,this.start=e[r]()[G]}function d(){var t=this,n=E[t.a].element,r=E[t.b].element;t.dragging&&c.onDragEnd&&c.onDragEnd(),t.dragging=!1,e[i]("mouseup",t.stop),e[i]("touchend",t.stop),e[i]("touchcancel",t.stop),t.parent[i]("mousemove",t.move),t.parent[i]("touchmove",t.move),delete t.stop,delete t.move,n[i]("selectstart",s),n[i]("dragstart",s),r[i]("selectstart",s),r[i]("dragstart",s),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",t.gutter.style.cursor="",t.parent.style.cursor=""}function S(t){var i=this,r=E[i.a].element,o=E[i.b].element;!i.dragging&&c.onDragStart&&c.onDragStart(),t.preventDefault(),i.dragging=!0,i.move=m.bind(i),i.stop=d.bind(i),e[n]("mouseup",i.stop),e[n]("touchend",i.stop),e[n]("touchcancel",i.stop),i.parent[n]("mousemove",i.move),i.parent[n]("touchmove",i.move),r[n]("selectstart",s),r[n]("dragstart",s),o[n]("selectstart",s),o[n]("dragstart",s),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",i.gutter.style.cursor=j,i.parent.style.cursor=j,g.call(i)}function v(e){e.forEach(function(t,n){if(n>0){var i=F[n-1],r=E[i.a],s=E[i.b];r.size=e[n-1],s.size=t,z(r.element,r.size,i.aGutterSize),z(s.element,s.size,i.bGutterSize)}})}function p(){F.forEach(function(e){e.parent.removeChild(e.gutter),E[e.a].element.style[y]="",E[e.b].element.style[y]=""})}void 0===c&&(c={});var y,b,G,E,w=l(u[0]).parentNode,D=e.getComputedStyle(w).flexDirection,U=c.sizes||u.map(function(){return 100/u.length}),k=void 0!==c.minSize?c.minSize:100,x=Array.isArray(k)?k:u.map(function(){return k}),L=void 0!==c.gutterSize?c.gutterSize:10,M=void 0!==c.snapOffset?c.snapOffset:30,O=c.direction||"horizontal",j=c.cursor||("horizontal"===O?"ew-resize":"ns-resize"),C=c.gutter||function(e,n){var i=t.createElement("div");return i.className="gutter gutter-"+n,i},A=c.elementStyle||function(e,t,n){var i={};return"string"==typeof t||t instanceof String?i[e]=t:i[e]=o?t+"%":a+"("+t+"% - "+n+"px)",i},B=c.gutterStyle||function(e,t){return n={},n[e]=t+"px",n;var n};"horizontal"===O?(y="width","clientWidth",b="clientX",G="left","paddingLeft"):"vertical"===O&&(y="height","clientHeight",b="clientY",G="top","paddingTop");var F=[];return E=u.map(function(e,t){var i,s={element:l(e),size:U[t],minSize:x[t]};if(t>0&&(i={a:t-1,b:t,dragging:!1,isFirst:1===t,isLast:t===u.length-1,direction:O,parent:w},i.aGutterSize=L,i.bGutterSize=L,i.isFirst&&(i.aGutterSize=L/2),i.isLast&&(i.bGutterSize=L/2),"row-reverse"===D||"column-reverse"===D)){var a=i.a;i.a=i.b,i.b=a}if(!o&&t>0){var c=C(t,O);h(c,L),c[n]("mousedown",S.bind(i)),c[n]("touchstart",S.bind(i)),w.insertBefore(c,s.element),i.gutter=c}0===t||t===u.length-1?z(s.element,s.size,L/2):z(s.element,s.size,L);var f=s.element[r]()[y];return f<s.minSize&&(s.minSize=f),t>0&&F.push(i),s}),o?{setSizes:v,destroy:p}:{setSizes:v,getSizes:function(){return E.map(function(e){return e.size})},collapse:function(e){if(e===F.length){var t=F[e-1];g.call(t),o||f.call(t,t.size-t.bGutterSize)}else{var n=F[e];g.call(n),o||f.call(n,n.aGutterSize)}},destroy:p}}});
+
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+var config = {"redraw_on_drag": true, "highlight_pin1": false, "extra_fields": [], "dark_mode": false, "bom_view": "left-right", "board_rotation": 0.0, "checkboxes": "Sourced,Placed", "show_silkscreen": true, "layer_view": "FB"}
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+var pcbdata = {"font_data": {"1": {"l": [[[0.7619047619047619, -0.047619047619047616], [0.19047619047619047, -0.047619047619047616]], [[0.47619047619047616, -0.047619047619047616], [0.47619047619047616, -1.0476190476190474], [0.38095238095238093, -0.9047619047619047], [0.2857142857142857, -0.8095238095238095], [0.19047619047619047, -0.7619047619047619]]], "w": 0.9523809523809523}, "0": {"l": [[[0.42857142857142855, -1.0476190476190474], [0.5238095238095237, -1.0476190476190474], [0.6190476190476191, -1.0], [0.6666666666666666, -0.9523809523809523], [0.7142857142857142, -0.8571428571428571], [0.7619047619047619, -0.6666666666666666], [0.7619047619047619, -0.42857142857142855], [0.7142857142857142, -0.23809523809523808], [0.6666666666666666, -0.14285714285714285], [0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.42857142857142855, -0.047619047619047616], [0.3333333333333333, -0.09523809523809523], [0.2857142857142857, -0.14285714285714285], [0.23809523809523808, -0.23809523809523808], [0.19047619047619047, -0.42857142857142855], [0.19047619047619047, -0.6666666666666666], [0.23809523809523808, -0.8571428571428571], [0.2857142857142857, -0.9523809523809523], [0.3333333333333333, -1.0], [0.42857142857142855, -1.0476190476190474]]], "w": 0.9523809523809523}, "3": {"l": [[[0.14285714285714285, -1.0476190476190474], [0.7619047619047619, -1.0476190476190474], [0.42857142857142855, -0.6666666666666666], [0.5714285714285714, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.7619047619047619, -0.47619047619047616], [0.7619047619047619, -0.23809523809523808], [0.7142857142857142, -0.14285714285714285], [0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.2857142857142857, -0.047619047619047616], [0.19047619047619047, -0.09523809523809523], [0.14285714285714285, -0.14285714285714285]]], "w": 0.9523809523809523}, "2": {"l": [[[0.19047619047619047, -0.9523809523809523], [0.23809523809523808, -1.0], [0.3333333333333333, -1.0476190476190474], [0.5714285714285714, -1.0476190476190474], [0.6666666666666666, -1.0], [0.7142857142857142, -0.9523809523809523], [0.7619047619047619, -0.8571428571428571], [0.7619047619047619, -0.7619047619047619], [0.7142857142857142, -0.6190476190476191], [0.14285714285714285, -0.047619047619047616], [0.7619047619047619, -0.047619047619047616]]], "w": 0.9523809523809523}, "5": {"l": [[[0.7142857142857142, -1.0476190476190474], [0.23809523809523808, -1.0476190476190474], [0.19047619047619047, -0.5714285714285714], [0.23809523809523808, -0.6190476190476191], [0.3333333333333333, -0.6666666666666666], [0.5714285714285714, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.7619047619047619, -0.47619047619047616], [0.7619047619047619, -0.23809523809523808], [0.7142857142857142, -0.14285714285714285], [0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.14285714285714285]]], "w": 0.9523809523809523}, "4": {"l": [[[0.6666666666666666, -0.7142857142857142], [0.6666666666666666, -0.047619047619047616]], [[0.42857142857142855, -1.0952380952380951], [0.19047619047619047, -0.38095238095238093], [0.8095238095238095, -0.38095238095238093]]], "w": 0.9523809523809523}, "7": {"l": [[[0.14285714285714285, -1.0476190476190474], [0.8095238095238095, -1.0476190476190474], [0.38095238095238093, -0.047619047619047616]]], "w": 0.9523809523809523}, "6": {"l": [[[0.6666666666666666, -1.0476190476190474], [0.47619047619047616, -1.0476190476190474], [0.38095238095238093, -1.0], [0.3333333333333333, -0.9523809523809523], [0.23809523809523808, -0.8095238095238095], [0.19047619047619047, -0.6190476190476191], [0.19047619047619047, -0.23809523809523808], [0.23809523809523808, -0.14285714285714285], [0.2857142857142857, -0.09523809523809523], [0.38095238095238093, -0.047619047619047616], [0.5714285714285714, -0.047619047619047616], [0.6666666666666666, -0.09523809523809523], [0.7142857142857142, -0.14285714285714285], [0.7619047619047619, -0.23809523809523808], [0.7619047619047619, -0.47619047619047616], [0.7142857142857142, -0.5714285714285714], [0.6666666666666666, -0.6190476190476191], [0.5714285714285714, -0.6666666666666666], [0.38095238095238093, -0.6666666666666666], [0.2857142857142857, -0.6190476190476191], [0.23809523809523808, -0.5714285714285714], [0.19047619047619047, -0.47619047619047616]]], "w": 0.9523809523809523}, "9": {"l": [[[0.2857142857142857, -0.047619047619047616], [0.47619047619047616, -0.047619047619047616], [0.5714285714285714, -0.09523809523809523], [0.6190476190476191, -0.14285714285714285], [0.7142857142857142, -0.2857142857142857], [0.7619047619047619, -0.47619047619047616], [0.7619047619047619, -0.8571428571428571], [0.7142857142857142, -0.9523809523809523], [0.6666666666666666, -1.0], [0.5714285714285714, -1.0476190476190474], [0.38095238095238093, -1.0476190476190474], [0.2857142857142857, -1.0], [0.23809523809523808, -0.9523809523809523], [0.19047619047619047, -0.8571428571428571], [0.19047619047619047, -0.6190476190476191], [0.23809523809523808, -0.5238095238095237], [0.2857142857142857, -0.47619047619047616], [0.38095238095238093, -0.42857142857142855], [0.5714285714285714, -0.42857142857142855], [0.6666666666666666, -0.47619047619047616], [0.7142857142857142, -0.5238095238095237], [0.7619047619047619, -0.6190476190476191]]], "w": 0.9523809523809523}, "8": {"l": [[[0.38095238095238093, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.23809523809523808, -0.7142857142857142], [0.19047619047619047, -0.8095238095238095], [0.19047619047619047, -0.8571428571428571], [0.23809523809523808, -0.9523809523809523], [0.2857142857142857, -1.0], [0.38095238095238093, -1.0476190476190474], [0.5714285714285714, -1.0476190476190474], [0.6666666666666666, -1.0], [0.7142857142857142, -0.9523809523809523], [0.7619047619047619, -0.8571428571428571], [0.7619047619047619, -0.8095238095238095], [0.7142857142857142, -0.7142857142857142], [0.6666666666666666, -0.6666666666666666], [0.5714285714285714, -0.6190476190476191], [0.38095238095238093, -0.6190476190476191], [0.2857142857142857, -0.5714285714285714], [0.23809523809523808, -0.5238095238095237], [0.19047619047619047, -0.42857142857142855], [0.19047619047619047, -0.23809523809523808], [0.23809523809523808, -0.14285714285714285], [0.2857142857142857, -0.09523809523809523], [0.38095238095238093, -0.047619047619047616], [0.5714285714285714, -0.047619047619047616], [0.6666666666666666, -0.09523809523809523], [0.7142857142857142, -0.14285714285714285], [0.7619047619047619, -0.23809523809523808], [0.7619047619047619, -0.42857142857142855], [0.7142857142857142, -0.5238095238095237], [0.6666666666666666, -0.5714285714285714], [0.5714285714285714, -0.6190476190476191]]], "w": 0.9523809523809523}, "C": {"l": [[[0.8095238095238095, -0.14285714285714285], [0.7619047619047619, -0.09523809523809523], [0.6190476190476191, -0.047619047619047616], [0.5238095238095237, -0.047619047619047616], [0.38095238095238093, -0.09523809523809523], [0.2857142857142857, -0.19047619047619047], [0.23809523809523808, -0.2857142857142857], [0.19047619047619047, -0.47619047619047616], [0.19047619047619047, -0.6190476190476191], [0.23809523809523808, -0.8095238095238095], [0.2857142857142857, -0.9047619047619047], [0.38095238095238093, -1.0], [0.5238095238095237, -1.0476190476190474], [0.6190476190476191, -1.0476190476190474], [0.7619047619047619, -1.0], [0.8095238095238095, -0.9523809523809523]]], "w": 1.0}, "B": {"l": [[[0.5714285714285714, -0.5714285714285714], [0.7142857142857142, -0.5238095238095237], [0.7619047619047619, -0.47619047619047616], [0.8095238095238094, -0.38095238095238093], [0.8095238095238094, -0.23809523809523808], [0.7619047619047619, -0.14285714285714285], [0.7142857142857142, -0.09523809523809523], [0.619047619047619, -0.047619047619047616], [0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.5714285714285714, -1.0476190476190474], [0.6666666666666665, -1.0], [0.7142857142857142, -0.9523809523809523], [0.7619047619047619, -0.8571428571428571], [0.7619047619047619, -0.7619047619047619], [0.7142857142857142, -0.6666666666666666], [0.6666666666666665, -0.6190476190476191], [0.5714285714285714, -0.5714285714285714], [0.23809523809523803, -0.5714285714285714]]], "w": 1.0}, "E": {"l": [[[0.23809523809523808, -0.5714285714285714], [0.5714285714285714, -0.5714285714285714]], [[0.7142857142857142, -0.047619047619047616], [0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474], [0.7142857142857142, -1.0476190476190474]]], "w": 0.9047619047619047}, "D": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.4761904761904761, -1.0476190476190474], [0.619047619047619, -1.0], [0.7142857142857142, -0.9047619047619047], [0.7619047619047619, -0.8095238095238095], [0.8095238095238094, -0.6190476190476191], [0.8095238095238094, -0.47619047619047616], [0.7619047619047619, -0.2857142857142857], [0.7142857142857142, -0.19047619047619047], [0.619047619047619, -0.09523809523809523], [0.4761904761904761, -0.047619047619047616], [0.23809523809523803, -0.047619047619047616]]], "w": 1.0}, "F": {"l": [[[0.5714285714285714, -0.5714285714285714], [0.23809523809523808, -0.5714285714285714]], [[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474], [0.7142857142857142, -1.0476190476190474]]], "w": 0.8571428571428571}, "J": {"l": [[[0.5238095238095237, -1.0476190476190474], [0.5238095238095237, -0.3333333333333333], [0.47619047619047616, -0.19047619047619047], [0.38095238095238093, -0.09523809523809523], [0.23809523809523808, -0.047619047619047616], [0.14285714285714285, -0.047619047619047616]]], "w": 0.7619047619047619}, "L": {"l": [[[0.7142857142857142, -0.047619047619047616], [0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474]]], "w": 0.8095238095238095}, "O": {"l": [[[0.4285714285714285, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.8095238095238094, -0.9047619047619047], [0.857142857142857, -0.7142857142857142], [0.857142857142857, -0.38095238095238093], [0.8095238095238094, -0.19047619047619047], [0.7142857142857142, -0.09523809523809523], [0.619047619047619, -0.047619047619047616], [0.4285714285714285, -0.047619047619047616], [0.33333333333333326, -0.09523809523809523], [0.23809523809523803, -0.19047619047619047], [0.1904761904761904, -0.38095238095238093], [0.1904761904761904, -0.7142857142857142], [0.23809523809523803, -0.9047619047619047], [0.33333333333333326, -1.0], [0.4285714285714285, -1.0476190476190474]]], "w": 1.0476190476190474}, "Q": {"l": [[[0.9047619047619047, 0.047619047619047616], [0.8095238095238094, 0.0], [0.7142857142857142, -0.09523809523809523], [0.5714285714285714, -0.23809523809523808], [0.4761904761904761, -0.2857142857142857], [0.3809523809523809, -0.2857142857142857]], [[0.4285714285714285, -0.047619047619047616], [0.33333333333333326, -0.09523809523809523], [0.23809523809523803, -0.19047619047619047], [0.1904761904761904, -0.38095238095238093], [0.1904761904761904, -0.7142857142857142], [0.23809523809523803, -0.9047619047619047], [0.33333333333333326, -1.0], [0.4285714285714285, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.8095238095238094, -0.9047619047619047], [0.857142857142857, -0.7142857142857142], [0.857142857142857, -0.38095238095238093], [0.8095238095238094, -0.19047619047619047], [0.7142857142857142, -0.09523809523809523], [0.619047619047619, -0.047619047619047616], [0.4285714285714285, -0.047619047619047616]]], "w": 1.0476190476190474}, "P": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.7619047619047619, -0.9523809523809523], [0.8095238095238094, -0.8571428571428571], [0.8095238095238094, -0.7142857142857142], [0.7619047619047619, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.619047619047619, -0.5238095238095237], [0.23809523809523803, -0.5238095238095237]]], "w": 1.0}, "S": {"l": [[[0.19047619047619047, -0.09523809523809523], [0.3333333333333333, -0.047619047619047616], [0.5714285714285714, -0.047619047619047616], [0.6666666666666666, -0.09523809523809523], [0.7142857142857142, -0.14285714285714285], [0.7619047619047619, -0.23809523809523808], [0.7619047619047619, -0.3333333333333333], [0.7142857142857142, -0.42857142857142855], [0.6666666666666666, -0.47619047619047616], [0.5714285714285714, -0.5238095238095237], [0.38095238095238093, -0.5714285714285714], [0.2857142857142857, -0.6190476190476191], [0.23809523809523808, -0.6666666666666666], [0.19047619047619047, -0.7619047619047619], [0.19047619047619047, -0.8571428571428571], [0.23809523809523808, -0.9523809523809523], [0.2857142857142857, -1.0], [0.38095238095238093, -1.0476190476190474], [0.6190476190476191, -1.0476190476190474], [0.7619047619047619, -1.0]]], "w": 0.9523809523809523}, "R": {"l": [[[0.8095238095238094, -0.047619047619047616], [0.4761904761904761, -0.5238095238095237]], [[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.7619047619047619, -0.9523809523809523], [0.8095238095238094, -0.8571428571428571], [0.8095238095238094, -0.7142857142857142], [0.7619047619047619, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.619047619047619, -0.5238095238095237], [0.23809523809523803, -0.5238095238095237]]], "w": 1.0}, "a": {"l": [[[0.6666666666666666, -0.047619047619047616], [0.6666666666666666, -0.5714285714285714], [0.6190476190476191, -0.6666666666666666], [0.5238095238095237, -0.7142857142857142], [0.3333333333333333, -0.7142857142857142], [0.23809523809523808, -0.6666666666666666]], [[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.19047619047619047], [0.19047619047619047, -0.2857142857142857], [0.23809523809523808, -0.38095238095238093], [0.3333333333333333, -0.42857142857142855], [0.5714285714285714, -0.42857142857142855], [0.6666666666666666, -0.47619047619047616]]], "w": 0.9047619047619047}, "e": {"l": [[[0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.19047619047619047], [0.19047619047619047, -0.5714285714285714], [0.23809523809523808, -0.6666666666666666], [0.3333333333333333, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.5714285714285714], [0.6666666666666666, -0.47619047619047616], [0.19047619047619047, -0.38095238095238093]]], "w": 0.8571428571428571}, "d": {"l": [[[0.6666666666666666, -0.047619047619047616], [0.6666666666666666, -1.0476190476190474]], [[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.19047619047619047, -0.23809523809523808], [0.19047619047619047, -0.5238095238095237], [0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5714285714285714, -0.7142857142857142], [0.6666666666666666, -0.6666666666666666]]], "w": 0.9047619047619047}, "i": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.7142857142857142]], [[0.23809523809523808, -1.0476190476190474], [0.19047619047619047, -1.0], [0.23809523809523808, -0.9523809523809523], [0.2857142857142857, -1.0], [0.23809523809523808, -1.0476190476190474], [0.23809523809523808, -0.9523809523809523]]], "w": 0.47619047619047616}, "h": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474]], [[0.6666666666666666, -0.047619047619047616], [0.6666666666666666, -0.5714285714285714], [0.6190476190476191, -0.6666666666666666], [0.5238095238095237, -0.7142857142857142], [0.38095238095238093, -0.7142857142857142], [0.2857142857142857, -0.6666666666666666], [0.23809523809523808, -0.6190476190476191]]], "w": 0.9047619047619047}, "o": {"l": [[[0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.19047619047619047, -0.23809523809523808], [0.19047619047619047, -0.5238095238095237], [0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5238095238095237], [0.7142857142857142, -0.23809523809523808], [0.6666666666666666, -0.14285714285714285], [0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.38095238095238093, -0.047619047619047616]]], "w": 0.9047619047619047}, "n": {"l": [[[0.23809523809523808, -0.7142857142857142], [0.23809523809523808, -0.047619047619047616]], [[0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.5714285714285714], [0.6666666666666666, -0.047619047619047616]]], "w": 0.9047619047619047}, "p": {"l": [[[0.23809523809523808, -0.7142857142857142], [0.23809523809523808, 0.2857142857142857]], [[0.23809523809523808, -0.6666666666666666], [0.3333333333333333, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5238095238095237], [0.7142857142857142, -0.23809523809523808], [0.6666666666666666, -0.14285714285714285], [0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523]]], "w": 0.9047619047619047}, "s": {"l": [[[0.19047619047619047, -0.09523809523809523], [0.2857142857142857, -0.047619047619047616], [0.47619047619047616, -0.047619047619047616], [0.5714285714285714, -0.09523809523809523], [0.6190476190476191, -0.19047619047619047], [0.6190476190476191, -0.23809523809523808], [0.5714285714285714, -0.3333333333333333], [0.47619047619047616, -0.38095238095238093], [0.3333333333333333, -0.38095238095238093], [0.23809523809523808, -0.42857142857142855], [0.19047619047619047, -0.5238095238095237], [0.19047619047619047, -0.5714285714285714], [0.23809523809523808, -0.6666666666666666], [0.3333333333333333, -0.7142857142857142], [0.47619047619047616, -0.7142857142857142], [0.5714285714285714, -0.6666666666666666]]], "w": 0.8095238095238095}, "r": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.7142857142857142]], [[0.23809523809523808, -0.5238095238095237], [0.2857142857142857, -0.6190476190476191], [0.3333333333333333, -0.6666666666666666], [0.42857142857142855, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142]]], "w": 0.6190476190476191}, "t": {"l": [[[0.09523809523809523, -0.7142857142857142], [0.47619047619047616, -0.7142857142857142]], [[0.23809523809523808, -1.0476190476190474], [0.23809523809523808, -0.19047619047619047], [0.2857142857142857, -0.09523809523809523], [0.38095238095238093, -0.047619047619047616], [0.47619047619047616, -0.047619047619047616]]], "w": 0.5714285714285714}, "w": {"l": [[[0.1428571428571428, -0.7142857142857142], [0.33333333333333326, -0.047619047619047616], [0.5238095238095237, -0.5238095238095237], [0.7142857142857142, -0.047619047619047616], [0.9047619047619047, -0.7142857142857142]]], "w": 1.0476190476190474}}, "modules": [{"layer": "F", "center": [123.24951399999999, 119.20981499999999], "pads": [{"layers": ["F"], "angle": -270.0, "pos": [123.24951399999999, 117.20981499999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [2.0, 1.7]}, {"layers": ["F"], "angle": -270.0, "pos": [123.24951399999999, 121.20981499999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [2.0, 1.7]}], "drawings": [], "ref": "D10", "bbox": {"pos": [122.124513, 115.93481399999999], "size": [2.260002, 6.550002]}}, {"layer": "F", "center": [123.23973, 104.59072499999999], "pads": [{"layers": ["F"], "angle": -270.0, "pos": [123.23973, 106.59072499999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [2.0, 1.7]}, {"layers": ["F"], "angle": -270.0, "pos": [123.23973, 102.59072499999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [2.0, 1.7]}], "drawings": [], "ref": "D9", "bbox": {"pos": [122.114729, 101.31572399999999], "size": [2.260002, 6.550002]}}, {"layer": "F", "center": [123.18265299999999, 90.73363499999999], "pads": [{"layers": ["F"], "angle": -270.0, "pos": [123.18265299999999, 88.73363499999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [2.0, 1.7]}, {"layers": ["F"], "angle": -270.0, "pos": [123.18265299999999, 92.73363499999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [2.0, 1.7]}], "drawings": [], "ref": "D8", "bbox": {"pos": [122.05765199999999, 87.45863399999999], "size": [2.260002, 6.550002]}}, {"layer": "F", "center": [123.057679, 76.11454499999999], "pads": [{"layers": ["F"], "angle": -270.0, "pos": [123.057679, 78.11454499999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [2.0, 1.7]}, {"layers": ["F"], "angle": -270.0, "pos": [123.057679, 74.11454499999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [2.0, 1.7]}], "drawings": [], "ref": "D7", "bbox": {"pos": [121.932678, 72.839544], "size": [2.260002, 6.550002]}}, {"layer": "F", "center": [137.85999999999999, 104.57799999999999], "pads": [{"layers": ["F"], "angle": -90.0, "pos": [137.85999999999999, 106.57799999999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [2.0, 1.7]}, {"layers": ["F"], "angle": -90.0, "pos": [137.85999999999999, 102.57799999999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [2.0, 1.7]}], "drawings": [], "ref": "D6", "bbox": {"pos": [136.724999, 101.302999], "size": [2.260002, 6.550002]}}, {"layer": "F", "center": [137.85999999999999, 90.466905], "pads": [{"layers": ["F"], "angle": -90.0, "pos": [137.85999999999999, 88.466905], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [2.0, 1.7]}, {"layers": ["F"], "angle": -90.0, "pos": [137.85999999999999, 92.466905], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [2.0, 1.7]}], "drawings": [], "ref": "D5", "bbox": {"pos": [136.724999, 87.191904], "size": [2.260002, 6.550002]}}, {"layer": "F", "center": [113.64399999999999, 119.20981499999999], "pads": [{"layers": ["F"], "angle": -90.0, "pos": [113.64399999999999, 121.20981499999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [2.0, 1.7]}, {"layers": ["F"], "angle": -90.0, "pos": [113.64399999999999, 117.20981499999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [2.0, 1.7]}], "drawings": [], "ref": "D4", "bbox": {"pos": [112.50899899999999, 115.93481399999999], "size": [2.260002, 6.550002]}}, {"layer": "F", "center": [113.67399999999999, 104.59072499999999], "pads": [{"layers": ["F"], "angle": -90.0, "pos": [113.67399999999999, 102.59072499999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [2.0, 1.7]}, {"layers": ["F"], "angle": -90.0, "pos": [113.67399999999999, 106.59072499999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [2.0, 1.7]}], "drawings": [], "ref": "D3", "bbox": {"pos": [112.53899899999999, 101.31572399999999], "size": [2.260002, 6.550002]}}, {"layer": "F", "center": [113.67399999999999, 90.73363499999999], "pads": [{"layers": ["F"], "angle": -90.0, "pos": [113.67399999999999, 92.73363499999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [2.0, 1.7]}, {"layers": ["F"], "angle": -90.0, "pos": [113.67399999999999, 88.73363499999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [2.0, 1.7]}], "drawings": [], "ref": "D2", "bbox": {"pos": [112.53899899999999, 87.45863399999999], "size": [2.260002, 6.550002]}}, {"layer": "F", "center": [113.67399999999999, 76.11454499999999], "pads": [{"layers": ["F"], "angle": -90.0, "pos": [113.67399999999999, 74.11454499999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [2.0, 1.7]}, {"layers": ["F"], "angle": -90.0, "pos": [113.67399999999999, 78.11454499999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [2.0, 1.7]}], "drawings": [], "ref": "D1", "bbox": {"pos": [112.53899899999999, 72.839544], "size": [2.260002, 6.550002]}}, {"layer": "F", "center": [119.693514, 119.20981499999999], "pads": [{"layers": ["F"], "angle": -270.0, "pos": [119.693514, 117.859815], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -270.0, "pos": [119.693514, 120.559815], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R16", "bbox": {"pos": [118.753513, 116.834814], "size": [1.880002, 4.750001999999999]}}, {"layer": "F", "center": [119.501679, 76.11454499999999], "pads": [{"layers": ["F"], "angle": -270.0, "pos": [119.501679, 77.464545], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -270.0, "pos": [119.501679, 74.764545], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R13", "bbox": {"pos": [118.561678, 73.739544], "size": [1.880002, 4.750001999999999]}}, {"layer": "F", "center": [119.62665299999999, 90.73363499999999], "pads": [{"layers": ["F"], "angle": -270.0, "pos": [119.62665299999999, 89.383635], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -270.0, "pos": [119.62665299999999, 92.083635], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R14", "bbox": {"pos": [118.686652, 88.358634], "size": [1.880002, 4.750001999999999]}}, {"layer": "F", "center": [119.68373, 104.59072499999999], "pads": [{"layers": ["F"], "angle": -270.0, "pos": [119.68373, 105.940725], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -270.0, "pos": [119.68373, 103.240725], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R15", "bbox": {"pos": [118.74372899999999, 102.215724], "size": [1.880002, 4.750001999999999]}}, {"layer": "F", "center": [129.862, 104.66799999999999], "pads": [{"layers": ["F"], "angle": -90.0, "pos": [129.862, 106.018], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -90.0, "pos": [129.862, 103.318], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R12", "bbox": {"pos": [128.921999, 102.292999], "size": [1.880002, 4.750001999999999]}}, {"layer": "F", "center": [105.696, 76.11454499999999], "pads": [{"layers": ["F"], "angle": -90.0, "pos": [105.696, 74.764545], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -90.0, "pos": [105.696, 77.464545], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R7", "bbox": {"pos": [104.75599899999999, 73.739544], "size": [1.880002, 4.750001999999999]}}, {"layer": "F", "center": [105.696, 90.73363499999999], "pads": [{"layers": ["F"], "angle": -90.0, "pos": [105.696, 92.083635], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -90.0, "pos": [105.696, 89.383635], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R8", "bbox": {"pos": [104.75599899999999, 88.358634], "size": [1.880002, 4.750001999999999]}}, {"layer": "F", "center": [105.696, 104.59072499999999], "pads": [{"layers": ["F"], "angle": -90.0, "pos": [105.696, 103.240725], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -90.0, "pos": [105.696, 105.940725], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R9", "bbox": {"pos": [104.75599899999999, 102.215724], "size": [1.880002, 4.750001999999999]}}, {"layer": "F", "center": [105.62599999999999, 119.20981499999999], "pads": [{"layers": ["F"], "angle": -90.0, "pos": [105.62599999999999, 120.559815], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -90.0, "pos": [105.62599999999999, 117.859815], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R10", "bbox": {"pos": [104.685999, 116.834814], "size": [1.880002, 4.750001999999999]}}, {"layer": "F", "center": [129.862, 90.466905], "pads": [{"layers": ["F"], "angle": -90.0, "pos": [129.862, 89.116905], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -90.0, "pos": [129.862, 91.81690499999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R11", "bbox": {"pos": [128.921999, 88.091904], "size": [1.880002, 4.750001999999999]}}, {"layer": "F", "center": [133.79999999999998, 100.44345], "pads": [{"layers": ["F"], "angle": -0.0, "pos": [132.45, 100.44345], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -0.0, "pos": [135.15, 100.44345], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R6", "bbox": {"pos": [131.42499899999999, 99.50344899999999], "size": [4.750001999999999, 1.880002]}}, {"layer": "F", "center": [133.858, 86.36], "pads": [{"layers": ["F"], "angle": -0.0, "pos": [132.50799999999998, 86.36], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -0.0, "pos": [135.208, 86.36], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R5", "bbox": {"pos": [131.482999, 85.41999899999999], "size": [4.750001999999999, 1.880002]}}, {"layer": "F", "center": [109.61399999999999, 115.07526999999999], "pads": [{"layers": ["F"], "angle": -0.0, "pos": [108.264, 115.07526999999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -0.0, "pos": [110.964, 115.07526999999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R4", "bbox": {"pos": [107.23899899999999, 114.135269], "size": [4.750001999999999, 1.880002]}}, {"layer": "F", "center": [109.61399999999999, 100.45617999999999], "pads": [{"layers": ["F"], "angle": -0.0, "pos": [110.964, 100.45617999999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -0.0, "pos": [108.264, 100.45617999999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R3", "bbox": {"pos": [107.23899899999999, 99.516179], "size": [4.750001999999999, 1.880002]}}, {"layer": "F", "center": [109.61399999999999, 86.59908999999999], "pads": [{"layers": ["F"], "angle": -0.0, "pos": [108.264, 86.59908999999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -0.0, "pos": [110.964, 86.59908999999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R2", "bbox": {"pos": [107.23899899999999, 85.659089], "size": [4.750001999999999, 1.880002]}}, {"layer": "F", "center": [109.61399999999999, 71.97999999999999], "pads": [{"layers": ["F"], "angle": -0.0, "pos": [110.964, 71.97999999999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.5, 1.3]}, {"layers": ["F"], "angle": -0.0, "pos": [108.264, 71.97999999999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.5, 1.3]}], "drawings": [], "ref": "R1", "bbox": {"pos": [107.23899899999999, 71.039999], "size": [4.750001999999999, 1.880002]}}, {"layer": "F", "center": [97.78999999999999, 83.566], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [97.78999999999999, 111.506], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [97.78999999999999, 108.966], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [97.78999999999999, 106.426], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [97.78999999999999, 103.886], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [97.78999999999999, 101.34599999999999], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [97.78999999999999, 98.806], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [97.78999999999999, 96.26599999999999], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [97.78999999999999, 93.726], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [97.78999999999999, 91.18599999999999], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [97.78999999999999, 88.646], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [97.78999999999999, 86.106], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [97.78999999999999, 83.566], "drillsize": [1.0, 1.0], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7, 1.7]}], "drawings": [], "ref": "J1", "bbox": {"pos": [95.96499899999999, 81.740999], "size": [3.6500019999999997, 31.600002]}}, {"layer": "F", "center": [133.79999999999998, 104.57799999999999], "pads": [{"layers": ["F"], "angle": -0.0, "pos": [132.79999999999998, 103.628], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}, {"layers": ["F"], "angle": -0.0, "pos": [132.79999999999998, 105.52799999999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}, {"layers": ["F"], "angle": -0.0, "pos": [134.79999999999998, 104.57799999999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}], "drawings": [], "ref": "Q6", "bbox": {"pos": [132.074999, 102.802999], "size": [3.450002, 3.5500019999999997]}}, {"layer": "F", "center": [109.61399999999999, 76.11454499999999], "pads": [{"layers": ["F"], "angle": -0.0, "pos": [110.61399999999999, 76.11454499999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}, {"layers": ["F"], "angle": -0.0, "pos": [108.61399999999999, 77.064545], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}, {"layers": ["F"], "angle": -0.0, "pos": [108.61399999999999, 75.16454499999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}], "drawings": [], "ref": "Q1", "bbox": {"pos": [107.888999, 74.339544], "size": [3.450002, 3.5500019999999997]}}, {"layer": "F", "center": [109.61399999999999, 90.479635], "pads": [{"layers": ["F"], "angle": -0.0, "pos": [108.61399999999999, 89.529635], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}, {"layers": ["F"], "angle": -0.0, "pos": [108.61399999999999, 91.42963499999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}, {"layers": ["F"], "angle": -0.0, "pos": [110.61399999999999, 90.479635], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}], "drawings": [], "ref": "Q2", "bbox": {"pos": [107.888999, 88.704634], "size": [3.450002, 3.5500019999999997]}}, {"layer": "F", "center": [109.61399999999999, 104.844725], "pads": [{"layers": ["F"], "angle": -0.0, "pos": [110.61399999999999, 104.844725], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}, {"layers": ["F"], "angle": -0.0, "pos": [108.61399999999999, 105.794725], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}, {"layers": ["F"], "angle": -0.0, "pos": [108.61399999999999, 103.894725], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}], "drawings": [], "ref": "Q3", "bbox": {"pos": [107.888999, 103.069724], "size": [3.450002, 3.5500019999999997]}}, {"layer": "F", "center": [133.79999999999998, 90.466905], "pads": [{"layers": ["F"], "angle": -0.0, "pos": [132.79999999999998, 89.516905], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}, {"layers": ["F"], "angle": -0.0, "pos": [132.79999999999998, 91.416905], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}, {"layers": ["F"], "angle": -0.0, "pos": [134.79999999999998, 90.466905], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}], "drawings": [], "ref": "Q5", "bbox": {"pos": [132.074999, 88.691904], "size": [3.450002, 3.5500019999999997]}}, {"layer": "F", "center": [109.61399999999999, 119.20981499999999], "pads": [{"layers": ["F"], "angle": -0.0, "pos": [110.61399999999999, 119.20981499999999], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}, {"layers": ["F"], "angle": -0.0, "pos": [108.61399999999999, 120.159815], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}, {"layers": ["F"], "angle": -0.0, "pos": [108.61399999999999, 118.25981499999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [0.8999999999999999, 0.7999999999999999]}], "drawings": [], "ref": "Q4", "bbox": {"pos": [107.888999, 117.43481399999999], "size": [3.450002, 3.5500019999999997]}}, {"layer": "B", "center": [135.636, 104.648], "pads": [{"layers": ["B"], "angle": -90.0, "pos": [135.636, 104.648], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [5.0, 10.0]}], "drawings": [], "ref": "J12", "bbox": {"pos": [130.360999, 101.872999], "size": [10.550002, 5.550002]}}, {"layer": "B", "center": [135.636, 90.678], "pads": [{"layers": ["B"], "angle": -90.0, "pos": [135.636, 90.678], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [5.0, 10.0]}], "drawings": [], "ref": "J11", "bbox": {"pos": [130.360999, 87.902999], "size": [10.550002, 5.550002]}}, {"layer": "B", "center": [122.68199999999999, 119.12599999999999], "pads": [{"layers": ["B"], "angle": -90.0, "pos": [122.68199999999999, 119.12599999999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [5.0, 10.0]}], "drawings": [], "ref": "J10", "bbox": {"pos": [117.406999, 116.350999], "size": [10.550002, 5.550002]}}, {"layer": "B", "center": [122.68199999999999, 104.648], "pads": [{"layers": ["B"], "angle": -90.0, "pos": [122.68199999999999, 104.648], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [5.0, 10.0]}], "drawings": [], "ref": "J9", "bbox": {"pos": [117.406999, 101.872999], "size": [10.550002, 5.550002]}}, {"layer": "B", "center": [122.68199999999999, 90.678], "pads": [{"layers": ["B"], "angle": -90.0, "pos": [122.68199999999999, 90.678], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [5.0, 10.0]}], "drawings": [], "ref": "J8", "bbox": {"pos": [117.406999, 87.902999], "size": [10.550002, 5.550002]}}, {"layer": "B", "center": [122.428, 76.2], "pads": [{"layers": ["B"], "angle": -90.0, "pos": [122.428, 76.2], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [5.0, 10.0]}], "drawings": [], "ref": "J7", "bbox": {"pos": [117.152999, 73.424999], "size": [10.550002, 5.550002]}}, {"layer": "B", "center": [109.728, 119.12599999999999], "pads": [{"layers": ["B"], "angle": -90.0, "pos": [109.728, 119.12599999999999], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [5.0, 10.0]}], "drawings": [], "ref": "J6", "bbox": {"pos": [104.45299899999999, 116.350999], "size": [10.550002, 5.550002]}}, {"layer": "B", "center": [109.728, 104.648], "pads": [{"layers": ["B"], "angle": -90.0, "pos": [109.728, 104.648], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [5.0, 10.0]}], "drawings": [], "ref": "J5", "bbox": {"pos": [104.45299899999999, 101.872999], "size": [10.550002, 5.550002]}}, {"layer": "B", "center": [109.728, 90.678], "pads": [{"layers": ["B"], "angle": -90.0, "pos": [109.728, 90.678], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [5.0, 10.0]}], "drawings": [], "ref": "J4", "bbox": {"pos": [104.45299899999999, 87.902999], "size": [10.550002, 5.550002]}}, {"layer": "B", "center": [109.982, 76.2], "pads": [{"layers": ["B"], "angle": -90.0, "pos": [109.982, 76.2], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [5.0, 10.0]}], "drawings": [], "ref": "J3", "bbox": {"pos": [104.706999, 73.424999], "size": [10.550002, 5.550002]}}, {"layer": "B", "center": [135.636, 61.721999999999994], "pads": [{"layers": ["B"], "angle": -90.0, "pos": [135.636, 61.721999999999994], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [5.0, 10.0]}], "drawings": [], "ref": "J2", "bbox": {"pos": [130.360999, 58.946999], "size": [10.550002, 5.550002]}}, {"layer": "F", "center": [104.902, 61.214], "pads": [], "drawings": [], "ref": "REF***", "bbox": {"pos": [99.349873, 54.640032999999995], "size": [11.131321999999999, 13.147933]}}], "edges": [{"start": [140.018, 141.37199999999999], "end": [98.018, 141.37199999999999], "type": "segment", "width": 0.09999999999999999}, {"start": [140.018, 51.372], "end": [98.018, 51.372], "type": "segment", "width": 0.09999999999999999}, {"start": [94.018, 55.372], "end": [94.018, 137.37199999999999], "type": "segment", "width": 0.09999999999999999}, {"width": 0.09999999999999999, "endangle": 90.0, "start": [140.018, 137.37199999999999], "radius": 4.0, "startangle": 0.0, "type": "arc"}, {"start": [144.018, 137.37199999999999], "end": [144.018, 55.372], "type": "segment", "width": 0.09999999999999999}, {"width": 0.09999999999999999, "endangle": 0.0, "start": [140.018, 55.372], "radius": 4.0, "startangle": -90.0, "type": "arc"}, {"width": 0.09999999999999999, "endangle": 270.0, "start": [98.018, 55.372], "radius": 4.0, "startangle": 180.0, "type": "arc"}, {"start": [119.053327, 61.372], "radius": 1.600001, "type": "circle", "width": 0.09999999999999999}, {"start": [119.053327, 131.37199999999999], "radius": 1.5999999999999999, "type": "circle", "width": 0.09999999999999999}, {"width": 0.09999999999999999, "endangle": 180.0, "start": [98.018, 137.37199999999999], "radius": 4.0, "startangle": 90.0, "type": "arc"}], "bom": {"both": [[16, "R_US", "R_0805_HandSoldering", [["R1", 25], ["R2", 24], ["R3", 23], ["R4", 22], ["R5", 21], ["R6", 20], ["R7", 15], ["R8", 16], ["R9", 17], ["R10", 18], ["R11", 19], ["R12", 14], ["R13", 11], ["R14", 12], ["R15", 13], ["R16", 10]], []], [10, "LED", "LED_1206_HandSoldering", [["D1", 9], ["D2", 8], ["D3", 7], ["D4", 6], ["D5", 5], ["D6", 4], ["D7", 3], ["D8", 2], ["D9", 1], ["D10", 0]], []], [6, "2N7002", "SOT-23", [["Q1", 28], ["Q2", 29], ["Q3", 30], ["Q4", 32], ["Q5", 31], ["Q6", 27]], []], [1, "switchesOut", "Socket_Strip_Straight_1x12_Pitch2.54mm", [["J1", 26]], []], [11, "Conn_01x01_Female", "SolderWirePad_single_SMD_5x10mm", [["J2", 43], ["J3", 42], ["J4", 41], ["J5", 40], ["J6", 39], ["J7", 38], ["J8", 37], ["J9", 36], ["J10", 35], ["J11", 34], ["J12", 33]], []]], "B": [[11, "Conn_01x01_Female", "SolderWirePad_single_SMD_5x10mm", [["J2", 43], ["J3", 42], ["J4", 41], ["J5", 40], ["J6", 39], ["J7", 38], ["J8", 37], ["J9", 36], ["J10", 35], ["J11", 34], ["J12", 33]], []]], "F": [[16, "R_US", "R_0805_HandSoldering", [["R1", 25], ["R2", 24], ["R3", 23], ["R4", 22], ["R5", 21], ["R6", 20], ["R7", 15], ["R8", 16], ["R9", 17], ["R10", 18], ["R11", 19], ["R12", 14], ["R13", 11], ["R14", 12], ["R15", 13], ["R16", 10]], []], [10, "LED", "LED_1206_HandSoldering", [["D1", 9], ["D2", 8], ["D3", 7], ["D4", 6], ["D5", 5], ["D6", 4], ["D7", 3], ["D8", 2], ["D9", 1], ["D10", 0]], []], [6, "2N7002", "SOT-23", [["Q1", 28], ["Q2", 29], ["Q3", 30], ["Q4", 32], ["Q5", 31], ["Q6", 27]], []], [1, "switchesOut", "Socket_Strip_Straight_1x12_Pitch2.54mm", [["J1", 26]], []]]}, "silkscreen": {"B": [{"width": 1.0, "angle": 90.0, "attr": ["mirrored"], "horiz_justify": 0, "text": "J12", "thickness": 0.15, "pos": [139.446, 104.648], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": ["mirrored"], "horiz_justify": 0, "text": "J11", "thickness": 0.15, "pos": [139.446, 90.678], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": ["mirrored"], "horiz_justify": 0, "text": "J10", "thickness": 0.15, "pos": [126.49199999999999, 119.12599999999999], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": ["mirrored"], "horiz_justify": 0, "text": "J9", "thickness": 0.15, "pos": [126.49199999999999, 104.648], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": ["mirrored"], "horiz_justify": 0, "text": "J8", "thickness": 0.15, "pos": [126.49199999999999, 90.678], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": ["mirrored"], "horiz_justify": 0, "text": "J7", "thickness": 0.15, "pos": [126.238, 76.2], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": ["mirrored"], "horiz_justify": 0, "text": "J6", "thickness": 0.15, "pos": [113.538, 119.12599999999999], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": ["mirrored"], "horiz_justify": 0, "text": "J5", "thickness": 0.15, "pos": [113.538, 104.648], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": ["mirrored"], "horiz_justify": 0, "text": "J4", "thickness": 0.15, "pos": [113.538, 90.678], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": ["mirrored"], "horiz_justify": 0, "text": "J3", "thickness": 0.15, "pos": [113.792, 76.2], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": ["mirrored"], "horiz_justify": 0, "text": "J2", "thickness": 0.15, "pos": [139.446, 61.721999999999994], "height": 1.0}], "F": [{"width": 1.5, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "swithBoard", "thickness": 0.3, "pos": [136.652, 124.96799999999999], "height": 1.5}, {"width": 3.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "OpenPLC", "thickness": 0.5, "pos": [139.192, 61.976], "height": 3.0}, {"width": 3.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "FOSSEE", "thickness": 0.5, "pos": [129.79399999999998, 61.976], "height": 3.0}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "D10", "thickness": 0.15, "pos": [125.099514, 119.20981499999999], "height": 1.0}, {"start": [124.199514, 116.109815], "end": [122.29951399999999, 116.109815], "type": "segment", "width": 0.12}, {"start": [122.29951399999999, 116.109815], "end": [122.29951399999999, 120.809815], "type": "segment", "width": 0.12}, {"start": [124.199514, 116.109815], "end": [124.199514, 120.809815], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "D9", "thickness": 0.15, "pos": [125.08972999999999, 104.59072499999999], "height": 1.0}, {"start": [124.18973, 101.490725], "end": [124.18973, 106.190725], "type": "segment", "width": 0.12}, {"start": [122.28972999999999, 101.490725], "end": [122.28972999999999, 106.190725], "type": "segment", "width": 0.12}, {"start": [124.18973, 101.490725], "end": [122.28972999999999, 101.490725], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "D8", "thickness": 0.15, "pos": [125.032653, 90.73363499999999], "height": 1.0}, {"start": [124.13265299999999, 87.633635], "end": [122.232653, 87.633635], "type": "segment", "width": 0.12}, {"start": [122.232653, 87.633635], "end": [122.232653, 92.333635], "type": "segment", "width": 0.12}, {"start": [124.13265299999999, 87.633635], "end": [124.13265299999999, 92.333635], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "D7", "thickness": 0.15, "pos": [124.90767899999999, 76.11454499999999], "height": 1.0}, {"start": [124.007679, 73.014545], "end": [124.007679, 77.714545], "type": "segment", "width": 0.12}, {"start": [122.10767899999999, 73.014545], "end": [122.10767899999999, 77.714545], "type": "segment", "width": 0.12}, {"start": [124.007679, 73.014545], "end": [122.10767899999999, 73.014545], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "D6", "thickness": 0.15, "pos": [136.01, 104.57799999999999], "height": 1.0}, {"start": [136.91, 107.678], "end": [138.81, 107.678], "type": "segment", "width": 0.12}, {"start": [138.81, 107.678], "end": [138.81, 102.978], "type": "segment", "width": 0.12}, {"start": [136.91, 107.678], "end": [136.91, 102.978], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "D5", "thickness": 0.15, "pos": [136.01, 90.466905], "height": 1.0}, {"start": [136.91, 93.56690499999999], "end": [136.91, 88.866905], "type": "segment", "width": 0.12}, {"start": [138.81, 93.56690499999999], "end": [138.81, 88.866905], "type": "segment", "width": 0.12}, {"start": [136.91, 93.56690499999999], "end": [138.81, 93.56690499999999], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "D4", "thickness": 0.15, "pos": [111.794, 119.20981499999999], "height": 1.0}, {"start": [112.69399999999999, 122.309815], "end": [114.594, 122.309815], "type": "segment", "width": 0.12}, {"start": [114.594, 122.309815], "end": [114.594, 117.609815], "type": "segment", "width": 0.12}, {"start": [112.69399999999999, 122.309815], "end": [112.69399999999999, 117.609815], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "D3", "thickness": 0.15, "pos": [111.824, 104.59072499999999], "height": 1.0}, {"start": [112.72399999999999, 107.690725], "end": [112.72399999999999, 102.990725], "type": "segment", "width": 0.12}, {"start": [114.624, 107.690725], "end": [114.624, 102.990725], "type": "segment", "width": 0.12}, {"start": [112.72399999999999, 107.690725], "end": [114.624, 107.690725], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "D2", "thickness": 0.15, "pos": [111.824, 90.73363499999999], "height": 1.0}, {"start": [112.72399999999999, 93.833635], "end": [114.624, 93.833635], "type": "segment", "width": 0.12}, {"start": [114.624, 93.833635], "end": [114.624, 89.133635], "type": "segment", "width": 0.12}, {"start": [112.72399999999999, 93.833635], "end": [112.72399999999999, 89.133635], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "D1", "thickness": 0.15, "pos": [111.824, 76.11454499999999], "height": 1.0}, {"start": [112.72399999999999, 79.214545], "end": [112.72399999999999, 74.514545], "type": "segment", "width": 0.12}, {"start": [114.624, 79.214545], "end": [114.624, 74.514545], "type": "segment", "width": 0.12}, {"start": [112.72399999999999, 79.214545], "end": [114.624, 79.214545], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "R16", "thickness": 0.15, "pos": [121.393514, 119.20981499999999], "height": 1.0}, {"start": [118.813514, 119.809815], "end": [118.813514, 118.609815], "type": "segment", "width": 0.12}, {"start": [120.57351399999999, 118.609815], "end": [120.57351399999999, 119.809815], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "R13", "thickness": 0.15, "pos": [121.201679, 76.11454499999999], "height": 1.0}, {"start": [120.38167899999999, 75.514545], "end": [120.38167899999999, 76.714545], "type": "segment", "width": 0.12}, {"start": [118.621679, 76.714545], "end": [118.621679, 75.514545], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "R14", "thickness": 0.15, "pos": [121.326653, 90.73363499999999], "height": 1.0}, {"start": [118.746653, 91.333635], "end": [118.746653, 90.133635], "type": "segment", "width": 0.12}, {"start": [120.506653, 90.133635], "end": [120.506653, 91.333635], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "R15", "thickness": 0.15, "pos": [121.38373, 104.59072499999999], "height": 1.0}, {"start": [120.56372999999999, 103.990725], "end": [120.56372999999999, 105.190725], "type": "segment", "width": 0.12}, {"start": [118.80373, 105.190725], "end": [118.80373, 103.990725], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "R12", "thickness": 0.15, "pos": [127.762, 104.902], "height": 1.0}, {"start": [130.742, 104.068], "end": [130.742, 105.268], "type": "segment", "width": 0.12}, {"start": [128.982, 105.268], "end": [128.982, 104.068], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "R7", "thickness": 0.15, "pos": [103.996, 76.11454499999999], "height": 1.0}, {"start": [104.81599999999999, 76.714545], "end": [104.81599999999999, 75.514545], "type": "segment", "width": 0.12}, {"start": [106.576, 75.514545], "end": [106.576, 76.714545], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "R8", "thickness": 0.15, "pos": [103.996, 90.73363499999999], "height": 1.0}, {"start": [106.576, 90.133635], "end": [106.576, 91.333635], "type": "segment", "width": 0.12}, {"start": [104.81599999999999, 91.333635], "end": [104.81599999999999, 90.133635], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "R9", "thickness": 0.15, "pos": [103.996, 104.59072499999999], "height": 1.0}, {"start": [104.81599999999999, 105.190725], "end": [104.81599999999999, 103.990725], "type": "segment", "width": 0.12}, {"start": [106.576, 103.990725], "end": [106.576, 105.190725], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "R10", "thickness": 0.15, "pos": [103.926, 119.20981499999999], "height": 1.0}, {"start": [106.506, 118.609815], "end": [106.506, 119.809815], "type": "segment", "width": 0.12}, {"start": [104.746, 119.809815], "end": [104.746, 118.609815], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "R11", "thickness": 0.15, "pos": [127.762, 90.42399999999999], "height": 1.0}, {"start": [128.982, 91.06690499999999], "end": [128.982, 89.866905], "type": "segment", "width": 0.12}, {"start": [130.742, 89.866905], "end": [130.742, 91.06690499999999], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R6", "thickness": 0.15, "pos": [133.79999999999998, 98.74345], "height": 1.0}, {"start": [134.4, 101.32345], "end": [133.2, 101.32345], "type": "segment", "width": 0.12}, {"start": [133.2, 99.56344999999999], "end": [134.4, 99.56344999999999], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R5", "thickness": 0.15, "pos": [133.858, 84.66], "height": 1.0}, {"start": [134.458, 87.24], "end": [133.25799999999998, 87.24], "type": "segment", "width": 0.12}, {"start": [133.25799999999998, 85.47999999999999], "end": [134.458, 85.47999999999999], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R4", "thickness": 0.15, "pos": [109.61399999999999, 113.37527], "height": 1.0}, {"start": [110.214, 115.95527], "end": [109.014, 115.95527], "type": "segment", "width": 0.12}, {"start": [109.014, 114.19527], "end": [110.214, 114.19527], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R3", "thickness": 0.15, "pos": [109.61399999999999, 98.75618], "height": 1.0}, {"start": [109.014, 99.57618], "end": [110.214, 99.57618], "type": "segment", "width": 0.12}, {"start": [110.214, 101.33618], "end": [109.014, 101.33618], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R2", "thickness": 0.15, "pos": [109.61399999999999, 84.89909], "height": 1.0}, {"start": [110.214, 87.47909], "end": [109.014, 87.47909], "type": "segment", "width": 0.12}, {"start": [109.014, 85.71909], "end": [110.214, 85.71909], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R1", "thickness": 0.15, "pos": [109.61399999999999, 70.28], "height": 1.0}, {"start": [109.014, 71.1], "end": [110.214, 71.1], "type": "segment", "width": 0.12}, {"start": [110.214, 72.86], "end": [109.014, 72.86], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "J1", "thickness": 0.15, "pos": [97.78999999999999, 81.23599999999999], "height": 1.0}, {"start": [96.46, 82.23599999999999], "end": [97.78999999999999, 82.23599999999999], "type": "segment", "width": 0.12}, {"start": [96.46, 83.566], "end": [96.46, 82.23599999999999], "type": "segment", "width": 0.12}, {"start": [99.11999999999999, 84.836], "end": [96.46, 84.836], "type": "segment", "width": 0.12}, {"start": [99.11999999999999, 112.836], "end": [99.11999999999999, 84.836], "type": "segment", "width": 0.12}, {"start": [96.46, 112.836], "end": [99.11999999999999, 112.836], "type": "segment", "width": 0.12}, {"start": [96.46, 84.836], "end": [96.46, 112.836], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "Q6", "thickness": 0.15, "pos": [133.79999999999998, 102.07799999999999], "height": 1.0}, {"start": [134.56, 106.158], "end": [134.56, 105.228], "type": "segment", "width": 0.12}, {"start": [134.56, 102.99799999999999], "end": [134.56, 103.928], "type": "segment", "width": 0.12}, {"start": [134.56, 102.99799999999999], "end": [132.4, 102.99799999999999], "type": "segment", "width": 0.12}, {"start": [134.56, 106.158], "end": [133.1, 106.158], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "Q1", "thickness": 0.15, "pos": [109.61399999999999, 73.61454499999999], "height": 1.0}, {"start": [110.374, 77.69454499999999], "end": [108.914, 77.69454499999999], "type": "segment", "width": 0.12}, {"start": [110.374, 74.534545], "end": [108.214, 74.534545], "type": "segment", "width": 0.12}, {"start": [110.374, 74.534545], "end": [110.374, 75.464545], "type": "segment", "width": 0.12}, {"start": [110.374, 77.69454499999999], "end": [110.374, 76.764545], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "Q2", "thickness": 0.15, "pos": [109.61399999999999, 87.979635], "height": 1.0}, {"start": [110.374, 92.059635], "end": [110.374, 91.129635], "type": "segment", "width": 0.12}, {"start": [110.374, 88.89963499999999], "end": [110.374, 89.829635], "type": "segment", "width": 0.12}, {"start": [110.374, 88.89963499999999], "end": [108.214, 88.89963499999999], "type": "segment", "width": 0.12}, {"start": [110.374, 92.059635], "end": [108.914, 92.059635], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "Q3", "thickness": 0.15, "pos": [109.61399999999999, 102.344725], "height": 1.0}, {"start": [110.374, 106.424725], "end": [108.914, 106.424725], "type": "segment", "width": 0.12}, {"start": [110.374, 103.264725], "end": [108.214, 103.264725], "type": "segment", "width": 0.12}, {"start": [110.374, 103.264725], "end": [110.374, 104.19472499999999], "type": "segment", "width": 0.12}, {"start": [110.374, 106.424725], "end": [110.374, 105.49472499999999], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "Q5", "thickness": 0.15, "pos": [133.79999999999998, 87.966905], "height": 1.0}, {"start": [134.56, 92.046905], "end": [134.56, 91.116905], "type": "segment", "width": 0.12}, {"start": [134.56, 88.886905], "end": [134.56, 89.81690499999999], "type": "segment", "width": 0.12}, {"start": [134.56, 88.886905], "end": [132.4, 88.886905], "type": "segment", "width": 0.12}, {"start": [134.56, 92.046905], "end": [133.1, 92.046905], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "Q4", "thickness": 0.15, "pos": [109.61399999999999, 116.70981499999999], "height": 1.0}, {"start": [110.374, 120.78981499999999], "end": [108.914, 120.78981499999999], "type": "segment", "width": 0.12}, {"start": [110.374, 117.629815], "end": [108.214, 117.629815], "type": "segment", "width": 0.12}, {"start": [110.374, 117.629815], "end": [110.374, 118.559815], "type": "segment", "width": 0.12}, {"start": [110.374, 120.78981499999999], "end": [110.374, 119.859815], "type": "segment", "width": 0.12}, {"angle": [90.0], "type": "polygon", "pos": [104.902, 61.214], "polygons": [[[-4.8281, 3.861903], [-4.71655, 3.917522], [-4.618092, 4.019931], [-4.590977, 4.0578639999999995], [-4.561438, 4.1075], [-4.542272, 4.1614119999999994], [-4.531307, 4.233364], [-4.526371, 4.337122], [-4.525287, 4.474101], [-4.530182, 4.661815], [-4.547196, 4.802758], [-4.579823, 4.907908], [-4.631558, 4.988243], [-4.705896, 5.054741], [-4.711358, 5.058678], [-4.784619999999999, 5.098953], [-4.87284, 5.11888], [-4.985037999999999, 5.123793], [-5.167433, 5.123793], [-5.167509, 5.300857], [-5.169207, 5.39947], [-5.17955, 5.457313999999999], [-5.2065779999999995, 5.492006], [-5.258331999999999, 5.521164], [-5.270760999999999, 5.527121], [-5.328923, 5.555039], [-5.373956, 5.572672], [-5.4074409999999995, 5.574193999999999], [-5.430962, 5.553781], [-5.4460999999999995, 5.5056069999999995], [-5.4544369999999995, 5.423846], [-5.457555999999999, 5.302671999999999], [-5.45704, 5.13626], [-5.454471, 4.918785], [-5.4536679999999995, 4.853736], [-5.450778, 4.629502], [-5.448188, 4.4828209999999995], [-5.167586, 4.4828209999999995], [-5.166009, 4.607326], [-5.159, 4.688787], [-5.143142, 4.742515], [-5.115019, 4.783823], [-5.095924999999999, 4.803971], [-5.017865, 4.862921], [-4.948753, 4.867719999999999], [-4.87744, 4.819038], [-4.8756319999999995, 4.817241], [-4.846617, 4.779618], [-4.828967, 4.728484], [-4.8200639999999995, 4.649738], [-4.817291, 4.529275999999999], [-4.817241, 4.502587999999999], [-4.823942, 4.336583], [-4.845752, 4.221505], [-4.885235, 4.151254], [-4.9449559999999995, 4.1197289999999995], [-4.9794719999999995, 4.1165519999999995], [-5.061389, 4.13146], [-5.117579, 4.180548], [-5.151402, 4.2703619999999995], [-5.16622, 4.407445], [-5.167586, 4.4828209999999995], [-5.448188, 4.4828209999999995], [-5.447712999999999, 4.455952], [-5.443753, 4.325381999999999], [-5.438174, 4.230087], [-5.430254, 4.162364], [-5.419269, 4.114507], [-5.4044989999999995, 4.078813], [-5.385218, 4.047578], [-5.376951, 4.035824], [-5.267288, 3.924797], [-5.128635, 3.861847], [-4.968246, 3.8442969999999996], [-4.8281, 3.861903]]]}, {"angle": [90.0], "type": "polygon", "pos": [104.902, 61.214], "polygons": [[[-2.5825709999999997, 3.877719], [-2.488877, 3.931914], [-2.423736, 3.9857069999999997], [-2.376093, 4.042066], [-2.343272, 4.110987], [-2.322594, 4.202468], [-2.3113799999999998, 4.326506], [-2.3069509999999998, 4.493098], [-2.306437, 4.612851], [-2.306437, 5.053659], [-2.430517, 5.109283], [-2.554598, 5.1649069999999995], [-2.5691949999999997, 4.6820949999999995], [-2.575227, 4.501779], [-2.581555, 4.370901], [-2.589394, 4.280511], [-2.599963, 4.221664], [-2.614477, 4.185413], [-2.634152, 4.1628099999999995], [-2.640465, 4.157916999999999], [-2.736112, 4.119706], [-2.8327929999999997, 4.134827], [-2.890345, 4.174943], [-2.9137549999999997, 4.20337], [-2.929961, 4.240672], [-2.9402589999999997, 4.297223], [-2.945951, 4.383394], [-2.948336, 4.509558], [-2.948736, 4.641042], [-2.948814, 4.805999], [-2.9516389999999997, 4.9227609999999995], [-2.961093, 5.00151], [-2.98106, 5.0524309999999995], [-3.015424, 5.085706], [-3.068068, 5.11152], [-3.1383829999999997, 5.138344], [-3.2151799999999997, 5.167542], [-3.206038, 4.6493459999999995], [-3.2023569999999997, 4.462539], [-3.19805, 4.32449], [-3.191877, 4.225568], [-3.182598, 4.1561449999999995], [-3.168973, 4.10659], [-3.149761, 4.067273], [-3.126598, 4.032584], [-3.0148479999999998, 3.92177], [-2.878487, 3.8576889999999997], [-2.730175, 3.842339], [-2.5825709999999997, 3.877719]]]}, {"angle": [90.0], "type": "polygon", "pos": [104.902, 61.214], "polygons": [[[-5.951779, 3.866015], [-5.814939, 3.9379679999999997], [-5.7139489999999995, 4.0537659999999995], [-5.678075, 4.128213], [-5.650161, 4.239992], [-5.635871, 4.381227], [-5.634516, 4.535371], [-5.645404999999999, 4.685879], [-5.667847, 4.816205], [-5.70115, 4.909803], [-5.711385, 4.925922], [-5.832618, 5.0462489999999995], [-5.9766129999999995, 5.118316999999999], [-6.132861, 5.1394079999999995], [-6.290852, 5.106802], [-6.33482, 5.087253], [-6.420444, 5.027012], [-6.495591999999999, 4.947134999999999], [-6.502694, 4.937004], [-6.531561, 4.888180999999999], [-6.550643, 4.83599], [-6.561916, 4.767285], [-6.567355, 4.668918], [-6.568937999999999, 4.527744], [-6.5689649999999995, 4.496092], [-6.568893, 4.486019], [-6.277011, 4.486019], [-6.275313, 4.619256], [-6.268628, 4.707674], [-6.254575, 4.764785], [-6.230771, 4.804101999999999], [-6.218621, 4.817241], [-6.148764, 4.867172], [-6.080941, 4.864895], [-6.012365, 4.821584], [-5.971464999999999, 4.775346], [-5.947242, 4.707857], [-5.933638999999999, 4.601433], [-5.932706, 4.58902], [-5.930384, 4.396147], [-5.95465, 4.2528999999999995], [-6.005176, 4.160159999999999], [-6.081632, 4.118806999999999], [-6.108924, 4.1165519999999995], [-6.1805889999999994, 4.127893], [-6.22961, 4.167184], [-6.259582, 4.242325999999999], [-6.274101, 4.361222], [-6.277011, 4.486019], [-6.568893, 4.486019], [-6.567877999999999, 4.3456589999999995], [-6.563312, 4.240549], [-6.553312, 4.167714], [-6.535921, 4.114108], [-6.509183999999999, 4.066681], [-6.503276, 4.0578639999999995], [-6.403968, 3.9390069999999997], [-6.295757999999999, 3.870008], [-6.164019, 3.842619], [-6.119282999999999, 3.841281], [-5.951779, 3.866015]]]}, {"angle": [90.0], "type": "polygon", "pos": [104.902, 61.214], "polygons": [[[-3.6844479999999997, 3.884676], [-3.569342, 3.9621109999999997], [-3.4803889999999997, 4.073949], [-3.427251, 4.216265], [-3.4165029999999996, 4.321015], [-3.4177239999999998, 4.364726], [-3.4279439999999997, 4.398194], [-3.4560389999999996, 4.428179], [-3.510884, 4.46144], [-3.601355, 4.504738], [-3.736328, 4.564833], [-3.737011, 4.565134], [-3.861249, 4.622037], [-3.9631269999999996, 4.672565], [-4.032233, 4.7112799999999995], [-4.058154, 4.73274], [-4.058161, 4.732913], [-4.035315, 4.779644], [-3.9818909999999996, 4.831154], [-3.9205579999999998, 4.8682609999999995], [-3.8894849999999996, 4.8756319999999995], [-3.8047109999999997, 4.850137999999999], [-3.7317069999999997, 4.786290999999999], [-3.696087, 4.716094], [-3.6618199999999996, 4.664343], [-3.594697, 4.605409], [-3.515792, 4.554495999999999], [-3.446179, 4.526809], [-3.4316229999999996, 4.525287], [-3.415237, 4.550320999999999], [-3.41425, 4.614311], [-3.4262919999999997, 4.700593], [-3.4489929999999998, 4.792501], [-3.479986, 4.873368999999999], [-3.4815519999999998, 4.8765089999999995], [-3.5748189999999997, 5.006734], [-3.695696, 5.095311], [-3.832973, 5.138786], [-3.97544, 5.133706], [-4.1118879999999995, 5.076616], [-4.117955, 5.072602], [-4.22529, 4.975326], [-4.295868, 4.848409], [-4.334925999999999, 4.681526], [-4.340167999999999, 4.634639], [-4.349451999999999, 4.413329], [-4.338322, 4.310124], [-4.058161, 4.310124], [-4.054520999999999, 4.374503], [-4.034611, 4.393291], [-3.984974, 4.3792349999999995], [-3.906733, 4.346009], [-3.8192739999999996, 4.304359], [-3.8171009999999996, 4.303256], [-3.7429699999999997, 4.264265], [-3.713219, 4.238244], [-3.7205549999999996, 4.210965], [-3.7514469999999998, 4.175121], [-3.83004, 4.123251], [-3.9146769999999997, 4.119439], [-3.9905969999999997, 4.157189], [-4.043035, 4.230001], [-4.058161, 4.310124], [-4.338322, 4.310124], [-4.330356, 4.236261], [-4.281366, 4.095829], [-4.213164, 3.9974469999999998], [-4.090065, 3.89803], [-3.954472, 3.8487109999999998], [-3.816045, 3.8455679999999997], [-3.6844479999999997, 3.884676]]]}, {"angle": [90.0], "type": "polygon", "pos": [104.902, 61.214], "polygons": [[[-1.255402, 3.7238569999999998], [-1.246846, 3.8431879999999996], [-1.2370189999999999, 3.913506], [-1.223401, 3.9441789999999997], [-1.203473, 3.944571], [-1.197011, 3.9409099999999997], [-1.11106, 3.914398], [-0.999255, 3.915946], [-0.885586, 3.943199], [-0.8144899999999999, 3.978455], [-0.741595, 4.034778], [-0.688307, 4.098519], [-0.651725, 4.17951], [-0.62895, 4.287586], [-0.617081, 4.43258], [-0.6132179999999999, 4.624326], [-0.6131489999999999, 4.661109], [-0.613103, 5.074288], [-0.705046, 5.106339], [-0.7703479999999999, 5.128144], [-0.806176, 5.138297], [-0.80723, 5.1383909999999995], [-0.810758, 5.11086], [-0.813761, 5.034923], [-0.81601, 4.920565], [-0.817276, 4.777769], [-0.817471, 4.690951], [-0.817877, 4.519773], [-0.8199679999999999, 4.397088], [-0.8250529999999999, 4.313], [-0.83444, 4.257614], [-0.8494389999999999, 4.221032], [-0.871358, 4.193359], [-0.8850429999999999, 4.180032], [-0.979051, 4.126328], [-1.081636, 4.122307], [-1.17471, 4.167725], [-1.191922, 4.184123], [-1.217168, 4.214957], [-1.23468, 4.251531], [-1.245858, 4.304415], [-1.2521039999999999, 4.384177], [-1.254818, 4.501385], [-1.255402, 4.662991], [-1.255402, 5.074288], [-1.347345, 5.106339], [-1.412647, 5.128144], [-1.448475, 5.138297], [-1.4495289999999998, 5.1383909999999995], [-1.4522249999999999, 5.110448], [-1.454655, 5.03163], [-1.4567219999999999, 4.909453], [-1.458329, 4.751431999999999], [-1.459377, 4.565083], [-1.4597689999999999, 4.35792], [-1.45977, 4.348706], [-1.45977, 3.55902], [-1.364885, 3.5189969999999997], [-1.27, 3.478973], [-1.255402, 3.7238569999999998]]]}, {"angle": [90.0], "type": "polygon", "pos": [104.902, 61.214], "polygons": [[[0.079944, 3.9243599999999996], [0.194343, 3.9668419999999998], [0.195652, 3.9676579999999997], [0.266403, 4.01973], [0.318636, 4.080584], [0.355371, 4.1598869999999994], [0.37963399999999997, 4.267309], [0.394445, 4.412516999999999], [0.402829, 4.605179], [0.403564, 4.6326279999999995], [0.41412, 5.046520999999999], [0.325291, 5.092455999999999], [0.261018, 5.123498], [0.22221, 5.138205999999999], [0.220415, 5.1383909999999995], [0.2137, 5.11125], [0.208365, 5.038041], [0.205083, 4.931081], [0.204368, 4.844469], [0.20435099999999998, 4.704162], [0.197937, 4.616051], [0.17557999999999999, 4.574025], [0.12773199999999998, 4.571975], [0.044849, 4.60379], [-0.080287, 4.662272], [-0.17230299999999998, 4.710845], [-0.219629, 4.752986], [-0.233542, 4.798916], [-0.233563, 4.801189], [-0.210605, 4.880311], [-0.14263, 4.923055], [-0.038602, 4.929246], [0.03633, 4.928172], [0.07583899999999999, 4.949752999999999], [0.100478, 5.0015909999999995], [0.114659, 5.067632], [0.094223, 5.105104], [0.086528, 5.110467], [0.014083, 5.132006], [-0.087367, 5.1350549999999995], [-0.19184299999999999, 5.120778], [-0.265875, 5.094688], [-0.368228, 5.007785], [-0.426409, 4.886816], [-0.43793099999999996, 4.792307999999999], [-0.42913799999999996, 4.707062], [-0.39732, 4.6374759999999995], [-0.334316, 4.575672], [-0.23196899999999998, 4.5137719999999995], [-0.082118, 4.443897], [-0.072988, 4.439948], [0.061997, 4.377587999999999], [0.145294, 4.326446], [0.180997, 4.280488], [0.173203, 4.233683], [0.126007, 4.179997999999999], [0.111894, 4.167644], [0.017359, 4.119740999999999], [-0.080594, 4.121758], [-0.165903, 4.168724], [-0.22250399999999998, 4.255669], [-0.227763, 4.272734], [-0.278977, 4.355504], [-0.34396299999999996, 4.395372], [-0.43793099999999996, 4.434882], [-0.43793099999999996, 4.3326579999999995], [-0.40934699999999996, 4.184072], [-0.324505, 4.047784], [-0.28035499999999997, 4.002191], [-0.179995, 3.9436739999999997], [-0.052364999999999995, 3.9171839999999998], [0.079944, 3.9243599999999996]]]}, {"angle": [90.0], "type": "polygon", "pos": [104.902, 61.214], "polygons": [[[1.0659429999999999, 3.9219199999999996], [1.1985649999999999, 3.970859], [1.30601, 4.057418999999999], [1.348032, 4.118352], [1.393843, 4.230161], [1.3928909999999999, 4.311006], [1.344808, 4.365378], [1.327017, 4.374624], [1.2502039999999999, 4.403449999999999], [1.210976, 4.396065], [1.197689, 4.347658], [1.197012, 4.32092], [1.172686, 4.222548], [1.109281, 4.153734], [1.021154, 4.1204979999999995], [0.922663, 4.128861], [0.842602, 4.172296], [0.815561, 4.1970719999999995], [0.7963939999999999, 4.227129], [0.783446, 4.272565], [0.775064, 4.343476], [0.769593, 4.44996], [0.765378, 4.602112], [0.7642869999999999, 4.650287], [0.760307, 4.8150949999999995], [0.7557809999999999, 4.931088], [0.748995, 5.007833], [0.738231, 5.054893], [0.721773, 5.081835], [0.6979059999999999, 5.098223], [0.682626, 5.105462999999999], [0.617733, 5.13022], [0.579534, 5.1383909999999995], [0.566912, 5.111103], [0.5592079999999999, 5.0286029999999995], [0.55638, 4.889940999999999], [0.5583859999999999, 4.6941619999999995], [0.5590109999999999, 4.663965], [0.563421, 4.485348999999999], [0.568635, 4.354922999999999], [0.576055, 4.262492], [0.587082, 4.197858], [0.603117, 4.150825], [0.6255609999999999, 4.111196], [0.6373019999999999, 4.094215], [0.704619, 4.01908], [0.77991, 3.960638], [0.7891279999999999, 3.955536], [0.924133, 3.91526], [1.0659429999999999, 3.9219199999999996]]]}, {"angle": [90.0], "type": "polygon", "pos": [104.902, 61.214], "polygons": [[[2.393914, 4.154455], [2.3935429999999998, 4.372661], [2.392108, 4.540519], [2.389002, 4.6660699999999995], [2.383622, 4.757355], [2.375362, 4.8224149999999995], [2.363616, 4.869291], [2.347781, 4.9060239999999995], [2.33579, 4.926991], [2.23649, 5.040693999999999], [2.110588, 5.111965], [1.971291, 5.137538], [1.831805, 5.1141499999999995], [1.748743, 5.072119], [1.6615449999999998, 4.999410999999999], [1.602117, 4.9106119999999995], [1.566261, 4.79432], [1.5497809999999999, 4.639135], [1.547447, 4.525287], [1.547761, 4.517106], [1.7517239999999998, 4.517106], [1.75297, 4.647657], [1.758678, 4.73408], [1.771804, 4.790617999999999], [1.7953059999999998, 4.831513999999999], [1.823386, 4.862362], [1.9176879999999998, 4.921905], [2.0189399999999997, 4.926991999999999], [2.114636, 4.877279], [2.122084, 4.870543], [2.153874, 4.835502], [2.1738079999999997, 4.793811], [2.1846, 4.731762], [2.188965, 4.635644], [2.1896549999999997, 4.529379], [2.1881589999999997, 4.39588], [2.181964, 4.3068219999999995], [2.168514, 4.248292999999999], [2.145251, 4.206382], [2.126175, 4.184123], [2.037563, 4.127985], [1.935508, 4.1212349999999995], [1.8380949999999998, 4.164114], [1.819296, 4.180032], [1.787293, 4.215382], [1.767318, 4.257502], [1.7565929999999998, 4.320251], [1.7523389999999999, 4.4174869999999995], [1.7517239999999998, 4.517106], [1.547761, 4.517106], [1.5545039999999999, 4.341947], [1.5784719999999999, 4.2041949999999995], [1.623548, 4.100632], [1.6939279999999999, 4.019856], [1.748743, 3.978455], [1.848376, 3.933728], [1.963855, 3.9129669999999996], [2.071199, 3.918525], [2.131264, 3.940943], [2.154835, 3.947323], [2.170477, 3.9235349999999998], [2.1813949999999998, 3.859788], [2.1896549999999997, 3.7626869999999997], [2.198699, 3.654541], [2.211261, 3.5894749999999997], [2.2341189999999997, 3.5522679999999998], [2.274051, 3.5276989999999997], [2.2991379999999997, 3.516819], [2.394023, 3.4770719999999997], [2.393914, 4.154455]]]}, {"angle": [90.0], "type": "polygon", "pos": [104.902, 61.214], "polygons": [[[3.5801239999999996, 3.93984], [3.5845789999999997, 4.016653], [3.588071, 4.133391], [3.590315, 4.2808209999999995], [3.5910349999999998, 4.435455], [3.5910349999999998, 4.958727], [3.498645, 5.051117], [3.4349779999999996, 5.108047], [3.379089, 5.131107], [3.302702, 5.129646999999999], [3.27238, 5.125934], [3.17761, 5.115126], [3.0992219999999997, 5.1089329999999995], [3.0801149999999997, 5.1083609999999995], [3.0156989999999997, 5.112102], [2.923571, 5.121493999999999], [2.88785, 5.125934], [2.8001139999999998, 5.132801], [2.7411529999999997, 5.117884999999999], [2.68269, 5.071835], [2.661585, 5.051117], [2.5691949999999997, 4.958727], [2.5691949999999997, 3.9799469999999997], [2.643558, 3.9460659999999996], [2.7075899999999997, 3.9209699999999996], [2.745052, 3.912184], [2.754657, 3.9399499999999996], [2.763635, 4.01753], [2.7713859999999997, 4.136348], [2.777314, 4.287828], [2.780173, 4.415805], [2.7881609999999997, 4.9194249999999995], [2.8578479999999997, 4.929278], [2.921229, 4.922389], [2.952286, 4.9000829999999995], [2.9609669999999997, 4.858378999999999], [2.968378, 4.769544], [2.973931, 4.6448339999999995], [2.977036, 4.495507], [2.977484, 4.418661], [2.977931, 3.9762869999999997], [3.069874, 3.944235], [3.1349489999999998, 3.922443], [3.170347, 3.9122809999999997], [3.1713679999999997, 3.912184], [3.1749199999999997, 3.939809], [3.178823, 4.016411], [3.1827509999999997, 4.132579], [3.1863759999999997, 4.278904], [3.188908, 4.415805], [3.196897, 4.9194249999999995], [3.3720689999999998, 4.9194249999999995], [3.3801069999999998, 4.4599649999999995], [3.388146, 4.0005049999999995], [3.473543, 3.9563439999999996], [3.536593, 3.9260189999999997], [3.5739099999999997, 3.912258], [3.5749869999999997, 3.912184], [3.5801239999999996, 3.93984]]]}, {"angle": [90.0], "type": "polygon", "pos": [104.902, 61.214], "polygons": [[[4.314406, 3.9351559999999997], [4.3984689999999995, 3.9733929999999997], [4.464449999999999, 4.0197259999999995], [4.5127939999999995, 4.0715319999999995], [4.546171999999999, 4.138363], [4.567253, 4.229769], [4.578707, 4.355301], [4.583203, 4.524508], [4.583678, 4.635933], [4.583678, 5.070627], [4.509316, 5.104509], [4.450746, 5.129271999999999], [4.42173, 5.1383909999999995], [4.416179, 5.111257], [4.411775, 5.038094], [4.409078, 4.9312629999999995], [4.408506, 4.846437], [4.406046, 4.7238869999999995], [4.399412, 4.626668], [4.389726, 4.567133999999999], [4.382032, 4.554482999999999], [4.330311, 4.5674019999999995], [4.249117, 4.6005389999999995], [4.155101999999999, 4.645461], [4.0649169999999994, 4.693735], [3.995215, 4.736928], [3.9626479999999997, 4.766608], [3.962519, 4.766929], [3.9653199999999997, 4.821857], [3.990439, 4.874292], [4.034541, 4.916881], [4.098909, 4.931126], [4.1539209999999995, 4.929466], [4.231835, 4.9282449999999995], [4.2727319999999995, 4.946498], [4.297295, 4.994726], [4.3003919999999995, 5.00382], [4.31104, 5.072598], [4.282565, 5.11436], [4.208343999999999, 5.134263], [4.128168, 5.137944], [3.9838899999999997, 5.110658], [3.9092029999999998, 5.071689999999999], [3.816963, 4.980148], [3.768043, 4.867782], [3.763654, 4.749051], [3.805001, 4.638411], [3.867197, 4.56908], [3.9292939999999996, 4.530265], [4.026895, 4.481125], [4.140632, 4.431292], [4.15959, 4.423677], [4.284521, 4.368545], [4.356539, 4.319954], [4.3797, 4.271647], [4.358064, 4.21737], [4.32092, 4.174943], [4.233127, 4.122701999999999], [4.13653, 4.118784], [4.047944, 4.159041], [3.984186, 4.239326], [3.9758169999999997, 4.26004], [3.9270959999999997, 4.336225], [3.855965, 4.392785], [3.7662069999999996, 4.439201], [3.7662069999999996, 4.307583999999999], [3.77149, 4.227168], [3.794142, 4.163786], [3.8443669999999996, 4.096163], [3.892582, 4.044076], [3.967554, 3.970322], [4.025806, 3.9307019999999997], [4.088372, 3.9148099999999997], [4.159193, 3.912184], [4.314406, 3.9351559999999997]]]}, {"angle": [90.0], "type": "polygon", "pos": [104.902, 61.214], "polygons": [[[5.33569, 3.940018], [5.370585, 3.955269], [5.453876999999999, 4.021235], [5.525103, 4.116618], [5.569153, 4.218406], [5.576321999999999, 4.268587], [5.5522849999999995, 4.338647], [5.499561, 4.375717], [5.4430309999999995, 4.3981639999999995], [5.417146, 4.402299999999999], [5.404542, 4.3722829999999995], [5.3796539999999995, 4.306960999999999], [5.368735, 4.277445], [5.3075079999999994, 4.175348], [5.2188609999999995, 4.124423], [5.105193, 4.125989], [5.096774, 4.127994], [5.0360879999999995, 4.156766999999999], [4.991474, 4.212859], [4.961002, 4.303163], [4.942743999999999, 4.434571], [4.934771, 4.613974], [4.934023, 4.709433], [4.9336519999999995, 4.859913], [4.931223, 4.962495], [4.92476, 5.027672], [4.912288, 5.065938], [4.891833, 5.087784999999999], [4.861419, 5.103707], [4.859661, 5.104509], [4.8010909999999996, 5.129271999999999], [4.772075, 5.1383909999999995], [4.767615999999999, 5.110822], [4.763799, 5.034619999999999], [4.760899, 4.919541], [4.7591909999999995, 4.775341], [4.758851, 4.669814], [4.760587999999999, 4.465612999999999], [4.767382, 4.310697], [4.781607, 4.1960239999999995], [4.805638, 4.112551], [4.841848, 4.051235999999999], [4.892612, 4.0030339999999995], [4.9427389999999995, 3.9693929999999997], [5.063275, 3.924619], [5.203557, 3.9145209999999997], [5.33569, 3.940018]]]}, {"angle": [90.0], "type": "polygon", "pos": [104.902, 61.214], "polygons": [[[6.343439, 3.95654], [6.45895, 4.0320339999999995], [6.514664, 4.099616999999999], [6.558803999999999, 4.222255], [6.562309, 4.319298], [6.554367999999999, 4.449056], [6.255115, 4.580039], [6.109611, 4.646958], [6.014537, 4.70079], [5.965101, 4.747415999999999], [5.956511, 4.79272], [5.983972, 4.842582], [6.014253, 4.8756319999999995], [6.1023629999999995, 4.928633], [6.198195999999999, 4.932347], [6.286212, 4.8910409999999995], [6.350868999999999, 4.808983], [6.362432999999999, 4.780008], [6.417825, 4.689509], [6.481553, 4.650939999999999], [6.568966, 4.617946], [6.568966, 4.743034], [6.5612379999999995, 4.828156], [6.530965999999999, 4.899938], [6.467518, 4.982355999999999], [6.458088, 4.993066], [6.387512999999999, 5.066390999999999], [6.326847, 5.105741999999999], [6.25095, 5.123845], [6.1880299999999995, 5.129773999999999], [6.075487, 5.131251], [5.995369999999999, 5.112534999999999], [5.94539, 5.084747], [5.8668379999999996, 5.023641], [5.812463, 4.957554], [5.778052, 4.874441], [5.7593879999999995, 4.7622539999999995], [5.752256, 4.6089459999999995], [5.7516869999999995, 4.531136], [5.753622, 4.437853], [5.929899, 4.437853], [5.931944, 4.487896], [5.9370389999999995, 4.496092], [5.970666, 4.484958], [6.04303, 4.455493], [6.139747, 4.413601], [6.159973, 4.404597], [6.282203, 4.342442], [6.349546999999999, 4.287815], [6.364348, 4.236649], [6.328946999999999, 4.184876], [6.299710999999999, 4.162], [6.194216, 4.11625], [6.095476, 4.1238079999999995], [6.012811999999999, 4.179651], [5.955547999999999, 4.278753], [5.937188, 4.3574139999999995], [5.929899, 4.437853], [5.753622, 4.437853], [5.755459, 4.3493509999999995], [5.769359, 4.214853], [5.796894, 4.116916], [5.841571999999999, 4.044811], [5.9069009999999995, 3.9878129999999996], [5.935383, 3.9693929999999997], [6.064763, 3.9214219999999997], [6.206411999999999, 3.9184029999999996], [6.343439, 3.95654]]]}, {"angle": [90.0], "type": "polygon", "pos": [104.902, 61.214], "polygons": [[[0.20901399999999998, -5.547002], [0.367006, -5.546137], [0.48134699999999997, -5.543794999999999], [0.559407, -5.539238], [0.6085539999999999, -5.53173], [0.6361589999999999, -5.520534], [0.649592, -5.504912], [0.6562209999999999, -5.484127], [0.6568649999999999, -5.481437], [0.666935, -5.432887], [0.6855749999999999, -5.337095], [0.710845, -5.204257], [0.740807, -5.044569], [0.7735219999999999, -4.868226], [0.774664, -4.862032999999999], [0.807433, -4.689217999999999], [0.838093, -4.536531], [0.864664, -4.413129], [0.8851669999999999, -4.328169], [0.8976259999999999, -4.29081], [0.8982199999999999, -4.290147999999999], [0.934919, -4.271904999999999], [1.010586, -4.241503], [1.108878, -4.205507], [1.1094249999999999, -4.205315], [1.233233, -4.158778], [1.3791959999999999, -4.099496], [1.516781, -4.039891], [1.523293, -4.036944], [1.74739, -3.935235], [2.243619, -4.274103], [2.3958459999999997, -4.377408], [2.533741, -4.4697629999999995], [2.649315, -4.545916], [2.734579, -4.6006149999999995], [2.781544, -4.628607], [2.7860039999999997, -4.630682999999999], [2.820134, -4.62144], [2.8838809999999997, -4.5768439999999995], [2.9797309999999997, -4.494791], [3.110169, -4.3731789999999995], [3.243328, -4.2437949999999995], [3.3716939999999997, -4.116298], [3.4865809999999997, -3.999954], [3.581073, -3.901948], [3.648253, -3.8294639999999998], [3.681206, -3.789687], [3.682432, -3.787639], [3.6860739999999996, -3.760344], [3.67235, -3.715766], [3.637869, -3.647888], [3.579239, -3.5506889999999998], [3.49307, -3.4181489999999997], [3.3781999999999996, -3.247524], [3.2762539999999998, -3.097345], [3.185123, -2.96265], [3.110073, -2.85126], [3.0563689999999997, -2.7709949999999997], [3.02928, -2.729675], [3.027574, -2.72687], [3.030882, -2.6872789999999998], [3.0559529999999997, -2.610331], [3.097798, -2.5105679999999997], [3.1127119999999997, -2.478709], [3.1777859999999998, -2.3367739999999997], [3.2472119999999998, -2.1757269999999997], [3.303609, -2.0363789999999997], [3.3442469999999997, -1.932956], [3.3765259999999997, -1.854358], [3.395178, -1.81328], [3.397497, -1.810115], [3.431803, -1.8048719999999998], [3.512669, -1.790506], [3.629343, -1.7690629999999998], [3.7710749999999997, -1.7425869999999999], [3.92711, -1.713123], [4.086698, -1.682717], [4.239085, -1.6534119999999999], [4.373521, -1.627255], [4.479252, -1.60629], [4.545526, -1.592561], [4.561782, -1.5886799999999999], [4.578573, -1.5791], [4.5912489999999995, -1.557464], [4.600378, -1.5164689999999998], [4.6065309999999995, -1.4488109999999998], [4.6102799999999995, -1.3471879999999998], [4.612191999999999, -1.204297], [4.612839999999999, -1.012835], [4.612874, -0.9343549999999999], [4.612874, -0.29609399999999997], [4.459598, -0.26583999999999997], [4.374321999999999, -0.249436], [4.24707, -0.225491], [4.093315, -0.19689299999999998], [3.928534, -0.166533], [3.882989, -0.158194], [3.7309319999999997, -0.12863], [3.598468, -0.099558], [3.496714, -0.073671], [3.436788, -0.053662999999999995], [3.426805, -0.047699], [3.402293, -0.0054659999999999995], [3.367148, 0.07637], [3.328173, 0.18168299999999998], [3.320442, 0.204368], [3.26936, 0.345018], [3.2059539999999997, 0.503714], [3.143904, 0.6462249999999999], [3.143598, 0.646886], [3.040267, 0.87044], [3.7199609999999996, 1.870232], [3.2836209999999997, 2.3072999999999997], [3.151649, 2.437381], [3.031279, 2.552048], [2.929273, 2.645181], [2.852391, 2.710658], [2.807393, 2.7423569999999997], [2.800938, 2.7443679999999997], [2.7630399999999997, 2.728529], [2.685708, 2.6844959999999998], [2.5773889999999997, 2.61749], [2.446532, 2.532734], [2.305052, 2.4378159999999998], [2.161461, 2.340998], [2.033435, 2.256751], [1.9291049999999998, 2.190258], [1.8565999999999998, 2.146702], [1.824158, 2.131264], [1.784576, 2.144328], [1.709519, 2.17875], [1.614468, 2.2273799999999997], [1.6043919999999998, 2.232785], [1.476391, 2.29698], [1.388618, 2.3284629999999997], [1.334028, 2.328798], [1.305575, 2.2995479999999997], [1.30541, 2.2991379999999997], [1.291188, 2.2644979999999997], [1.257269, 2.182269], [1.206284, 2.058814], [1.140862, 1.900498], [1.063634, 1.7136859999999998], [0.9772289999999999, 1.504742], [0.893551, 1.302446], [0.801588, 1.0792], [0.71715, 0.872392], [0.6427689999999999, 0.6883619999999999], [0.580974, 0.533451], [0.534297, 0.413996], [0.5052679999999999, 0.336339], [0.496322, 0.30735599999999996], [0.518756, 0.27410999999999996], [0.5774389999999999, 0.221123], [0.655689, 0.162704], [0.8785339999999999, -0.022047999999999998], [1.052718, -0.233818], [1.176154, -0.468144], [1.246754, -0.7205659999999999], [1.2624309999999999, -0.9866229999999999], [1.251036, -1.1094249999999999], [1.18895, -1.364207], [1.082023, -1.589199], [0.936889, -1.7821829999999999], [0.760178, -1.940939], [0.558522, -2.06325], [0.33855399999999997, -2.1468949999999998], [0.106906, -2.189656], [-0.129791, -2.189313], [-0.364905, -2.1436479999999998], [-0.591804, -2.0504409999999997], [-0.803856, -1.907473], [-0.8923639999999999, -1.826617], [-1.062111, -1.618993], [-1.180301, -1.392105], [-1.247722, -1.152567], [-1.2651599999999998, -0.9069929999999999], [-1.2334019999999999, -0.661997], [-1.153235, -0.42419199999999996], [-1.025445, -0.20019299999999998], [-0.8508199999999999, 0.003387], [-0.6556879999999999, 0.162704], [-0.574409, 0.223602], [-0.516991, 0.276015], [-0.496322, 0.307406], [-0.5071439999999999, 0.34163899999999997], [-0.5379229999999999, 0.423419], [-0.5861259999999999, 0.546407], [-0.649222, 0.704263], [-0.7246779999999999, 0.8906489999999999], [-0.809962, 1.099226], [-0.8937809999999999, 1.3024959999999999], [-0.986255, 1.525933], [-1.071911, 1.7329839999999999], [-1.148118, 1.9172859999999998], [-1.2122469999999999, 2.072475], [-1.261668, 2.192188], [-1.293752, 2.270061], [-1.305641, 2.2991379999999997], [-1.333726, 2.328677], [-1.388051, 2.328591], [-1.4756049999999998, 2.297326], [-1.603381, 2.233329], [-1.6043919999999998, 2.232785], [-1.7005979999999998, 2.183121], [-1.7783689999999999, 2.146945], [-1.822223, 2.131408], [-1.824158, 2.131264], [-1.857171, 2.147024], [-1.930054, 2.1908499999999997], [-2.034678, 2.257557], [-2.16291, 2.341964], [-2.305052, 2.4378159999999998], [-2.449767, 2.5348669999999998], [-2.580196, 2.6192699999999998], [-2.68789, 2.6858009999999997], [-2.764402, 2.729238], [-2.800938, 2.7443679999999997], [-2.8345819999999997, 2.724482], [-2.902224, 2.668903], [-2.9971069999999997, 2.583754], [-3.11247, 2.4751529999999997], [-3.241555, 2.349221], [-3.2837709999999998, 2.307149], [-3.720261, 1.869931], [-3.388023, 1.38234], [-3.287054, 1.232605], [-3.198438, 1.09822], [-3.1271459999999998, 0.986969], [-3.07815, 0.906639], [-3.056422, 0.865014], [-3.0557849999999998, 0.862053], [-3.06724, 0.8228179999999999], [-3.098051, 0.743895], [-3.142884, 0.638509], [-3.174353, 0.567954], [-3.233192, 0.432876], [-3.288604, 0.296409], [-3.3315639999999997, 0.181103], [-3.343234, 0.145977], [-3.3763889999999996, 0.052174], [-3.4087989999999997, -0.020305999999999998], [-3.426601, -0.047699], [-3.465886, -0.064464], [-3.5516259999999997, -0.08823], [-3.672697, -0.11630299999999999], [-3.817973, -0.14599099999999998], [-3.8829879999999997, -0.158194], [-4.048087, -0.188532], [-4.206448, -0.217907], [-4.3425959999999995, -0.24343099999999998], [-4.441057, -0.262215], [-4.459598, -0.26583999999999997], [-4.612873, -0.29609399999999997], [-4.612873, -0.9343549999999999], [-4.612528999999999, -1.1442299999999999], [-4.611116, -1.3030199999999998], [-4.608064, -1.418027], [-4.602803, -1.496554], [-4.5947629999999995, -1.545904], [-4.583373, -1.573381], [-4.5680629999999995, -1.586287], [-4.561782, -1.5886799999999999], [-4.523896, -1.597167], [-4.440195, -1.6140999999999999], [-4.321433, -1.6374339999999998], [-4.178361, -1.665125], [-4.021732, -1.6951269999999998], [-3.862297, -1.725396], [-3.710809, -1.753885], [-3.578019, -1.778551], [-3.474681, -1.7973489999999999], [-3.411545, -1.808233], [-3.397497, -1.810115], [-3.38477, -1.8352959999999998], [-3.3566, -1.902378], [-3.3182519999999998, -1.998667], [-3.303609, -2.0363789999999997], [-3.244548, -2.182079], [-3.175, -2.3430489999999997], [-3.1127119999999997, -2.478709], [-3.0668789999999997, -2.582439], [-3.036387, -2.667674], [-3.026208, -2.719874], [-3.027831, -2.72687], [-3.049343, -2.7598979999999997], [-3.098465, -2.833357], [-3.169923, -2.9394229999999997], [-3.258445, -3.070274], [-3.358759, -3.218088], [-3.3785939999999997, -3.2472659999999998], [-3.4949879999999998, -3.420137], [-3.580548, -3.551774], [-3.638684, -3.648239], [-3.672808, -3.715592], [-3.686331, -3.7598939999999996], [-3.682664, -3.787206], [-3.6825699999999997, -3.7873799999999997], [-3.653707, -3.823254], [-3.589867, -3.8926089999999998], [-3.497969, -3.9882549999999997], [-3.3849329999999997, -4.103001], [-3.257679, -4.229659], [-3.243328, -4.2437949999999995], [-3.082957, -4.399096999999999], [-2.959195, -4.513129999999999], [-2.869555, -4.587998], [-2.811552, -4.625804], [-2.7860039999999997, -4.630682999999999], [-2.7487179999999998, -4.6093969999999995], [-2.671343, -4.560226999999999], [-2.561867, -4.488424999999999], [-2.42828, -4.399245], [-2.2785699999999998, -4.297937], [-2.243618, -4.274103], [-1.74739, -3.935235], [-1.523293, -4.036944], [-1.387011, -4.096217], [-1.240724, -4.15583], [-1.114965, -4.20336], [-1.1094249999999999, -4.205315], [-1.0110569999999999, -4.2413229999999995], [-0.935229, -4.271771], [-0.8982819999999999, -4.290095], [-0.8982199999999999, -4.290147999999999], [-0.886496, -4.323271], [-0.866568, -4.404733], [-0.840413, -4.5253749999999995], [-0.81001, -4.676041], [-0.777337, -4.8475719999999995], [-0.774664, -4.862032999999999], [-0.7418899999999999, -5.038765], [-0.7118019999999999, -5.19919], [-0.6863389999999999, -5.333112], [-0.667441, -5.430337], [-0.6570469999999999, -5.480668], [-0.6568649999999999, -5.481437], [-0.650539, -5.502847], [-0.638239, -5.519012], [-0.612594, -5.530669], [-0.5662349999999999, -5.538555], [-0.49179199999999995, -5.543406999999999], [-0.381895, -5.545961], [-0.229175, -5.546955], [-0.026261999999999997, -5.547126], [0.0, -5.547126], [0.20901399999999998, -5.547002]]]}]}, "edges_bbox": {"minx": 93.96799899999999, "miny": 51.321999, "maxx": 144.06800099999998, "maxy": 141.422001}, "metadata": {"date": "2019-01-21 12:55:00", "company": "", "revision": "", "title": "switches"}}
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+/* Utility functions */
+
+var storagePrefix = 'KiCad_HTML_BOM__' + pcbdata.metadata.title + '__' +
+ pcbdata.metadata.revision + '__';
+var storage;
+
+function initStorage(key) {
+ try {
+ window.localStorage.getItem("blank");
+ storage = window.localStorage;
+ } catch (e) {
+ // localStorage not available
+ }
+ if (!storage) {
+ try {
+ window.sessionStorage.getItem("blank");
+ storage = window.sessionStorage;
+ } catch (e) {
+ // sessionStorage also not available
+ }
+ }
+}
+
+function readStorage(key) {
+ if (storage) {
+ return storage.getItem(storagePrefix + '#' + key);
+ } else {
+ return null;
+ }
+}
+
+function writeStorage(key, value) {
+ if (storage) {
+ storage.setItem(storagePrefix + '#' + key, value);
+ }
+}
+
+function fancyDblClickHandler(el, onsingle, ondouble) {
+ return function() {
+ if (el.getAttribute("data-dblclick") == null) {
+ el.setAttribute("data-dblclick", 1);
+ setTimeout(function() {
+ if (el.getAttribute("data-dblclick") == 1) {
+ onsingle();
+ }
+ el.removeAttribute("data-dblclick");
+ }, 200);
+ } else {
+ el.removeAttribute("data-dblclick");
+ ondouble();
+ }
+ }
+}
+
+function smoothScrollToRow(rowid) {
+ document.getElementById(rowid).scrollIntoView({
+ behavior: "smooth",
+ block: "center",
+ inline: "nearest"
+ });
+}
+
+function focusInputField(input) {
+ input.scrollIntoView(false);
+ input.focus();
+ input.select();
+}
+
+function copyToClipboard() {
+ var text = '';
+ for (var node of bomhead.childNodes[0].childNodes) {
+ if (node.firstChild) {
+ text = text + node.firstChild.nodeValue;
+ }
+ if (node != bomhead.childNodes[0].lastChild) {
+ text += '\t';
+ }
+ }
+ text += '\n';
+ for (var row of bombody.childNodes) {
+ for (var cell of row.childNodes) {
+ for (var node of cell.childNodes) {
+ if (node.nodeName == "INPUT") {
+ if (node.checked) {
+ text = text + '✓';
+ }
+ } else if (node.nodeName == "MARK") {
+ text = text + node.firstChild.nodeValue;
+ } else {
+ text = text + node.nodeValue;
+ }
+ }
+ if (cell != row.lastChild) {
+ text += '\t';
+ }
+ }
+ text += '\n';
+ }
+ var textArea = document.createElement("textarea");
+ textArea.classList.add('clipboard-temp');
+ textArea.value = text;
+
+ document.body.appendChild(textArea);
+ textArea.focus();
+ textArea.select();
+
+ try {
+ if (document.execCommand('copy')) {
+ console.log('Bom copied to clipboard.');
+ }
+ } catch (err) {
+ console.log('Can not copy to clipboard.');
+ }
+
+ document.body.removeChild(textArea);
+}
+
+function removeGutterNode(node) {
+ for (var i = 0; i < node.childNodes.length; i++) {
+ if (node.childNodes[i].classList &&
+ node.childNodes[i].classList.contains("gutter")) {
+ node.removeChild(node.childNodes[i]);
+ break;
+ }
+ }
+}
+
+function cleanGutters() {
+ removeGutterNode(document.getElementById("bot"));
+ removeGutterNode(document.getElementById("canvasdiv"));
+}
+
+var units = {
+ prefixes: {
+ giga: ["G", "g", "giga", "Giga", "GIGA"],
+ mega: ["M", "mega", "Mega", "MEGA"],
+ kilo: ["K", "k", "kilo", "Kilo", "KILO"],
+ milli: ["m", "milli", "Milli", "MILLI"],
+ micro: ["U", "u", "micro", "Micro", "MICRO", "μ", "µ"], // different utf8 μ
+ nano: ["N", "n", "nano", "Nano", "NANO"],
+ pico: ["P", "p", "pico", "Pico", "PICO"],
+ },
+ unitsShort: ["R", "r", "Ω", "F", "f", "H", "h"],
+ unitsLong: [
+ "OHM", "Ohm", "ohm", "ohms",
+ "FARAD", "Farad", "farad",
+ "HENRY", "Henry", "henry"
+ ],
+ getMultiplier: function(s) {
+ if (this.prefixes.giga.includes(s)) return 1e9;
+ if (this.prefixes.mega.includes(s)) return 1e6;
+ if (this.prefixes.kilo.includes(s)) return 1e3;
+ if (this.prefixes.milli.includes(s)) return 1e-3;
+ if (this.prefixes.micro.includes(s)) return 1e-6;
+ if (this.prefixes.nano.includes(s)) return 1e-9;
+ if (this.prefixes.pico.includes(s)) return 1e-12;
+ return 1;
+ },
+ valueRegex: null,
+}
+
+function initUtils() {
+ var allPrefixes = units.prefixes.giga
+ .concat(units.prefixes.mega)
+ .concat(units.prefixes.kilo)
+ .concat(units.prefixes.milli)
+ .concat(units.prefixes.micro)
+ .concat(units.prefixes.nano)
+ .concat(units.prefixes.pico);
+ var allUnits = units.unitsShort.concat(units.unitsLong);
+ units.valueRegex = new RegExp("^([0-9\.]+)" +
+ "\\s*(" + allPrefixes.join("|") + ")?" +
+ "(" + allUnits.join("|") + ")?" +
+ "(\\b.*)?$", "");
+ units.valueAltRegex = new RegExp("^([0-9]*)" +
+ "(" + units.unitsShort.join("|") + ")?" +
+ "([GgMmKkUuNnPp])?" +
+ "([0-9]*)" +
+ "(\\b.*)?$", "");
+ for (var bomtable of Object.values(pcbdata.bom)) {
+ for (var row of bomtable) {
+ row.push(parseValue(row[1], row[3][0][0]));
+ }
+ }
+}
+
+function parseValue(val, ref) {
+ var inferUnit = (unit, ref) => {
+ if (unit) {
+ unit = unit.toLowerCase();
+ if (unit == 'Ω' || unit == "ohm" || unit == "ohms") {
+ unit = 'r';
+ }
+ unit = unit[0];
+ } else {
+ ref = /^([a-z]+)\d+$/i.exec(ref);
+ if (ref) {
+ ref = ref[1].toLowerCase();
+ if (ref == "c") unit = 'f';
+ else if (ref == "l") unit = 'h';
+ else if (ref == "r" || ref == "rv") unit = 'r';
+ else unit = null;
+ }
+ }
+ return unit;
+ };
+ val = val.replace(/,/g, "");
+ var match = units.valueRegex.exec(val);
+ var unit;
+ if (match) {
+ val = parseFloat(match[1]);
+ if (match[2]) {
+ val = val * units.getMultiplier(match[2]);
+ }
+ unit = inferUnit(match[3], ref);
+ if (!unit) return null;
+ else return {
+ val: val,
+ unit: unit,
+ extra: match[4],
+ }
+ }
+ match = units.valueAltRegex.exec(val);
+ if (match && (match[1] || match[4])) {
+ val = parseFloat(match[1] + "." + match[4]);
+ if (match[3]) {
+ val = val * units.getMultiplier(match[3]);
+ }
+ unit = inferUnit(match[2], ref);
+ if (!unit) return null;
+ else return {
+ val: val,
+ unit: unit,
+ extra: match[5],
+ }
+ }
+ return null;
+}
+
+function valueCompare(a, b, stra, strb) {
+ if (a === null && b === null) {
+ // Failed to parse both values, compare them as strings.
+ if (stra != strb) return stra > strb ? 1 : -1;
+ else return 0;
+ } else if (a === null) {
+ return 1;
+ } else if (b === null) {
+ return -1;
+ } else {
+ if (a.unit != b.unit) return a.unit > b.unit ? 1 : -1;
+ else if (a.val != b.val) return a.val > b.val ? 1 : -1;
+ else if (a.extra != b.extra) return a.extra > b.extra ? 1 : -1;
+ else return 0;
+ }
+}
+
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+/* PCB rendering code */
+
+var redrawOnDrag = true;
+var boardRotation = 0;
+
+function deg2rad(deg) {
+ return deg * Math.PI / 180;
+}
+
+function calcFontPoint(linepoint, text, offsetx, offsety, tilt) {
+ var point = [
+ linepoint[0] * text.width + offsetx,
+ linepoint[1] * text.height + offsety
+ ];
+ // Adding half a line height here is technically a bug
+ // but pcbnew currently does the same, text is slightly shifted.
+ point[0] -= (point[1] + text.height * 0.5) * tilt;
+ return point;
+}
+
+function drawtext(ctx, text, color, flip) {
+ ctx.save();
+ ctx.translate(...text.pos);
+ var angle = -text.angle;
+ if (text.attr.includes("mirrored")) {
+ ctx.scale(-1, 1);
+ angle = -angle;
+ }
+ var tilt = 0;
+ if (text.attr.includes("italic")) {
+ tilt = 0.125;
+ }
+ var interline = (text.height * 1.5 + text.thickness) / 2;
+ var txt = text.text.split("\n");
+ // KiCad ignores last empty line.
+ if (txt[txt.length-1] == '') txt.pop();
+ ctx.rotate(deg2rad(angle));
+ ctx.fillStyle = color;
+ ctx.strokeStyle = color;
+ ctx.lineCap = "round";
+ ctx.lineWidth = text.thickness;
+ for (var i in txt) {
+ var offsety = (-(txt.length - 1) + i * 2) * interline + text.height / 2;
+ var lineWidth = 0;
+ for (var c of txt[i]) {
+ lineWidth += pcbdata.font_data[c].w * text.width;
+ }
+ var offsetx = 0;
+ switch (text.horiz_justify) {
+ case -1:
+ // Justify left, do nothing
+ break;
+ case 0:
+ // Justify center
+ offsetx -= lineWidth / 2;
+ break;
+ case 1:
+ // Justify right
+ offsetx -= lineWidth;
+ break;
+ }
+ for (var c of txt[i]) {
+ for (var line of pcbdata.font_data[c].l) {
+ // Drawing each segment separately instead of
+ // polyline because round line caps don't work in joints
+ for (var i = 0; i < line.length - 1; i++) {
+ ctx.beginPath();
+ ctx.moveTo(...calcFontPoint(line[i], text, offsetx, offsety, tilt));
+ ctx.lineTo(...calcFontPoint(line[i + 1], text, offsetx, offsety, tilt));
+ ctx.stroke();
+ }
+ }
+ offsetx += pcbdata.font_data[c].w * text.width;
+ }
+ }
+ ctx.restore();
+}
+
+function drawedge(ctx, scalefactor, edge, color) {
+ ctx.strokeStyle = color;
+ ctx.lineWidth = Math.max(1 / scalefactor, edge.width);
+ ctx.lineCap = "round";
+ if (edge.type == "segment") {
+ ctx.beginPath();
+ ctx.moveTo(...edge.start);
+ ctx.lineTo(...edge.end);
+ ctx.stroke();
+ }
+ if (edge.type == "arc") {
+ ctx.beginPath();
+ ctx.arc(
+ ...edge.start,
+ edge.radius,
+ deg2rad(edge.startangle),
+ deg2rad(edge.endangle));
+ ctx.stroke();
+ }
+ if (edge.type == "circle") {
+ ctx.beginPath();
+ ctx.arc(
+ ...edge.start,
+ edge.radius,
+ 0, 2 * Math.PI);
+ ctx.closePath();
+ ctx.stroke();
+ }
+}
+
+function drawRoundRect(ctx, color, size, radius, ctxmethod) {
+ ctx.beginPath();
+ ctx.strokeStyle = color;
+ var x = size[0] * -0.5;
+ var y = size[1] * -0.5;
+ var width = size[0];
+ var height = size[1];
+ ctx.moveTo(x, 0);
+ ctx.arcTo(x, y + height, x + width, y + height, radius);
+ ctx.arcTo(x + width, y + height, x + width, y, radius);
+ ctx.arcTo(x + width, y, x, y, radius);
+ ctx.arcTo(x, y, x, y + height, radius);
+ ctx.closePath();
+ ctxmethod();
+}
+
+function drawOblong(ctx, color, size, ctxmethod) {
+ drawRoundRect(ctx, color, size, Math.min(size[0], size[1]) / 2, ctxmethod);
+}
+
+function drawPolygons(ctx, color, polygons, ctxmethod) {
+ ctx.fillStyle = color;
+ for (var polygon of polygons) {
+ ctx.beginPath();
+ for (var vertex of polygon) {
+ ctx.lineTo(...vertex)
+ }
+ ctx.closePath();
+ ctxmethod();
+ }
+}
+
+function drawPolygonShape(ctx, shape, color) {
+ ctx.save();
+ ctx.translate(...shape.pos);
+ ctx.rotate(deg2rad(-shape.angle));
+ drawPolygons(ctx, color, shape.polygons, ctx.fill.bind(ctx));
+ ctx.restore();
+}
+
+function drawDrawing(ctx, layer, scalefactor, drawing, color) {
+ if (["segment", "arc", "circle"].includes(drawing.type)) {
+ drawedge(ctx, scalefactor, drawing, color);
+ } else if (drawing.type == "polygon") {
+ drawPolygonShape(ctx, drawing, color);
+ } else {
+ drawtext(ctx, drawing, color, layer == "B");
+ }
+}
+
+function drawCircle(ctx, radius, ctxmethod) {
+ ctx.beginPath();
+ ctx.arc(0, 0, radius, 0, 2 * Math.PI);
+ ctx.closePath();
+ ctxmethod();
+}
+
+function drawPad(ctx, pad, color, outline) {
+ ctx.save();
+ ctx.translate(...pad.pos);
+ ctx.rotate(deg2rad(pad.angle));
+ if (pad.offset) {
+ ctx.translate(...pad.offset);
+ }
+ ctx.fillStyle = color;
+ ctx.strokeStyle = color;
+ var ctxmethod = outline ? ctx.stroke.bind(ctx) : ctx.fill.bind(ctx);
+ if (pad.shape == "rect") {
+ var rect = [...pad.size.map(c => -c * 0.5), ...pad.size];
+ if (outline) {
+ ctx.strokeRect(...rect);
+ } else {
+ ctx.fillRect(...rect);
+ }
+ } else if (pad.shape == "oval") {
+ drawOblong(ctx, color, pad.size, ctxmethod);
+ } else if (pad.shape == "circle") {
+ drawCircle(ctx, pad.size[0] / 2, ctxmethod);
+ } else if (pad.shape == "roundrect") {
+ drawRoundRect(ctx, color, pad.size, pad.radius, ctxmethod);
+ } else if (pad.shape == "custom") {
+ drawPolygons(ctx, color, pad.polygons, ctxmethod);
+ }
+ if (pad.type == "th" && !outline) {
+ ctx.fillStyle = "#CCCCCC";
+ if (pad.drillshape == "oblong") {
+ drawOblong(ctx, "#CCCCCC", pad.drillsize, ctxmethod);
+ } else {
+ drawCircle(ctx, pad.drillsize[0] / 2, ctxmethod);
+ }
+ }
+ ctx.restore();
+}
+
+function drawModule(ctx, layer, scalefactor, module, padcolor, outlinecolor, highlight) {
+ if (highlight) {
+ // draw bounding box
+ if (module.layer == layer) {
+ ctx.save();
+ ctx.globalAlpha = 0.2;
+ ctx.translate(...module.bbox.pos);
+ ctx.fillStyle = padcolor;
+ ctx.fillRect(
+ 0, 0,
+ ...module.bbox.size);
+ ctx.globalAlpha = 1;
+ ctx.strokeStyle = padcolor;
+ ctx.strokeRect(
+ 0, 0,
+ ...module.bbox.size);
+ ctx.restore();
+ }
+ }
+ // draw drawings
+ for (var drawing of module.drawings) {
+ if (drawing.layer == layer) {
+ drawDrawing(ctx, layer, scalefactor, drawing.drawing, padcolor);
+ }
+ }
+ // draw pads
+ for (var pad of module.pads) {
+ if (pad.layers.includes(layer)) {
+ drawPad(ctx, pad, padcolor, false);
+ if (pad.pin1 && highlightpin1) {
+ drawPad(ctx, pad, outlinecolor, true);
+ }
+ }
+ }
+}
+
+function drawEdges(canvas, scalefactor) {
+ var ctx = canvas.getContext("2d");
+ var edgecolor = getComputedStyle(topmostdiv).getPropertyValue('--pcb-edge-color');
+ for (var edge of pcbdata.edges) {
+ drawedge(ctx, scalefactor, edge, edgecolor);
+ }
+}
+
+function drawModules(canvas, layer, scalefactor, highlight) {
+ var ctx = canvas.getContext("2d");
+ ctx.lineWidth = 3 / scalefactor;
+ var style = getComputedStyle(topmostdiv);
+ var padcolor = style.getPropertyValue('--pad-color');
+ var outlinecolor = style.getPropertyValue('--pin1-outline-color');
+ if (highlight > 0) {
+ padcolor = style.getPropertyValue('--pad-color-highlight');
+ outlinecolor = style.getPropertyValue('--pin1-outline-color-highlight');
+ }
+ for (var i = 0; i < pcbdata.modules.length; i++) {
+ var mod = pcbdata.modules[i];
+ if (!highlight || highlightedModules.includes(i)) {
+ drawModule(ctx, layer, scalefactor, mod, padcolor, outlinecolor, highlight);
+ }
+ }
+}
+
+function drawSilkscreen(canvas, layer, scalefactor) {
+ var ctx = canvas.getContext("2d");
+ for (var d of pcbdata.silkscreen[layer]) {
+ if (["segment", "arc", "circle"].includes(d.type)) {
+ drawedge(ctx, scalefactor, d, "#aa4");
+ } else if (d.type == "polygon") {
+ drawPolygonShape(ctx, d, "#4aa");
+ } else {
+ drawtext(ctx, d, "#4aa", layer == "B");
+ }
+ }
+}
+
+function clearCanvas(canvas) {
+ var ctx = canvas.getContext("2d");
+ ctx.save();
+ ctx.setTransform(1, 0, 0, 1, 0, 0);
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
+ ctx.restore();
+}
+
+function drawHighlightsOnLayer(canvasdict) {
+ clearCanvas(canvasdict.highlight);
+ drawModules(canvasdict.highlight, canvasdict.layer,
+ canvasdict.transform.s * canvasdict.transform.zoom, true);
+}
+
+function drawHighlights() {
+ drawHighlightsOnLayer(allcanvas.front);
+ drawHighlightsOnLayer(allcanvas.back);
+}
+
+function drawBackground(canvasdict) {
+ clearCanvas(canvasdict.bg);
+ clearCanvas(canvasdict.silk);
+ drawEdges(canvasdict.bg, canvasdict.transform.s);
+ drawModules(canvasdict.bg, canvasdict.layer,
+ canvasdict.transform.s * canvasdict.transform.zoom, false);
+ drawSilkscreen(canvasdict.silk, canvasdict.layer, canvasdict.transform.s);
+}
+
+function prepareCanvas(canvas, flip, transform) {
+ var ctx = canvas.getContext("2d");
+ ctx.setTransform(1, 0, 0, 1, 0, 0);
+ var fontsize = 1.55;
+ ctx.scale(transform.zoom, transform.zoom);
+ ctx.translate(transform.panx, transform.pany);
+ if (flip) {
+ ctx.scale(-1, 1);
+ }
+ ctx.translate(transform.x, transform.y);
+ ctx.rotate(deg2rad(boardRotation));
+ ctx.scale(transform.s, transform.s);
+}
+
+function prepareLayer(canvasdict) {
+ var flip = (canvasdict.layer == "B");
+ for (var c of ["bg", "silk", "highlight"]) {
+ prepareCanvas(canvasdict[c], flip, canvasdict.transform);
+ }
+}
+
+function rotateVector(v, angle) {
+ angle = deg2rad(angle);
+ return [
+ v[0] * Math.cos(angle) - v[1] * Math.sin(angle),
+ v[0] * Math.sin(angle) + v[1] * Math.cos(angle)
+ ];
+}
+
+function applyRotation(bbox) {
+ var corners = [
+ [bbox.minx, bbox.miny],
+ [bbox.minx, bbox.maxy],
+ [bbox.maxx, bbox.miny],
+ [bbox.maxx, bbox.maxy],
+ ];
+ corners = corners.map((v) => rotateVector(v, boardRotation));
+ return {
+ minx: corners.reduce((a, v) => Math.min(a, v[0]), Infinity),
+ miny: corners.reduce((a, v) => Math.min(a, v[1]), Infinity),
+ maxx: corners.reduce((a, v) => Math.max(a, v[0]), -Infinity),
+ maxy: corners.reduce((a, v) => Math.max(a, v[1]), -Infinity),
+ }
+}
+
+function recalcLayerScale(canvasdict) {
+ var canvasdivid = {
+ "F": "frontcanvas",
+ "B": "backcanvas"
+ } [canvasdict.layer];
+ var width = document.getElementById(canvasdivid).clientWidth * 2;
+ var height = document.getElementById(canvasdivid).clientHeight * 2;
+ var bbox = applyRotation(pcbdata.edges_bbox);
+ var scalefactor = 0.98 * Math.min(
+ width / (bbox.maxx - bbox.minx),
+ height / (bbox.maxy - bbox.miny)
+ );
+ if (scalefactor < 0.1) {
+ scalefactor = 1;
+ }
+ canvasdict.transform.s = scalefactor;
+ var flip = (canvasdict.layer == "B");
+ if (flip) {
+ canvasdict.transform.x = -((bbox.maxx + bbox.minx) * scalefactor + width) * 0.5;
+ } else {
+ canvasdict.transform.x = -((bbox.maxx + bbox.minx) * scalefactor - width) * 0.5;
+ }
+ canvasdict.transform.y = -((bbox.maxy + bbox.miny) * scalefactor - height) * 0.5;
+ for (var c of ["bg", "silk", "highlight"]) {
+ canvas = canvasdict[c];
+ canvas.width = width;
+ canvas.height = height;
+ canvas.style.width = (width / 2) + "px";
+ canvas.style.height = (height / 2) + "px";
+ }
+}
+
+function redrawCanvas(layerdict) {
+ prepareLayer(layerdict);
+ drawBackground(layerdict);
+ drawHighlightsOnLayer(layerdict);
+}
+
+function resizeCanvas(layerdict) {
+ recalcLayerScale(layerdict);
+ redrawCanvas(layerdict);
+}
+
+function resizeAll() {
+ resizeCanvas(allcanvas.front);
+ resizeCanvas(allcanvas.back);
+}
+
+function bboxScan(layer, x, y) {
+ var result = [];
+ for (var i = 0; i < pcbdata.modules.length; i++) {
+ var module = pcbdata.modules[i];
+ if (module.layer == layer) {
+ var b = module.bbox;
+ if (b.pos[0] <= x && b.pos[0] + b.size[0] >= x &&
+ b.pos[1] <= y && b.pos[1] + b.size[1] >= y) {
+ result.push(i);
+ }
+ }
+ }
+ return result;
+}
+
+function handleMouseDown(e, layerdict) {
+ if (e.which != 1) {
+ return;
+ }
+ e.preventDefault();
+ e.stopPropagation();
+ layerdict.transform.mousestartx = e.offsetX;
+ layerdict.transform.mousestarty = e.offsetY;
+ layerdict.transform.mousedownx = e.offsetX;
+ layerdict.transform.mousedowny = e.offsetY;
+ layerdict.transform.mousedown = true;
+}
+
+function handleMouseClick(e, layerdict) {
+ var x = e.offsetX;
+ var y = e.offsetY;
+ var t = layerdict.transform;
+ if (layerdict.layer == "B") {
+ x = (2 * x / t.zoom - t.panx + t.x) / -t.s;
+ } else {
+ x = (2 * x / t.zoom - t.panx - t.x) / t.s;
+ }
+ y = (2 * y / t.zoom - t.y - t.pany) / t.s;
+ var v = rotateVector([x, y], -boardRotation);
+ var modules = bboxScan(layerdict.layer, v[0], v[1]);
+ if (modules.length > 0) {
+ modulesClicked(modules);
+ }
+}
+
+function handleMouseUp(e, layerdict) {
+ e.preventDefault();
+ e.stopPropagation();
+ if (e.which == 1 &&
+ layerdict.transform.mousedown &&
+ layerdict.transform.mousedownx == e.offsetX &&
+ layerdict.transform.mousedowny == e.offsetY) {
+ // This is just a click
+ handleMouseClick(e, layerdict);
+ layerdict.transform.mousedown = false;
+ return;
+ }
+ if (e.which == 3) {
+ // Reset pan and zoom on right click.
+ layerdict.transform.panx = 0;
+ layerdict.transform.pany = 0;
+ layerdict.transform.zoom = 1;
+ redrawCanvas(layerdict);
+ } else if (!redrawOnDrag) {
+ redrawCanvas(layerdict);
+ }
+ layerdict.transform.mousedown = false;
+}
+
+function handleMouseMove(e, layerdict) {
+ if (!layerdict.transform.mousedown) {
+ return;
+ }
+ e.preventDefault();
+ e.stopPropagation();
+ var dx = e.offsetX - layerdict.transform.mousestartx;
+ var dy = e.offsetY - layerdict.transform.mousestarty;
+ layerdict.transform.panx += 2 * dx / layerdict.transform.zoom;
+ layerdict.transform.pany += 2 * dy / layerdict.transform.zoom;
+ layerdict.transform.mousestartx = e.offsetX;
+ layerdict.transform.mousestarty = e.offsetY;
+ if (redrawOnDrag) {
+ redrawCanvas(layerdict);
+ }
+}
+
+function handleMouseWheel(e, layerdict) {
+ e.preventDefault();
+ e.stopPropagation();
+ var t = layerdict.transform;
+ var wheeldelta = e.deltaY;
+ if (e.deltaMode == 1) {
+ // FF only, scroll by lines
+ wheeldelta *= 30;
+ } else if (e.deltaMode == 2) {
+ wheeldelta *= 300;
+ }
+ var m = Math.pow(1.1, -wheeldelta / 40);
+ // Limit amount of zoom per tick.
+ if (m > 2) {
+ m = 2;
+ } else if (m < 0.5) {
+ m = 0.5;
+ }
+ t.zoom *= m;
+ var zoomd = (1 - m) / t.zoom;
+ t.panx += 2 * e.offsetX * zoomd;
+ t.pany += 2 * e.offsetY * zoomd;
+ redrawCanvas(layerdict);
+}
+
+function addMouseHandlers(div, layerdict) {
+ div.onmousedown = function(e) {
+ handleMouseDown(e, layerdict);
+ };
+ div.onmousemove = function(e) {
+ handleMouseMove(e, layerdict);
+ };
+ div.onmouseup = function(e) {
+ handleMouseUp(e, layerdict);
+ };
+ div.onmouseout = function(e) {
+ handleMouseUp(e, layerdict);
+ }
+ div.onwheel = function(e) {
+ handleMouseWheel(e, layerdict);
+ }
+ for (var element of [div, layerdict.bg, layerdict.silk, layerdict.highlight]) {
+ element.addEventListener("contextmenu", function(e) {
+ e.preventDefault();
+ }, false);
+ }
+}
+
+function setRedrawOnDrag(value) {
+ redrawOnDrag = value;
+ writeStorage("redrawOnDrag", value);
+}
+
+function setBoardRotation(value) {
+ boardRotation = value * 5;
+ writeStorage("boardRotation", boardRotation);
+ document.getElementById("rotationDegree").textContent = boardRotation;
+ resizeAll();
+}
+
+function initRender() {
+ allcanvas = {
+ front: {
+ transform: {
+ x: 0,
+ y: 0,
+ s: 1,
+ panx: 0,
+ pany: 0,
+ zoom: 1,
+ mousestartx: 0,
+ mousestarty: 0,
+ mousedown: false,
+ },
+ bg: document.getElementById("F_bg"),
+ silk: document.getElementById("F_slk"),
+ highlight: document.getElementById("F_hl"),
+ layer: "F",
+ },
+ back: {
+ transform: {
+ x: 0,
+ y: 0,
+ s: 1,
+ panx: 0,
+ pany: 0,
+ zoom: 1,
+ mousestartx: 0,
+ mousestarty: 0,
+ mousedown: false,
+ },
+ bg: document.getElementById("B_bg"),
+ silk: document.getElementById("B_slk"),
+ highlight: document.getElementById("B_hl"),
+ layer: "B",
+ }
+ };
+ addMouseHandlers(document.getElementById("frontcanvas"), allcanvas.front);
+ addMouseHandlers(document.getElementById("backcanvas"), allcanvas.back);
+}
+
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+/* DOM manipulation and misc code */
+
+var bomsplit;
+var canvassplit;
+var canvaslayout = "default";
+var bomlayout = "default";
+var initDone = false;
+var bomSortFunction = null;
+var currentSortColumn = null;
+var currentSortOrder = null;
+var currentHighlightedRowId;
+var highlightHandlers = [];
+var highlightedModules = [];
+var checkboxes = [];
+var bomCheckboxes = "";
+var highlightpin1 = false;
+var lastClicked;
+
+function dbg(html) {
+ dbgdiv.innerHTML = html;
+}
+
+function setDarkMode(value) {
+ if (value) {
+ topmostdiv.classList.add("dark");
+ } else {
+ topmostdiv.classList.remove("dark");
+ }
+ writeStorage("darkmode", value);
+ if (initDone) {
+ redrawCanvas(allcanvas.front);
+ redrawCanvas(allcanvas.back);
+ }
+}
+
+function setHighlightPin1(value) {
+ writeStorage("highlightpin1", value);
+ highlightpin1 = value;
+ if (initDone) {
+ redrawCanvas(allcanvas.front);
+ redrawCanvas(allcanvas.back);
+ }
+}
+
+function getStoredCheckboxRefs(checkbox) {
+ function convert(ref) {
+ var intref = parseInt(ref);
+ if (isNaN(intref)) {
+ for (var i = 0; i < pcbdata.modules.length; i++) {
+ if (pcbdata.modules[i].ref == ref) {
+ return i;
+ }
+ }
+ return -1;
+ } else {
+ return intref;
+ }
+ }
+ var existingRefs = readStorage("checkbox_" + checkbox);
+ if (!existingRefs) {
+ return new Set();
+ } else {
+ return new Set(existingRefs.split(",").map(r => convert(r)));
+ }
+}
+
+function getCheckboxState(checkbox, references) {
+ var storedRefsSet = getStoredCheckboxRefs(checkbox);
+ var currentRefsSet = new Set(references.map(r => r[1]));
+ // Get difference of current - stored
+ var difference = new Set(currentRefsSet);
+ for (ref of storedRefsSet) {
+ difference.delete(ref);
+ }
+ if (difference.size == 0) {
+ // All the current refs are stored
+ return "checked";
+ } else if (difference.size == currentRefsSet.size) {
+ // None of the current refs are stored
+ return "unchecked";
+ } else {
+ // Some of the refs are stored
+ return "indeterminate";
+ }
+}
+
+function setBomCheckboxState(checkbox, element, references) {
+ var state = getCheckboxState(checkbox, references);
+ element.checked = (state == "checked");
+ element.indeterminate = (state == "indeterminate");
+}
+
+function createCheckboxChangeHandler(checkbox, references) {
+ return function() {
+ refsSet = getStoredCheckboxRefs(checkbox);
+ if (this.checked) {
+ // checkbox ticked
+ for (var ref of references) {
+ refsSet.add(ref[1]);
+ }
+ } else {
+ // checkbox unticked
+ for (var ref of references) {
+ refsSet.delete(ref[1]);
+ }
+ }
+ writeStorage("checkbox_" + checkbox, [...refsSet].join(","));
+ }
+}
+
+function createRowHighlightHandler(rowid, refs) {
+ return function() {
+ if (currentHighlightedRowId) {
+ if (currentHighlightedRowId == rowid) {
+ return;
+ }
+ document.getElementById(currentHighlightedRowId).classList.remove("highlighted");
+ }
+ document.getElementById(rowid).classList.add("highlighted");
+ currentHighlightedRowId = rowid;
+ highlightedModules = refs.map(r => r[1]);
+ drawHighlights();
+ }
+}
+
+function entryMatches(entry) {
+ // check refs
+ for (var ref of entry[3]) {
+ if (ref[0].toLowerCase().indexOf(filter) >= 0) {
+ return true;
+ }
+ }
+ // check value
+ if (entry[1].toLowerCase().indexOf(filter) >= 0) {
+ return true;
+ }
+ // check footprint
+ if (entry[2].toLowerCase().indexOf(filter) >= 0) {
+ return true;
+ }
+ return false;
+}
+
+function findRefInEntry(entry) {
+ return entry[3].filter(r => r[0].toLowerCase() == reflookup);
+}
+
+function highlightFilter(s) {
+ if (!filter) {
+ return s;
+ }
+ var parts = s.toLowerCase().split(filter);
+ if (parts.length == 1) {
+ return s;
+ }
+ var r = "";
+ var pos = 0;
+ for (var i in parts) {
+ if (i > 0) {
+ r += '<mark class="highlight">' +
+ s.substring(pos, pos + filter.length) +
+ '</mark>';
+ pos += filter.length;
+ }
+ r += s.substring(pos, pos + parts[i].length);
+ pos += parts[i].length;
+ }
+ return r;
+}
+
+function checkboxSetUnsetAllHandler(checkboxname) {
+ return function() {
+ var checkboxnum = 0;
+ while (checkboxnum < checkboxes.length &&
+ checkboxes[checkboxnum].toLowerCase() != checkboxname.toLowerCase()) {
+ checkboxnum++;
+ }
+ if (checkboxnum >= checkboxes.length) {
+ return;
+ }
+ var allset = true;
+ var checkbox;
+ var row;
+ for (row of bombody.childNodes) {
+ checkbox = row.childNodes[checkboxnum + 1].childNodes[0];
+ if (!checkbox.checked || checkbox.indeterminate) {
+ allset = false;
+ break;
+ }
+ }
+ for (row of bombody.childNodes) {
+ checkbox = row.childNodes[checkboxnum + 1].childNodes[0];
+ checkbox.checked = !allset;
+ checkbox.indeterminate = false;
+ checkbox.onchange();
+ }
+ }
+}
+
+function createColumnHeader(name, cls, comparator) {
+ var th = document.createElement("TH");
+ th.innerHTML = name;
+ th.classList.add(cls);
+ th.style.cursor = "pointer";
+ var span = document.createElement("SPAN");
+ span.classList.add("sortmark");
+ span.classList.add("none");
+ th.appendChild(span);
+ th.onclick = function() {
+ if (currentSortColumn && this !== currentSortColumn) {
+ // Currently sorted by another column
+ currentSortColumn.childNodes[1].classList.remove(currentSortOrder);
+ currentSortColumn.childNodes[1].classList.add("none");
+ currentSortColumn = null;
+ currentSortOrder = null;
+ }
+ if (currentSortColumn && this === currentSortColumn) {
+ // Already sorted by this column
+ if (currentSortOrder == "asc") {
+ // Sort by this column, descending order
+ bomSortFunction = function(a, b) {
+ return -comparator(a, b);
+ }
+ currentSortColumn.childNodes[1].classList.remove("asc");
+ currentSortColumn.childNodes[1].classList.add("desc");
+ currentSortOrder = "desc";
+ } else {
+ // Unsort
+ bomSortFunction = null;
+ currentSortColumn.childNodes[1].classList.remove("desc");
+ currentSortColumn.childNodes[1].classList.add("none");
+ currentSortColumn = null;
+ currentSortOrder = null;
+ }
+ } else {
+ // Sort by this column, ascending order
+ bomSortFunction = comparator;
+ currentSortColumn = this;
+ currentSortColumn.childNodes[1].classList.remove("none");
+ currentSortColumn.childNodes[1].classList.add("asc");
+ currentSortOrder = "asc";
+ }
+ populateBomBody();
+ }
+ return th;
+}
+
+function populateBomHeader() {
+ while (bomhead.firstChild) {
+ bomhead.removeChild(bomhead.firstChild);
+ }
+ var tr = document.createElement("TR");
+ var th = document.createElement("TH");
+ th.classList.add("numCol");
+ tr.appendChild(th);
+ checkboxes = bomCheckboxes.split(",").filter((e) => e);
+ var checkboxCompareClosure = function(checkbox) {
+ return (a, b) => {
+ var stateA = getCheckboxState(checkbox, a[3]);
+ var stateB = getCheckboxState(checkbox, b[3]);
+ if (stateA > stateB) return -1;
+ if (stateA < stateB) return 1;
+ return 0;
+ }
+ }
+ for (var checkbox of checkboxes) {
+ th = createColumnHeader(
+ checkbox, "bom-checkbox", checkboxCompareClosure(checkbox));
+ th.onclick = fancyDblClickHandler(
+ th, th.onclick.bind(th), checkboxSetUnsetAllHandler(checkbox));
+ tr.appendChild(th);
+ }
+ tr.appendChild(createColumnHeader("References", "References", (a, b) => {
+ var i = 0;
+ while (i < a[3].length && i < b[3].length) {
+ if (a[3][i] != b[3][i]) return a[3][i] > b[3][i] ? 1 : -1;
+ i++;
+ }
+ return a[3].length - b[3].length;
+ }));
+ // Extra fields
+ if (config.extra_fields.length > 0) {
+ var extraFieldCompareClosure = function(fieldIndex) {
+ return (a, b) => {
+ var fa = a[4][fieldIndex];
+ var fb = b[4][fieldIndex];
+ if (fa != fb) return fa > fb ? 1 : -1;
+ else return 0;
+ }
+ }
+ for (var i in config.extra_fields) {
+ tr.appendChild(createColumnHeader(
+ config.extra_fields[i], "extra", extraFieldCompareClosure(i)));
+ }
+ }
+ tr.appendChild(createColumnHeader("Value", "Value", (a, b) => {
+ return valueCompare(a[5], b[5], a[1], b[1]);
+ }));
+ tr.appendChild(createColumnHeader("Footprint", "Footprint", (a, b) => {
+ if (a[2] != b[2]) return a[2] > b[2] ? 1 : -1;
+ else return 0;
+ }));
+ tr.appendChild(createColumnHeader("Quantity", "Quantity", (a, b) => {
+ return a[3].length - b[3].length;
+ }));
+ bomhead.appendChild(tr);
+}
+
+function populateBomBody() {
+ while (bom.firstChild) {
+ bom.removeChild(bom.firstChild);
+ }
+ highlightHandlers = [];
+ currentHighlightedRowId = null;
+ var first = true;
+ switch (canvaslayout) {
+ case 'F':
+ bomtable = pcbdata.bom.F;
+ break;
+ case 'FB':
+ bomtable = pcbdata.bom.both;
+ break;
+ case 'B':
+ bomtable = pcbdata.bom.B;
+ break;
+ }
+ if (bomSortFunction) {
+ bomtable = bomtable.slice().sort(bomSortFunction);
+ }
+ for (var i in bomtable) {
+ var bomentry = bomtable[i];
+ if (filter && !entryMatches(bomentry)) {
+ continue;
+ }
+ var references = bomentry[3];
+ if (reflookup) {
+ references = findRefInEntry(bomentry);
+ if (references.length == 0) {
+ continue;
+ }
+ }
+ var tr = document.createElement("TR");
+ var td = document.createElement("TD");
+ var rownum = +i + 1;
+ tr.id = "bomrow" + rownum;
+ td.textContent = rownum;
+ tr.appendChild(td);
+ // Checkboxes
+ for (var checkbox of checkboxes) {
+ if (checkbox) {
+ td = document.createElement("TD");
+ var input = document.createElement("input");
+ input.type = "checkbox";
+ input.onchange = createCheckboxChangeHandler(checkbox, references);
+ setBomCheckboxState(checkbox, input, references);
+ td.appendChild(input);
+ tr.appendChild(td);
+ }
+ }
+ // References
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(references.map(r => r[0]).join(", "));
+ tr.appendChild(td);
+ // Extra fields
+ for (var i in config.extra_fields) {
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(bomentry[4][i]);
+ tr.appendChild(td);
+ }
+ // Value
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(bomentry[1]);
+ tr.appendChild(td);
+ // Footprint
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(bomentry[2]);
+ tr.appendChild(td);
+ // Quantity
+ td = document.createElement("TD");
+ td.textContent = bomentry[3].length;
+ tr.appendChild(td);
+ bom.appendChild(tr);
+ var handler = createRowHighlightHandler(tr.id, references);
+ tr.onmousemove = handler;
+ highlightHandlers.push({
+ id: tr.id,
+ handler: handler,
+ refs: references
+ });
+ if ((filter || reflookup) && first) {
+ handler();
+ first = false;
+ }
+ }
+}
+
+function highlightPreviousRow() {
+ if (!currentHighlightedRowId) {
+ highlightHandlers[highlightHandlers.length - 1].handler();
+ } else {
+ if (highlightHandlers.length > 1 &&
+ highlightHandlers[0].id == currentHighlightedRowId) {
+ highlightHandlers[highlightHandlers.length - 1].handler();
+ } else {
+ for (var i = 0; i < highlightHandlers.length - 1; i++) {
+ if (highlightHandlers[i + 1].id == currentHighlightedRowId) {
+ highlightHandlers[i].handler();
+ break;
+ }
+ }
+ }
+ }
+ smoothScrollToRow(currentHighlightedRowId);
+}
+
+function highlightNextRow() {
+ if (!currentHighlightedRowId) {
+ highlightHandlers[0].handler();
+ } else {
+ if (highlightHandlers.length > 1 &&
+ highlightHandlers[highlightHandlers.length - 1].id == currentHighlightedRowId) {
+ highlightHandlers[0].handler();
+ } else {
+ for (var i = 1; i < highlightHandlers.length; i++) {
+ if (highlightHandlers[i - 1].id == currentHighlightedRowId) {
+ highlightHandlers[i].handler();
+ break;
+ }
+ }
+ }
+ }
+ smoothScrollToRow(currentHighlightedRowId);
+}
+
+function populateBomTable() {
+ populateBomHeader();
+ populateBomBody();
+}
+
+function modulesClicked(moduleIndexes) {
+ var lastClickedIndex = moduleIndexes.indexOf(lastClicked);
+ var index = moduleIndexes[(lastClickedIndex + 1) % moduleIndexes.length];
+ for (var handler of highlightHandlers) {
+ if (handler.refs.map(r => r[1]).indexOf(index) >= 0) {
+ lastClicked = index;
+ handler.handler();
+ smoothScrollToRow(currentHighlightedRowId);
+ break;
+ }
+ }
+}
+
+function updateFilter(input) {
+ filter = input.toLowerCase();
+ populateBomTable();
+}
+
+function updateRefLookup(input) {
+ reflookup = input.toLowerCase();
+ populateBomTable();
+}
+
+function silkscreenVisible(visible) {
+ if (visible) {
+ allcanvas.front.silk.style.display = "";
+ allcanvas.back.silk.style.display = "";
+ writeStorage("silkscreenVisible", true);
+ } else {
+ allcanvas.front.silk.style.display = "none";
+ allcanvas.back.silk.style.display = "none";
+ writeStorage("silkscreenVisible", false);
+ }
+}
+
+function changeCanvasLayout(layout) {
+ document.getElementById("fl-btn").classList.remove("depressed");
+ document.getElementById("fb-btn").classList.remove("depressed");
+ document.getElementById("bl-btn").classList.remove("depressed");
+ switch (layout) {
+ case 'F':
+ document.getElementById("fl-btn").classList.add("depressed");
+ if (bomlayout != "bom-only") {
+ canvassplit.collapse(1);
+ }
+ break;
+ case 'B':
+ document.getElementById("bl-btn").classList.add("depressed");
+ if (bomlayout != "bom-only") {
+ canvassplit.collapse(0);
+ }
+ break;
+ default:
+ document.getElementById("fb-btn").classList.add("depressed");
+ if (bomlayout != "bom-only") {
+ canvassplit.setSizes([50, 50]);
+ }
+ }
+ canvaslayout = layout;
+ writeStorage("canvaslayout", layout);
+ resizeAll();
+ populateBomTable();
+}
+
+function populateMetadata() {
+ document.getElementById("title").innerHTML = pcbdata.metadata.title;
+ document.getElementById("revision").innerHTML = "Rev: " + pcbdata.metadata.revision;
+ document.getElementById("company").innerHTML = pcbdata.metadata.company;
+ document.getElementById("filedate").innerHTML = pcbdata.metadata.date;
+ if (pcbdata.metadata.title != "") {
+ document.title = pcbdata.metadata.title + " BOM";
+ }
+}
+
+function changeBomLayout(layout) {
+ document.getElementById("bom-btn").classList.remove("depressed");
+ document.getElementById("lr-btn").classList.remove("depressed");
+ document.getElementById("tb-btn").classList.remove("depressed");
+ switch (layout) {
+ case 'bom-only':
+ document.getElementById("bom-btn").classList.add("depressed");
+ if (bomsplit) {
+ bomsplit.destroy();
+ bomsplit = null;
+ canvassplit.destroy();
+ canvassplit = null;
+ }
+ document.getElementById("frontcanvas").style.display = "none";
+ document.getElementById("backcanvas").style.display = "none";
+ document.getElementById("bot").style.height = "";
+ break;
+ case 'top-bottom':
+ document.getElementById("tb-btn").classList.add("depressed");
+ document.getElementById("frontcanvas").style.display = "";
+ document.getElementById("backcanvas").style.display = "";
+ document.getElementById("bot").style.height = "calc(100% - 80px)";
+ document.getElementById("bomdiv").classList.remove("split-horizontal");
+ document.getElementById("canvasdiv").classList.remove("split-horizontal");
+ document.getElementById("frontcanvas").classList.add("split-horizontal");
+ document.getElementById("backcanvas").classList.add("split-horizontal");
+ if (bomsplit) {
+ bomsplit.destroy();
+ bomsplit = null;
+ canvassplit.destroy();
+ canvassplit = null;
+ }
+ bomsplit = Split(['#bomdiv', '#canvasdiv'], {
+ sizes: [50, 50],
+ onDragEnd: resizeAll,
+ direction: "vertical",
+ gutterSize: 5
+ });
+ canvassplit = Split(['#frontcanvas', '#backcanvas'], {
+ sizes: [50, 50],
+ gutterSize: 5,
+ onDragEnd: resizeAll
+ });
+ break;
+ case 'left-right':
+ document.getElementById("lr-btn").classList.add("depressed");
+ document.getElementById("frontcanvas").style.display = "";
+ document.getElementById("backcanvas").style.display = "";
+ document.getElementById("bot").style.height = "calc(100% - 80px)";
+ document.getElementById("bomdiv").classList.add("split-horizontal");
+ document.getElementById("canvasdiv").classList.add("split-horizontal");
+ document.getElementById("frontcanvas").classList.remove("split-horizontal");
+ document.getElementById("backcanvas").classList.remove("split-horizontal");
+ if (bomsplit) {
+ bomsplit.destroy();
+ bomsplit = null;
+ canvassplit.destroy();
+ canvassplit = null;
+ }
+ bomsplit = Split(['#bomdiv', '#canvasdiv'], {
+ sizes: [50, 50],
+ onDragEnd: resizeAll,
+ gutterSize: 5
+ });
+ canvassplit = Split(['#frontcanvas', '#backcanvas'], {
+ sizes: [50, 50],
+ gutterSize: 5,
+ direction: "vertical",
+ onDragEnd: resizeAll
+ });
+ }
+ bomlayout = layout;
+ writeStorage("bomlayout", layout);
+ changeCanvasLayout(canvaslayout);
+}
+
+function focusFilterField() {
+ focusInputField(document.getElementById("filter"));
+}
+
+function focusRefLookupField() {
+ focusInputField(document.getElementById("reflookup"));
+}
+
+function toggleBomCheckbox(bomrowid, checkboxnum) {
+ if (!bomrowid || checkboxnum > checkboxes.length) {
+ return;
+ }
+ var bomrow = document.getElementById(bomrowid);
+ var checkbox = bomrow.childNodes[checkboxnum].childNodes[0];
+ checkbox.checked = !checkbox.checked;
+ checkbox.indeterminate = false;
+ checkbox.onchange();
+}
+
+function checkBomCheckbox(bomrowid, checkboxname) {
+ var checkboxnum = 0;
+ while (checkboxnum < checkboxes.length &&
+ checkboxes[checkboxnum].toLowerCase() != checkboxname.toLowerCase()) {
+ checkboxnum++;
+ }
+ if (!bomrowid || checkboxnum >= checkboxes.length) {
+ return;
+ }
+ var bomrow = document.getElementById(bomrowid);
+ var checkbox = bomrow.childNodes[checkboxnum + 1].childNodes[0];
+ checkbox.checked = true;
+ checkbox.indeterminate = false;
+ checkbox.onchange();
+}
+
+function setBomCheckboxes(value) {
+ bomCheckboxes = value;
+ writeStorage("bomCheckboxes", value);
+ populateBomTable();
+}
+
+document.onkeydown = function(e) {
+ switch (e.key) {
+ case "n":
+ if (document.activeElement.type == "text") {
+ return;
+ }
+ if (currentHighlightedRowId !== null) {
+ checkBomCheckbox(currentHighlightedRowId, "placed");
+ highlightNextRow();
+ e.preventDefault();
+ }
+ break;
+ case "ArrowUp":
+ highlightPreviousRow();
+ e.preventDefault();
+ break;
+ case "ArrowDown":
+ highlightNextRow();
+ e.preventDefault();
+ break;
+ default:
+ break;
+ }
+ if (e.altKey) {
+ switch (e.key) {
+ case "f":
+ focusFilterField();
+ e.preventDefault();
+ break;
+ case "r":
+ focusRefLookupField();
+ e.preventDefault();
+ break;
+ case "z":
+ changeBomLayout("bom-only");
+ e.preventDefault();
+ break;
+ case "x":
+ changeBomLayout("left-right");
+ e.preventDefault();
+ break;
+ case "c":
+ changeBomLayout("top-bottom");
+ e.preventDefault();
+ break;
+ case "v":
+ changeCanvasLayout("F");
+ e.preventDefault();
+ break;
+ case "b":
+ changeCanvasLayout("FB");
+ e.preventDefault();
+ break;
+ case "n":
+ changeCanvasLayout("B");
+ e.preventDefault();
+ break;
+ default:
+ break;
+ }
+ if (e.key >= '1' && e.key <= '9') {
+ toggleBomCheckbox(currentHighlightedRowId, parseInt(e.key));
+ }
+ }
+}
+
+function initDefaults() {
+ bomlayout = readStorage("bomlayout");
+ if (bomlayout === null) {
+ bomlayout = config.bom_view;
+ }
+ if (!['bom-only', 'left-right', 'top-bottom'].includes(bomlayout)) {
+ bomlayout = config.bom_view;
+ }
+ canvaslayout = readStorage("canvaslayout");
+ if (canvaslayout === null) {
+ canvaslayout = config.layer_view;
+ }
+ bomCheckboxes = readStorage("bomCheckboxes");
+ if (bomCheckboxes === null) {
+ bomCheckboxes = config.checkboxes;
+ }
+ document.getElementById("bomCheckboxes").value = bomCheckboxes;
+
+ var b = readStorage("silkscreenVisible");
+ if (b === null) {
+ b = config.show_silkscreen;
+ }
+ document.getElementById("silkscreenCheckbox").checked = b;
+ silkscreenVisible(b);
+
+ b = readStorage("redrawOnDrag");
+ if (b === null) {
+ b = config.redraw_on_drag;
+ }
+ document.getElementById("dragCheckbox").checked = b;
+ setRedrawOnDrag(b);
+
+ b = readStorage("darkmode");
+ if (b === null) {
+ b = config.dark_mode;
+ }
+ document.getElementById("darkmodeCheckbox").checked = b;
+ setDarkMode(b);
+
+ b = readStorage("highlightpin1");
+ if (b === null) {
+ b = config.highlight_pin1;
+ }
+ document.getElementById("highlightpin1Checkbox").checked = b;
+ setHighlightPin1(b);
+
+ boardRotation = readStorage("boardRotation");
+ if (boardRotation === null) {
+ boardRotation = config.board_rotation * 5;
+ } else {
+ boardRotation = parseInt(boardRotation);
+ }
+ document.getElementById("boardRotation").value = boardRotation / 5;
+ document.getElementById("rotationDegree").textContent = boardRotation;
+}
+
+window.onload = function(e) {
+ initUtils();
+ initRender();
+ initStorage();
+ initDefaults();
+ cleanGutters();
+ populateMetadata();
+ dbgdiv = document.getElementById("dbg");
+ bom = document.getElementById("bombody");
+ bomhead = document.getElementById("bomhead");
+ filter = "";
+ reflookup = "";
+ initDone = true;
+ // Triggers render
+ changeBomLayout(bomlayout);
+}
+
+window.onresize = resizeAll;
+window.matchMedia("print").addListener(resizeAll);
+
+///////////////////////////////////////////////
+
+ </script>
+</head>
+
+<body>
+<div id="topmostdiv" style="width: 100%; height: 100%">
+ <div id="top">
+ <div style="float: right;">
+ <div class="hideonprint menu" style="float: right; margin: 10px; top: 8px;">
+ <button class="menubtn"></button>
+ <div class="menu-content">
+ <label class="menu-label menu-label-top">
+ <input id="darkmodeCheckbox" type="checkbox" onchange="setDarkMode(this.checked)">
+ Dark mode
+ </label>
+ <label class="menu-label">
+ <input id="silkscreenCheckbox" type="checkbox" checked onchange="silkscreenVisible(this.checked)">
+ Show silkscreen
+ </label>
+ <label class="menu-label">
+ <input id="highlightpin1Checkbox" type="checkbox" onchange="setHighlightPin1(this.checked)">
+ Highlight first pin
+ </label>
+ <label class="menu-label">
+ <input id="dragCheckbox" type="checkbox" checked onchange="setRedrawOnDrag(this.checked)">
+ Continuous redraw on drag
+ </label>
+ <label class="menu-label">
+ <span>Board rotation</span>
+ <span style="float: right"><span id="rotationDegree">0</span>&#176;</span>
+ <input id="boardRotation" type="range" min="-36" max="36" value="0" class="slider" oninput="setBoardRotation(this.value)">
+ </label>
+ <label class="menu-label">
+ <div style="margin-left: 5px">Bom checkboxes</div>
+ <input id="bomCheckboxes" class="menu-textbox" type=text
+ oninput="setBomCheckboxes(this.value)">
+ </label>
+ <label class="menu-label">
+ <span class="shameless-plug">
+ <span>Created using</span>
+ <a target="blank" href="https://github.com/openscopeproject/InteractiveHtmlBom">InteractiveHtmlBom</a>
+ </span>
+ </label>
+ </div>
+ </div>
+ <div class="button-container hideonprint"
+ style="float: right; margin: 10px; position: relative; top: 8px">
+ <button id="fl-btn" class="left-most-button" onclick="changeCanvasLayout('F')"
+ title="Front only">F
+ </button>
+ <button id="fb-btn" class="middle-button" onclick="changeCanvasLayout('FB')"
+ title="Front and Back">FB
+ </button>
+ <button id="bl-btn" class="right-most-button" onclick="changeCanvasLayout('B')"
+ title="Back only">B
+ </button>
+ </div>
+ <div class="button-container hideonprint"
+ style="float: right; margin: 10px; position: relative; top: 8px">
+ <button id="bom-btn" class="left-most-button" onclick="changeBomLayout('bom-only')"
+ title="BOM only"></button>
+ <button id="lr-btn" class="middle-button" onclick="changeBomLayout('left-right')"
+ title="BOM left, drawings right"></button>
+ <button id="tb-btn" class="right-most-button" onclick="changeBomLayout('top-bottom')"
+ title="BOM top, drawings bot"></button>
+ </div>
+ </div>
+ <div id="fileinfodiv" style="overflow: auto;">
+ <table class="fileinfo">
+ <tbody>
+ <tr>
+ <td id="title" class="title" style="width: 70%">
+ Title
+ </td>
+ <td id="revision" class="title" style="width: 30%">
+ Revision
+ </td>
+ </tr>
+ <tr>
+ <td id="company">
+ Kicad version
+ </td>
+ <td id="filedate">
+ Date
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <div id="bot" class="split" style="height: calc(100% - 80px)">
+ <div id="bomdiv" class="split split-horizontal">
+ <div style="width: 100%">
+ <input id="reflookup" class="searchbox reflookup hideonprint" type="text" placeholder="Ref lookup"
+ oninput="updateRefLookup(this.value)">
+ <input id="filter" class="searchbox filter hideonprint" type="text" placeholder="Filter"
+ oninput="updateFilter(this.value)">
+ <div class="button-container hideonprint" style="float: left">
+ <button id="copy" title="Copy bom table to clipboard"
+ onclick="copyToClipboard()"></button>
+ </div>
+ </div>
+ <div id="dbg"></div>
+ <table class="bom">
+ <thead id="bomhead">
+ </thead>
+ <tbody id="bombody">
+ </tbody>
+ </table>
+ </div>
+ <div id="canvasdiv" class="split split-horizontal">
+ <div id="frontcanvas" class="split" style="overflow: hidden">
+ <div style="position: relative; width: 100%; height: 100%;">
+ <canvas id="F_bg" style="position: absolute; left: 0; top: 0; z-index: 0;"></canvas>
+ <canvas id="F_slk" style="position: absolute; left: 0; top: 0; z-index: 1;"></canvas>
+ <canvas id="F_hl" style="position: absolute; left: 0; top: 0; z-index: 2;"></canvas>
+ </div>
+ </div>
+ <div id="backcanvas" class="split" style="overflow: hidden">
+ <div style="position: relative; width: 100%; height: 100%;">
+ <canvas id="B_bg" style="position: absolute; left: 0; top: 0; z-index: 0;"></canvas>
+ <canvas id="B_slk" style="position: absolute; left: 0; top: 0; z-index: 1;"></canvas>
+ <canvas id="B_hl" style="position: absolute; left: 0; top: 0; z-index: 2;"></canvas>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+</body>
+
+</html>
diff --git a/switches/switches b/switches/switches
new file mode 100644
index 0000000..2b4e2b6
--- /dev/null
+++ b/switches/switches
@@ -0,0 +1,54 @@
+Source,/home/easwaran/allProjects/kicad/openplc_modules/switches/switches.sch
+Kicad Rev,Eeschema 5.0.1
+Generated Date,Mon 21 Jan 2019 01:25:31 PM IST
+
+Title,Not Set
+Company,Not Set
+Revision,Not Set
+Date Issue,Not Set
+
+Reference,Value,Library,Library Ref
+J2,Conn_01x01_Female,Connector,Conn_01x01_Female
+J3,Conn_01x01_Female,Connector,Conn_01x01_Female
+J4,Conn_01x01_Female,Connector,Conn_01x01_Female
+J5,Conn_01x01_Female,Connector,Conn_01x01_Female
+J6,Conn_01x01_Female,Connector,Conn_01x01_Female
+J7,Conn_01x01_Female,Connector,Conn_01x01_Female
+J8,Conn_01x01_Female,Connector,Conn_01x01_Female
+J9,Conn_01x01_Female,Connector,Conn_01x01_Female
+J10,Conn_01x01_Female,Connector,Conn_01x01_Female
+J11,Conn_01x01_Female,Connector,Conn_01x01_Female
+J12,Conn_01x01_Female,Connector,Conn_01x01_Female
+Q1,2N7002,Transistor_FET,2N7002
+Q2,2N7002,Transistor_FET,2N7002
+Q3,2N7002,Transistor_FET,2N7002
+R1,R_US,Device,R_US
+R2,R_US,Device,R_US
+R3,R_US,Device,R_US
+D1,LED,Device,LED
+D2,LED,Device,LED
+D3,LED,Device,LED
+Q4,2N7002,Transistor_FET,2N7002
+Q5,2N7002,Transistor_FET,2N7002
+Q6,2N7002,Transistor_FET,2N7002
+R4,R_US,Device,R_US
+R5,R_US,Device,R_US
+R6,R_US,Device,R_US
+D4,LED,Device,LED
+D5,LED,Device,LED
+D6,LED,Device,LED
+J1,switchesOut,Connector,Conn_01x12_Male
+R7,R_US,Device,R_US
+R8,R_US,Device,R_US
+R9,R_US,Device,R_US
+R10,R_US,Device,R_US
+R11,R_US,Device,R_US
+R12,R_US,Device,R_US
+R13,R_US,Device,R_US
+D7,LED,Device,LED
+R14,R_US,Device,R_US
+D8,LED,Device,LED
+R15,R_US,Device,R_US
+D9,LED,Device,LED
+R16,R_US,Device,R_US
+D10,LED,Device,LED
diff --git a/switches/switches.kicad_pcb b/switches/switches.kicad_pcb
index db58b99..62d3d27 100644
--- a/switches/switches.kicad_pcb
+++ b/switches/switches.kicad_pcb
@@ -2,7 +2,7 @@
(general
(thickness 1.6)
- (drawings 17)
+ (drawings 15)
(tracks 175)
(zones 0)
(modules 45)
@@ -910,18 +910,18 @@
)
(module Resistors_SMD:R_0805_HandSoldering (layer F.Cu) (tedit 58E0A804) (tstamp 5C3C96EE)
- (at 133.8 100.44345 45)
+ (at 133.8 100.44345)
(descr "Resistor SMD 0805, hand soldering")
(tags "resistor 0805")
(path /5C390646)
(attr smd)
- (fp_text reference R6 (at 0 -1.7 45) (layer F.SilkS)
+ (fp_text reference R6 (at 0 -1.7) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
- (fp_text value R_US (at 0 1.75 45) (layer F.Fab)
+ (fp_text value R_US (at 0 1.75) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
- (fp_text user %R (at 0 0 45) (layer F.Fab)
+ (fp_text user %R (at 0 0) (layer F.Fab)
(effects (font (size 0.5 0.5) (thickness 0.075)))
)
(fp_line (start -1 0.62) (end -1 -0.62) (layer F.Fab) (width 0.1))
@@ -934,9 +934,9 @@
(fp_line (start -2.35 -0.9) (end -2.35 0.9) (layer F.CrtYd) (width 0.05))
(fp_line (start 2.35 0.9) (end 2.35 -0.9) (layer F.CrtYd) (width 0.05))
(fp_line (start 2.35 0.9) (end -2.35 0.9) (layer F.CrtYd) (width 0.05))
- (pad 1 smd rect (at -1.35 0 45) (size 1.5 1.3) (layers F.Cu F.Paste F.Mask)
+ (pad 1 smd rect (at -1.35 0) (size 1.5 1.3) (layers F.Cu F.Paste F.Mask)
(net 19 +5V))
- (pad 2 smd rect (at 1.35 0 45) (size 1.5 1.3) (layers F.Cu F.Paste F.Mask)
+ (pad 2 smd rect (at 1.35 0) (size 1.5 1.3) (layers F.Cu F.Paste F.Mask)
(net 24 "Net-(D6-Pad2)"))
(model ${KISYS3DMOD}/Resistors_SMD.3dshapes/R_0805.wrl
(at (xyz 0 0 0))
@@ -1133,7 +1133,7 @@
(fp_text reference J1 (at 0 -2.33) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
- (fp_text value switchesOut (at 0 30.27) (layer F.Fab)
+ (fp_text value switchesOut (at 1.21 30.734) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user %R (at 0 -2.33) (layer F.Fab)
@@ -1943,6 +1943,14 @@
(xy -0.026262 -5.547126) (xy 0 -5.547126) (xy 0.209014 -5.547002)) (layer F.SilkS) (width 0.01))
)
+ (gr_line (start 140.018 141.372) (end 98.018 141.372) (layer Edge.Cuts) (width 0.1))
+ (gr_line (start 140.018 51.372) (end 98.018 51.372) (layer Edge.Cuts) (width 0.1))
+ (gr_line (start 94.018 55.372) (end 94.018 137.372) (layer Edge.Cuts) (width 0.1))
+ (gr_arc (start 140.018 137.372) (end 140.018 141.372) (angle -90) (layer Edge.Cuts) (width 0.1))
+ (gr_line (start 144.018 137.372) (end 144.018 55.372) (layer Edge.Cuts) (width 0.1))
+ (gr_arc (start 140.018 55.372) (end 144.018 55.372) (angle -90) (layer Edge.Cuts) (width 0.1))
+ (gr_arc (start 98.018 55.372) (end 98.018 51.372) (angle -90) (layer Edge.Cuts) (width 0.1))
+ (gr_circle (center 119.053327 61.372) (end 119.053327 59.771999) (layer Edge.Cuts) (width 0.1))
(dimension 50.0001 (width 0.3) (layer Margin)
(gr_text "50.000 mm" (at 118.973596 42.647849 0.1145914062) (layer Margin)
(effects (font (size 1.5 1.5) (thickness 0.3)))
@@ -1968,17 +1976,7 @@
(arrow2b (pts (xy 152.551206 51.385943) (xy 153.138878 52.511794)))
)
(gr_circle (center 119.053327 131.372) (end 119.053327 129.772) (layer Edge.Cuts) (width 0.1))
- (gr_arc (start 98.044 137.308) (end 94.044 137.308) (angle -90) (layer Edge.Cuts) (width 0.1))
- (gr_arc (start 98.018 137.372) (end 94.018 137.372) (angle -90) (layer Edge.Cuts) (width 0.1))
- (gr_line (start 140.018 141.372) (end 98.018 141.372) (layer Edge.Cuts) (width 0.1))
- (gr_line (start 140.018 51.372) (end 98.018 51.372) (layer Edge.Cuts) (width 0.1))
- (gr_arc (start 140.018 55.372) (end 144.018 55.372) (angle -90) (layer Edge.Cuts) (width 0.1))
- (gr_line (start 144.018 137.372) (end 144.018 55.372) (layer Edge.Cuts) (width 0.1))
- (gr_arc (start 140.018 137.372) (end 140.018 141.372) (angle -90) (layer Edge.Cuts) (width 0.1))
(gr_arc (start 98.018 137.372) (end 94.018 137.372) (angle -90) (layer Edge.Cuts) (width 0.1))
- (gr_line (start 94.018 55.372) (end 94.018 137.372) (layer Edge.Cuts) (width 0.1))
- (gr_arc (start 98.018 55.372) (end 98.018 51.372) (angle -90) (layer Edge.Cuts) (width 0.1))
- (gr_circle (center 119.053327 61.372) (end 119.053327 59.771999) (layer Edge.Cuts) (width 0.1))
(gr_text swithBoard (at 136.652 124.968 90) (layer F.SilkS)
(effects (font (size 1.5 1.5) (thickness 0.3)))
)
diff --git a/switches/switches.kicad_pcb-bak b/switches/switches.kicad_pcb-bak
index b35e4fe..a29638c 100644
--- a/switches/switches.kicad_pcb-bak
+++ b/switches/switches.kicad_pcb-bak
@@ -2,7 +2,7 @@
(general
(thickness 1.6)
- (drawings 17)
+ (drawings 15)
(tracks 175)
(zones 0)
(modules 45)
@@ -1133,7 +1133,7 @@
(fp_text reference J1 (at 0 -2.33) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
- (fp_text value switchesOut (at 0 30.27) (layer F.Fab)
+ (fp_text value switchesOut (at 1.21 30.734) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user %R (at 0 -2.33) (layer F.Fab)
@@ -1943,42 +1943,40 @@
(xy -0.026262 -5.547126) (xy 0 -5.547126) (xy 0.209014 -5.547002)) (layer F.SilkS) (width 0.01))
)
- (gr_circle (center 119.053327 131.372) (end 119.053327 129.772) (layer Edge.Cuts) (width 0.1))
- (gr_arc (start 98.044 137.308) (end 94.044 137.308) (angle -90) (layer Edge.Cuts) (width 0.1))
- (gr_arc (start 98.018 137.372) (end 94.018 137.372) (angle -90) (layer Edge.Cuts) (width 0.1))
(gr_line (start 140.018 141.372) (end 98.018 141.372) (layer Edge.Cuts) (width 0.1))
(gr_line (start 140.018 51.372) (end 98.018 51.372) (layer Edge.Cuts) (width 0.1))
- (gr_arc (start 140.018 55.372) (end 144.018 55.372) (angle -90) (layer Edge.Cuts) (width 0.1))
- (gr_line (start 144.018 137.372) (end 144.018 55.372) (layer Edge.Cuts) (width 0.1))
- (gr_arc (start 140.018 137.372) (end 140.018 141.372) (angle -90) (layer Edge.Cuts) (width 0.1))
- (gr_arc (start 98.018 137.372) (end 94.018 137.372) (angle -90) (layer Edge.Cuts) (width 0.1))
(gr_line (start 94.018 55.372) (end 94.018 137.372) (layer Edge.Cuts) (width 0.1))
+ (gr_arc (start 140.018 137.372) (end 140.018 141.372) (angle -90) (layer Edge.Cuts) (width 0.1))
+ (gr_line (start 144.018 137.372) (end 144.018 55.372) (layer Edge.Cuts) (width 0.1))
+ (gr_arc (start 140.018 55.372) (end 144.018 55.372) (angle -90) (layer Edge.Cuts) (width 0.1))
(gr_arc (start 98.018 55.372) (end 98.018 51.372) (angle -90) (layer Edge.Cuts) (width 0.1))
(gr_circle (center 119.053327 61.372) (end 119.053327 59.771999) (layer Edge.Cuts) (width 0.1))
- (dimension 89.916 (width 0.3) (layer Margin)
- (gr_text "89.916 mm" (at 163.898 96.266 270) (layer Margin)
+ (dimension 50.0001 (width 0.3) (layer Margin)
+ (gr_text "50.000 mm" (at 118.973596 42.647849 0.1145914062) (layer Margin)
(effects (font (size 1.5 1.5) (thickness 0.3)))
)
- (feature1 (pts (xy 139.954 141.224) (xy 162.384421 141.224)))
- (feature2 (pts (xy 139.954 51.308) (xy 162.384421 51.308)))
- (crossbar (pts (xy 161.798 51.308) (xy 161.798 141.224)))
- (arrow1a (pts (xy 161.798 141.224) (xy 161.211579 140.097496)))
- (arrow1b (pts (xy 161.798 141.224) (xy 162.384421 140.097496)))
- (arrow2a (pts (xy 161.798 51.308) (xy 161.211579 52.434504)))
- (arrow2b (pts (xy 161.798 51.308) (xy 162.384421 52.434504)))
+ (feature1 (pts (xy 144 55.8) (xy 143.976623 44.111426)))
+ (feature2 (pts (xy 94 55.9) (xy 93.976623 44.211426)))
+ (crossbar (pts (xy 93.977796 44.797845) (xy 143.977796 44.697845)))
+ (arrow1a (pts (xy 143.977796 44.697845) (xy 142.852467 45.286518)))
+ (arrow1b (pts (xy 143.977796 44.697845) (xy 142.850122 44.113678)))
+ (arrow2a (pts (xy 93.977796 44.797845) (xy 95.10547 45.382012)))
+ (arrow2b (pts (xy 93.977796 44.797845) (xy 95.103125 44.209172)))
)
- (dimension 50.038 (width 0.3) (layer Margin)
- (gr_text "50.038 mm" (at 118.999 41.334) (layer Margin)
+ (dimension 90.000056 (width 0.3) (layer Margin)
+ (gr_text "90.000 mm" (at 154.701205 96.38361 270.063662) (layer Margin)
(effects (font (size 1.5 1.5) (thickness 0.3)))
)
- (feature1 (pts (xy 144.018 55.88) (xy 144.018 42.847579)))
- (feature2 (pts (xy 93.98 55.88) (xy 93.98 42.847579)))
- (crossbar (pts (xy 93.98 43.434) (xy 144.018 43.434)))
- (arrow1a (pts (xy 144.018 43.434) (xy 142.891496 44.020421)))
- (arrow1b (pts (xy 144.018 43.434) (xy 142.891496 42.847579)))
- (arrow2a (pts (xy 93.98 43.434) (xy 95.106504 44.020421)))
- (arrow2b (pts (xy 93.98 43.434) (xy 95.106504 42.847579)))
+ (feature1 (pts (xy 140 141.4) (xy 153.237627 141.385292)))
+ (feature2 (pts (xy 139.9 51.4) (xy 153.137627 51.385292)))
+ (crossbar (pts (xy 152.551206 51.385943) (xy 152.651206 141.385943)))
+ (arrow1a (pts (xy 152.651206 141.385943) (xy 152.063534 140.260092)))
+ (arrow1b (pts (xy 152.651206 141.385943) (xy 153.236375 140.258788)))
+ (arrow2a (pts (xy 152.551206 51.385943) (xy 151.966037 52.513098)))
+ (arrow2b (pts (xy 152.551206 51.385943) (xy 153.138878 52.511794)))
)
+ (gr_circle (center 119.053327 131.372) (end 119.053327 129.772) (layer Edge.Cuts) (width 0.1))
+ (gr_arc (start 98.018 137.372) (end 94.018 137.372) (angle -90) (layer Edge.Cuts) (width 0.1))
(gr_text swithBoard (at 136.652 124.968 90) (layer F.SilkS)
(effects (font (size 1.5 1.5) (thickness 0.3)))
)
diff --git a/switches/switches.xml b/switches/switches.xml
new file mode 100644
index 0000000..2cb79f1
--- /dev/null
+++ b/switches/switches.xml
@@ -0,0 +1,643 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<export version="D">
+ <design>
+ <source>/home/easwaran/allProjects/kicad/openplc_modules/switches/switches.sch</source>
+ <date>Mon 21 Jan 2019 01:25:31 PM IST</date>
+ <tool>Eeschema 5.0.1</tool>
+ <sheet number="1" name="/" tstamps="/">
+ <title_block>
+ <title/>
+ <company/>
+ <rev/>
+ <date/>
+ <source>switches.sch</source>
+ <comment number="1" value=""/>
+ <comment number="2" value=""/>
+ <comment number="3" value=""/>
+ <comment number="4" value=""/>
+ </title_block>
+ </sheet>
+ </design>
+ <components>
+ <comp ref="J2">
+ <value>Conn_01x01_Female</value>
+ <footprint>Wire_Pads:SolderWirePad_single_SMD_5x10mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x01_Female" description="Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3723A2</tstamp>
+ </comp>
+ <comp ref="J3">
+ <value>Conn_01x01_Female</value>
+ <footprint>Wire_Pads:SolderWirePad_single_SMD_5x10mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x01_Female" description="Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3723D4</tstamp>
+ </comp>
+ <comp ref="J4">
+ <value>Conn_01x01_Female</value>
+ <footprint>Wire_Pads:SolderWirePad_single_SMD_5x10mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x01_Female" description="Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3723EA</tstamp>
+ </comp>
+ <comp ref="J5">
+ <value>Conn_01x01_Female</value>
+ <footprint>Wire_Pads:SolderWirePad_single_SMD_5x10mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x01_Female" description="Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C372402</tstamp>
+ </comp>
+ <comp ref="J6">
+ <value>Conn_01x01_Female</value>
+ <footprint>Wire_Pads:SolderWirePad_single_SMD_5x10mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x01_Female" description="Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C37241C</tstamp>
+ </comp>
+ <comp ref="J7">
+ <value>Conn_01x01_Female</value>
+ <footprint>Wire_Pads:SolderWirePad_single_SMD_5x10mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x01_Female" description="Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C372438</tstamp>
+ </comp>
+ <comp ref="J8">
+ <value>Conn_01x01_Female</value>
+ <footprint>Wire_Pads:SolderWirePad_single_SMD_5x10mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x01_Female" description="Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C372456</tstamp>
+ </comp>
+ <comp ref="J9">
+ <value>Conn_01x01_Female</value>
+ <footprint>Wire_Pads:SolderWirePad_single_SMD_5x10mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x01_Female" description="Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C372476</tstamp>
+ </comp>
+ <comp ref="J10">
+ <value>Conn_01x01_Female</value>
+ <footprint>Wire_Pads:SolderWirePad_single_SMD_5x10mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x01_Female" description="Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C372498</tstamp>
+ </comp>
+ <comp ref="J11">
+ <value>Conn_01x01_Female</value>
+ <footprint>Wire_Pads:SolderWirePad_single_SMD_5x10mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x01_Female" description="Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3724BC</tstamp>
+ </comp>
+ <comp ref="J12">
+ <value>Conn_01x01_Female</value>
+ <footprint>Wire_Pads:SolderWirePad_single_SMD_5x10mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x01_Female" description="Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3724E2</tstamp>
+ </comp>
+ <comp ref="Q1">
+ <value>2N7002</value>
+ <footprint>TO_SOT_Packages_SMD:SOT-23</footprint>
+ <datasheet>https://www.fairchildsemi.com/datasheets/2N/2N7002.pdf</datasheet>
+ <libsource lib="Transistor_FET" part="2N7002" description="0.115A Id, 60V Vds, N-channel MOSFET, SOT-23"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3870DE</tstamp>
+ </comp>
+ <comp ref="Q2">
+ <value>2N7002</value>
+ <footprint>TO_SOT_Packages_SMD:SOT-23</footprint>
+ <datasheet>https://www.fairchildsemi.com/datasheets/2N/2N7002.pdf</datasheet>
+ <libsource lib="Transistor_FET" part="2N7002" description="0.115A Id, 60V Vds, N-channel MOSFET, SOT-23"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3871FB</tstamp>
+ </comp>
+ <comp ref="Q3">
+ <value>2N7002</value>
+ <footprint>TO_SOT_Packages_SMD:SOT-23</footprint>
+ <datasheet>https://www.fairchildsemi.com/datasheets/2N/2N7002.pdf</datasheet>
+ <libsource lib="Transistor_FET" part="2N7002" description="0.115A Id, 60V Vds, N-channel MOSFET, SOT-23"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C387243</tstamp>
+ </comp>
+ <comp ref="R1">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C388E52</tstamp>
+ </comp>
+ <comp ref="R2">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C38A292</tstamp>
+ </comp>
+ <comp ref="R3">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C38A2F8</tstamp>
+ </comp>
+ <comp ref="D1">
+ <value>LED</value>
+ <footprint>LEDs:LED_1206_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C38A8BF</tstamp>
+ </comp>
+ <comp ref="D2">
+ <value>LED</value>
+ <footprint>LEDs:LED_1206_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C38AAB2</tstamp>
+ </comp>
+ <comp ref="D3">
+ <value>LED</value>
+ <footprint>LEDs:LED_1206_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C38AB24</tstamp>
+ </comp>
+ <comp ref="Q4">
+ <value>2N7002</value>
+ <footprint>TO_SOT_Packages_SMD:SOT-23</footprint>
+ <datasheet>https://www.fairchildsemi.com/datasheets/2N/2N7002.pdf</datasheet>
+ <libsource lib="Transistor_FET" part="2N7002" description="0.115A Id, 60V Vds, N-channel MOSFET, SOT-23"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C39061D</tstamp>
+ </comp>
+ <comp ref="Q5">
+ <value>2N7002</value>
+ <footprint>TO_SOT_Packages_SMD:SOT-23</footprint>
+ <datasheet>https://www.fairchildsemi.com/datasheets/2N/2N7002.pdf</datasheet>
+ <libsource lib="Transistor_FET" part="2N7002" description="0.115A Id, 60V Vds, N-channel MOSFET, SOT-23"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C390624</tstamp>
+ </comp>
+ <comp ref="Q6">
+ <value>2N7002</value>
+ <footprint>TO_SOT_Packages_SMD:SOT-23</footprint>
+ <datasheet>https://www.fairchildsemi.com/datasheets/2N/2N7002.pdf</datasheet>
+ <libsource lib="Transistor_FET" part="2N7002" description="0.115A Id, 60V Vds, N-channel MOSFET, SOT-23"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C39062B</tstamp>
+ </comp>
+ <comp ref="R4">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C390638</tstamp>
+ </comp>
+ <comp ref="R5">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C39063F</tstamp>
+ </comp>
+ <comp ref="R6">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C390646</tstamp>
+ </comp>
+ <comp ref="D4">
+ <value>LED</value>
+ <footprint>LEDs:LED_1206_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C39064D</tstamp>
+ </comp>
+ <comp ref="D5">
+ <value>LED</value>
+ <footprint>LEDs:LED_1206_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C390654</tstamp>
+ </comp>
+ <comp ref="D6">
+ <value>LED</value>
+ <footprint>LEDs:LED_1206_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C39065B</tstamp>
+ </comp>
+ <comp ref="J1">
+ <value>switchesOut</value>
+ <footprint>Socket_Strips:Socket_Strip_Straight_1x12_Pitch2.54mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x12_Male" description="Generic connector, single row, 01x12, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C396434</tstamp>
+ </comp>
+ <comp ref="R7">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C397AB8</tstamp>
+ </comp>
+ <comp ref="R8">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3988CF</tstamp>
+ </comp>
+ <comp ref="R9">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C39A9E7</tstamp>
+ </comp>
+ <comp ref="R10">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C39C1DB</tstamp>
+ </comp>
+ <comp ref="R11">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C39DE34</tstamp>
+ </comp>
+ <comp ref="R12">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C39F801</tstamp>
+ </comp>
+ <comp ref="R13">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3C2B3D</tstamp>
+ </comp>
+ <comp ref="D7">
+ <value>LED</value>
+ <footprint>LEDs:LED_1206_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3C2B44</tstamp>
+ </comp>
+ <comp ref="R14">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3C3A43</tstamp>
+ </comp>
+ <comp ref="D8">
+ <value>LED</value>
+ <footprint>LEDs:LED_1206_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3C3A4A</tstamp>
+ </comp>
+ <comp ref="R15">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3C4B6D</tstamp>
+ </comp>
+ <comp ref="D9">
+ <value>LED</value>
+ <footprint>LEDs:LED_1206_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3C4B74</tstamp>
+ </comp>
+ <comp ref="R16">
+ <value>R_US</value>
+ <footprint>Resistors_SMD:R_0805_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R_US" description="Resistor, US symbol"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3C5E5B</tstamp>
+ </comp>
+ <comp ref="D10">
+ <value>LED</value>
+ <footprint>LEDs:LED_1206_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3C5E62</tstamp>
+ </comp>
+ </components>
+ <libparts>
+ <libpart lib="Connector" part="Conn_01x01_Female">
+ <description>Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>Connector*:*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">J</field>
+ <field name="Value">Conn_01x01_Female</field>
+ </fields>
+ <pins>
+ <pin num="1" name="Pin_1" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Connector" part="Conn_01x12_Male">
+ <description>Generic connector, single row, 01x12, script generated (kicad-library-utils/schlib/autogen/connector/)</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>Connector*:*_1x??_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">J</field>
+ <field name="Value">Conn_01x12_Male</field>
+ </fields>
+ <pins>
+ <pin num="1" name="Pin_1" type="passive"/>
+ <pin num="2" name="Pin_2" type="passive"/>
+ <pin num="3" name="Pin_3" type="passive"/>
+ <pin num="4" name="Pin_4" type="passive"/>
+ <pin num="5" name="Pin_5" type="passive"/>
+ <pin num="6" name="Pin_6" type="passive"/>
+ <pin num="7" name="Pin_7" type="passive"/>
+ <pin num="8" name="Pin_8" type="passive"/>
+ <pin num="9" name="Pin_9" type="passive"/>
+ <pin num="10" name="Pin_10" type="passive"/>
+ <pin num="11" name="Pin_11" type="passive"/>
+ <pin num="12" name="Pin_12" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Device" part="LED">
+ <description>Light emitting diode</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>LED*</fp>
+ <fp>LED_SMD:*</fp>
+ <fp>LED_THT:*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">D</field>
+ <field name="Value">LED</field>
+ </fields>
+ <pins>
+ <pin num="1" name="K" type="passive"/>
+ <pin num="2" name="A" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Device" part="R_US">
+ <description>Resistor, US symbol</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>R_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">R</field>
+ <field name="Value">R_US</field>
+ </fields>
+ <pins>
+ <pin num="1" name="~" type="passive"/>
+ <pin num="2" name="~" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Transistor_FET" part="BSS138">
+ <aliases>
+ <alias>2N7002</alias>
+ <alias>MMBF170</alias>
+ </aliases>
+ <description>50V Vds, 0.22A Id, N-channel MOSFET, SOT-23</description>
+ <docs>https://www.fairchildsemi.com/datasheets/BS/BSS138.pdf</docs>
+ <footprints>
+ <fp>SOT?23*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">Q</field>
+ <field name="Value">BSS138</field>
+ <field name="Footprint">Package_TO_SOT_SMD:SOT-23</field>
+ </fields>
+ <pins>
+ <pin num="1" name="G" type="input"/>
+ <pin num="2" name="S" type="passive"/>
+ <pin num="3" name="D" type="passive"/>
+ </pins>
+ </libpart>
+ </libparts>
+ <libraries>
+ <library logical="Connector">
+ <uri>/usr/share/kicad/library/Connector.lib</uri>
+ </library>
+ <library logical="Device">
+ <uri>/usr/share/kicad/library/Device.lib</uri>
+ </library>
+ <library logical="Transistor_FET">
+ <uri>/usr/share/kicad/library/Transistor_FET.lib</uri>
+ </library>
+ </libraries>
+ <nets>
+ <net code="1" name="/s1">
+ <node ref="J1" pin="2"/>
+ <node ref="R7" pin="1"/>
+ <node ref="J3" pin="1"/>
+ </net>
+ <net code="2" name="/s2">
+ <node ref="R8" pin="1"/>
+ <node ref="J4" pin="1"/>
+ <node ref="J1" pin="3"/>
+ </net>
+ <net code="3" name="/s3">
+ <node ref="J5" pin="1"/>
+ <node ref="R9" pin="1"/>
+ <node ref="J1" pin="4"/>
+ </net>
+ <net code="4" name="/s4">
+ <node ref="J1" pin="5"/>
+ <node ref="J6" pin="1"/>
+ <node ref="R10" pin="1"/>
+ </net>
+ <net code="5" name="Net-(D5-Pad1)">
+ <node ref="D5" pin="1"/>
+ <node ref="Q5" pin="3"/>
+ </net>
+ <net code="6" name="Net-(D6-Pad1)">
+ <node ref="D6" pin="1"/>
+ <node ref="Q6" pin="3"/>
+ </net>
+ <net code="7" name="Net-(D5-Pad2)">
+ <node ref="R5" pin="2"/>
+ <node ref="D5" pin="2"/>
+ </net>
+ <net code="8" name="Net-(D6-Pad2)">
+ <node ref="R6" pin="2"/>
+ <node ref="D6" pin="2"/>
+ </net>
+ <net code="9" name="+5V">
+ <node ref="R15" pin="1"/>
+ <node ref="R14" pin="1"/>
+ <node ref="R4" pin="1"/>
+ <node ref="R1" pin="1"/>
+ <node ref="R2" pin="1"/>
+ <node ref="R3" pin="1"/>
+ <node ref="R13" pin="1"/>
+ <node ref="J1" pin="12"/>
+ <node ref="R6" pin="1"/>
+ <node ref="R5" pin="1"/>
+ <node ref="R16" pin="1"/>
+ </net>
+ <net code="10" name="GND">
+ <node ref="Q3" pin="2"/>
+ <node ref="Q5" pin="2"/>
+ <node ref="Q2" pin="2"/>
+ <node ref="Q1" pin="2"/>
+ <node ref="Q6" pin="2"/>
+ <node ref="Q4" pin="2"/>
+ <node ref="J2" pin="1"/>
+ <node ref="J1" pin="1"/>
+ </net>
+ <net code="11" name="/s7">
+ <node ref="J9" pin="1"/>
+ <node ref="D9" pin="1"/>
+ <node ref="J1" pin="8"/>
+ </net>
+ <net code="12" name="Net-(D9-Pad2)">
+ <node ref="R15" pin="2"/>
+ <node ref="D9" pin="2"/>
+ </net>
+ <net code="13" name="/s8">
+ <node ref="J1" pin="9"/>
+ <node ref="D10" pin="1"/>
+ <node ref="J10" pin="1"/>
+ </net>
+ <net code="14" name="Net-(D10-Pad2)">
+ <node ref="R16" pin="2"/>
+ <node ref="D10" pin="2"/>
+ </net>
+ <net code="15" name="/s5">
+ <node ref="J7" pin="1"/>
+ <node ref="J1" pin="6"/>
+ <node ref="D7" pin="1"/>
+ </net>
+ <net code="16" name="/s9">
+ <node ref="R11" pin="1"/>
+ <node ref="J11" pin="1"/>
+ <node ref="J1" pin="10"/>
+ </net>
+ <net code="17" name="/s10">
+ <node ref="J12" pin="1"/>
+ <node ref="R12" pin="1"/>
+ <node ref="J1" pin="11"/>
+ </net>
+ <net code="18" name="Net-(D4-Pad1)">
+ <node ref="D4" pin="1"/>
+ <node ref="Q4" pin="3"/>
+ </net>
+ <net code="19" name="Net-(D7-Pad2)">
+ <node ref="R13" pin="2"/>
+ <node ref="D7" pin="2"/>
+ </net>
+ <net code="20" name="/s6">
+ <node ref="J8" pin="1"/>
+ <node ref="D8" pin="1"/>
+ <node ref="J1" pin="7"/>
+ </net>
+ <net code="21" name="Net-(D8-Pad2)">
+ <node ref="D8" pin="2"/>
+ <node ref="R14" pin="2"/>
+ </net>
+ <net code="22" name="Net-(Q3-Pad1)">
+ <node ref="Q3" pin="1"/>
+ <node ref="R9" pin="2"/>
+ </net>
+ <net code="23" name="Net-(Q1-Pad1)">
+ <node ref="R7" pin="2"/>
+ <node ref="Q1" pin="1"/>
+ </net>
+ <net code="24" name="Net-(Q2-Pad1)">
+ <node ref="Q2" pin="1"/>
+ <node ref="R8" pin="2"/>
+ </net>
+ <net code="25" name="Net-(D1-Pad1)">
+ <node ref="Q1" pin="3"/>
+ <node ref="D1" pin="1"/>
+ </net>
+ <net code="26" name="Net-(D1-Pad2)">
+ <node ref="D1" pin="2"/>
+ <node ref="R1" pin="2"/>
+ </net>
+ <net code="27" name="Net-(Q4-Pad1)">
+ <node ref="Q4" pin="1"/>
+ <node ref="R10" pin="2"/>
+ </net>
+ <net code="28" name="Net-(Q5-Pad1)">
+ <node ref="Q5" pin="1"/>
+ <node ref="R11" pin="2"/>
+ </net>
+ <net code="29" name="Net-(Q6-Pad1)">
+ <node ref="R12" pin="2"/>
+ <node ref="Q6" pin="1"/>
+ </net>
+ <net code="30" name="Net-(D4-Pad2)">
+ <node ref="D4" pin="2"/>
+ <node ref="R4" pin="2"/>
+ </net>
+ <net code="31" name="Net-(D2-Pad1)">
+ <node ref="Q2" pin="3"/>
+ <node ref="D2" pin="1"/>
+ </net>
+ <net code="32" name="Net-(D2-Pad2)">
+ <node ref="R2" pin="2"/>
+ <node ref="D2" pin="2"/>
+ </net>
+ <net code="33" name="Net-(D3-Pad1)">
+ <node ref="Q3" pin="3"/>
+ <node ref="D3" pin="1"/>
+ </net>
+ <net code="34" name="Net-(D3-Pad2)">
+ <node ref="R3" pin="2"/>
+ <node ref="D3" pin="2"/>
+ </net>
+ </nets>
+</export>
diff --git a/traffic/bom/ibom.html b/traffic/bom/ibom.html
new file mode 100644
index 0000000..b092f48
--- /dev/null
+++ b/traffic/bom/ibom.html
@@ -0,0 +1,2388 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Interactive BOM for KiCAD</title>
+ <style type="text/css">
+:root {
+ --pcb-edge-color: black;
+ --pad-color: #878787;
+ --pad-color-highlight: #D04040;
+ --pin1-outline-color: #ffb629;
+ --pin1-outline-color-highlight: #b4ff03;
+}
+
+html, body {
+ margin: 0px;
+ height: 100%;
+ font-family: Verdana, sans-serif;
+}
+
+.dark {
+ --pcb-edge-color: #eee;
+ --pad-color: #808080;
+ --pin1-outline-color: #ffa800;
+ --pin1-outline-color-highlight: #ccff00;
+ background-color: #252c30;
+ color: #eee;
+}
+
+button {
+ background-color: #eee;
+ border: 1px solid #888;
+ color: black;
+ height: 44px;
+ width: 44px;
+ text-align: center;
+ text-decoration: none;
+ display: inline-block;
+ font-size: 14px;
+ font-weight: bolder;
+}
+
+.dark button {
+ /* This will be inverted */
+ background-color: #c3b7b5;
+}
+
+button.depressed {
+ background-color: #0a0;
+ color: white;
+}
+
+.dark button.depressed {
+ /* This will be inverted */
+ background-color: #b3b;
+}
+
+button:focus {
+ outline: 0;
+}
+
+button#tb-btn {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' fill='none' stroke='%23000' stroke-width='.4' stroke-linejoin='round'/%3E%3Cpath d='M1.32 290.12h5.82M1.32 291.45h5.82' fill='none' stroke='%23000' stroke-width='.4'/%3E%3Cpath d='M4.37 292.5v4.23M.26 292.63H8.2' fill='none' stroke='%23000' stroke-width='.3'/%3E%3Ctext font-weight='700' font-size='3.17' font-family='sans-serif'%3E%3Ctspan x='1.35' y='295.73'%3EF%3C/tspan%3E%3Ctspan x='5.03' y='295.68'%3EB%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E%0A");
+ background-size: 32px 32px;
+ background-position: 5px 5px;
+ background-repeat: no-repeat;
+}
+
+button#lr-btn {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' fill='none' stroke='%23000' stroke-width='.4' stroke-linejoin='round'/%3E%3Cpath d='M1.06 290.12H3.7m-2.64 1.33H3.7m-2.64 1.32H3.7m-2.64 1.3H3.7m-2.64 1.33H3.7' fill='none' stroke='%23000' stroke-width='.4'/%3E%3Cpath d='M4.37 288.8v7.94m0-4.11h3.96' fill='none' stroke='%23000' stroke-width='.3'/%3E%3Ctext font-weight='700' font-size='3.17' font-family='sans-serif'%3E%3Ctspan x='5.11' y='291.96'%3EF%3C/tspan%3E%3Ctspan x='5.03' y='295.68'%3EB%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E%0A");
+ background-size: 32px 32px;
+ background-position: 5px 5px;
+ background-repeat: no-repeat;
+}
+
+button#bom-btn {
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)' fill='none' stroke='%23000' stroke-width='.4'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' stroke-linejoin='round'/%3E%3Cpath d='M1.59 290.12h5.29M1.59 291.45h5.33M1.59 292.75h5.33M1.59 294.09h5.33M1.59 295.41h5.33'/%3E%3C/g%3E%3C/svg%3E");
+ background-size: 32px 32px;
+ background-position: 5px 5px;
+ background-repeat: no-repeat;
+}
+
+button#copy {
+ background-image: url("data:image/svg+xml,%3Csvg height='48' viewBox='0 0 48 48' width='48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h48v48h-48z' fill='none'/%3E%3Cpath d='M32 2h-24c-2.21 0-4 1.79-4 4v28h4v-28h24v-4zm6 8h-22c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h22c2.21 0 4-1.79 4-4v-28c0-2.21-1.79-4-4-4zm0 32h-22v-28h22v28z'/%3E%3C/svg%3E");
+ background-position: 6px 6px;
+ background-repeat: no-repeat;
+ background-size: 26px 26px;
+ border-radius: 6px;
+ height: 40px;
+ width: 40px;
+ margin: 10px 5px;
+}
+
+button#copy:active {
+ box-shadow: inset 0px 0px 5px #6c6c6c;
+}
+
+textarea.clipboard-temp {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 2em;
+ height: 2em;
+ padding: 0;
+ border: None;
+ outline: None;
+ box-shadow: None;
+ background: transparent;
+}
+
+.left-most-button {
+ border-right: 0;
+ border-top-left-radius: 6px;
+ border-bottom-left-radius: 6px;
+}
+
+.middle-button {
+ border-right: 0;
+}
+
+.right-most-button {
+ border-top-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+}
+
+.button-container {
+ font-size: 0;
+}
+
+.dark .button-container {
+ filter: invert(1);
+}
+
+@media print {
+ .hideonprint {
+ display: none;
+ }
+}
+
+canvas {
+ cursor: crosshair;
+}
+
+canvas:active {
+ cursor: grabbing;
+}
+
+.fileinfo {
+ width: 100%;
+ max-width: 1000px;
+ border: none;
+ padding: 5px;
+}
+
+.fileinfo .title {
+ font-size: 20pt;
+ font-weight: bold;
+}
+
+.fileinfo td {
+ overflow: hidden;
+ white-space: nowrap;
+ max-width: 1px;
+ width: 50%;
+ text-overflow: ellipsis;
+}
+
+.bom {
+ border-collapse: collapse;
+ font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace;
+ font-size: 10pt;
+ table-layout: fixed;
+ width: 100%;
+ margin-top: 1px;
+}
+
+.bom th, .bom td {
+ border: 1px solid black;
+ padding: 5px;
+ word-wrap: break-word;
+ text-align: center;
+ position: relative;
+}
+
+.dark .bom th, .dark .bom td {
+ border: 1px solid #777;
+}
+
+.bom th {
+ background-color: #CCCCCC;
+ background-clip: padding-box;
+}
+
+.dark .bom th {
+ background-color: #3b4749;
+}
+
+.bom tr.highlighted:nth-child(n) {
+ background-color: #cfc;
+}
+
+.dark .bom tr.highlighted:nth-child(n) {
+ background-color: #226022;
+}
+
+.bom tr:nth-child(even) {
+ background-color: #f2f2f2;
+}
+
+.dark .bom tr:nth-child(even) {
+ background-color: #313b40;
+}
+
+.bom tr {
+ transition: background-color 0.2s;
+}
+
+.bom .numCol {
+ width: 25px;
+}
+
+.bom .Description {
+ width: 10%;
+}
+
+.bom .Part {
+ width: 10%;
+}
+
+.bom .Value {
+ width: 15%;
+}
+
+.bom .Quantity {
+ width: 65px;
+}
+
+.bom th .sortmark {
+ position: absolute;
+ right: 1px;
+ top: 1px;
+ margin-top: -5px;
+ border-width: 5px;
+ border-style: solid;
+ border-color: transparent transparent #221 transparent;
+ transform-origin: 50% 85%;
+ transition: opacity 0.2s, transform 0.4s;
+}
+
+.dark .bom th .sortmark {
+ filter: invert(1);
+}
+
+.bom th .sortmark.none {
+ opacity: 0;
+}
+
+.bom th .sortmark.desc {
+ transform: rotate(180deg);
+}
+
+.bom th:hover .sortmark.none {
+ opacity: 0.5;
+}
+
+.bom .bom-checkbox {
+ width: 30px;
+ position: relative;
+ user-select: none;
+ -moz-user-select: none;
+}
+
+.bom .bom-checkbox:before {
+ content: "";
+ position: absolute;
+ border-width: 15px;
+ border-style: solid;
+ border-color: #51829f transparent transparent transparent;
+ visibility: hidden;
+ top: -15px;
+}
+
+.bom .bom-checkbox:after {
+ content: "Double click to set/unset all";
+ position: absolute;
+ color: white;
+ top: -35px;
+ left: -26px;
+ background: #51829f;
+ padding: 5px 15px;
+ border-radius: 8px;
+ white-space: nowrap;
+ visibility: hidden;
+}
+
+.bom .bom-checkbox:hover:before, .bom .bom-checkbox:hover:after {
+ visibility: visible;
+ transition: visibility 0.2s linear 1s;
+}
+
+.split {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ overflow-y: auto;
+ overflow-x: hidden;
+ background-color: inherit;
+}
+
+.split.split-horizontal, .gutter.gutter-horizontal {
+ height: 100%;
+ float: left;
+}
+
+.gutter {
+ background-color: #ddd;
+ background-repeat: no-repeat;
+ background-position: 50%;
+ transition: background-color 0.3s;
+}
+
+.dark .gutter {
+ background-color: #777;
+}
+
+.gutter.gutter-horizontal {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
+ cursor: ew-resize;
+ width: 5px;
+}
+
+.gutter.gutter-vertical {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII=');
+ cursor: ns-resize;
+ height: 5px;
+}
+
+.searchbox {
+ float: left;
+ height: 40px;
+ margin: 10px 5px;
+ padding: 12px 32px;
+ font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace;
+ font-size: 18px;
+ box-sizing: border-box;
+ border: 1px solid #888;
+ border-radius: 6px;
+ outline: none;
+ background-color: #eee;
+ transition: background-color 0.2s, border 0.2s;
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABNklEQVQ4T8XSMUvDQBQH8P/LElFa/AIZHcTBQSz0I/gFstTBRR2KUC4ldDxw7h0Bl3RRUATxi4iiODgoiLNrbQYp5J6cpJJqomkX33Z37/14d/dIa33MzDuYI4johOI4XhyNRteO46zNYjDzAxE1yBZprVeZ+QbAUhXEGJMA2Ox2u4+fQIa0mPmsCgCgJYQ4t7lfgF0opQYAdv9ABkKI/UnOFCClXKjX61cA1osQY8x9kiRNKeV7IWA3oyhaSdP0FkAtjxhj3hzH2RBCPOf3pzqYHCilfAAX+URm9oMguPzeWSGQvUcMYC8rOBJCHBRdqxTo9/vbRHRqi8bj8XKv1xvODbiuW2u32/bvf0SlDv4XYOY7z/Mavu+nM1+BmQ+NMc0wDF/LprP0DbTWW0T00ul0nn4b7Q87+X4Qmfiq2wAAAABJRU5ErkJggg==');
+ background-position: 10px 10px;
+ background-repeat: no-repeat;
+}
+
+.dark .searchbox {
+ background-color: #111;
+ color: #eee;
+}
+
+.searchbox::placeholder {
+ color: #ccc;
+}
+
+.dark .searchbox::placeholder {
+ color: #666;
+}
+
+.filter {
+ width: calc(60% - 64px);
+}
+
+.reflookup {
+ width: calc(40% - 10px);
+}
+
+input[type=text]:focus {
+ background-color: white;
+ border: 1px solid #333;
+}
+
+.dark input[type=text]:focus {
+ background-color: #333;
+ border: 1px solid #ccc;
+}
+
+mark.highlight {
+ background-color: #5050ff;
+ color: #fff;
+ padding: 2px;
+ border-radius: 6px;
+}
+
+.dark mark.highlight {
+ background-color: #76a6da;
+ color: #111;
+}
+
+.menubtn {
+ background-color: white;
+ font-size: 16px;
+ border: none;
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 20 20'%3E%3Cpath fill='none' d='M0 0h20v20H0V0z'/%3E%3Cpath d='M15.95 10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12 2.34c-.03-.2-.2-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3 2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6 2.77c-.1.18-.06.39.1.51l1.69 1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37 12.1c-.15.12-.19.34-.1.51l1.6 2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3 2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47 1.35-.78l1.99.8c.18.07.39 0 .49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z'/%3E%3C/svg%3E%0A");
+ background-position: center;
+ background-repeat: no-repeat;
+}
+
+.dark .menubtn {
+ filter: invert(1);
+}
+
+.menu {
+ position: relative;
+ display: inline-block;
+}
+
+.menu-content {
+ display: none;
+ position: absolute;
+ background-color: white;
+ right: 0;
+ min-width: 300px;
+ box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
+ z-index: 100;
+ padding: 8px;
+}
+
+.dark .menu-content {
+ background-color: #111;
+}
+
+.menu:hover .menu-content {
+ display: block;
+}
+
+.menu:hover .menubtn {
+ background-color: #eee;
+}
+
+.dark .menu:hover .menubtn {}
+
+.menu-label {
+ display: inline-block;
+ padding: 8px;
+ border: 1px solid #ccc;
+ border-top: 0;
+ width: calc(100% - 18px);
+}
+
+.menu-label-top {
+ border-top: 1px solid #ccc;
+}
+
+.menu-textbox {
+ float: left;
+ height: 24px;
+ margin: 10px 5px;
+ padding: 5px 5px;
+ font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace;
+ font-size: 14px;
+ box-sizing: border-box;
+ border: 1px solid #888;
+ border-radius: 4px;
+ outline: none;
+ background-color: #eee;
+ transition: background-color 0.2s, border 0.2s;
+ width: calc(100% - 10px);
+}
+
+.dark .menu-textbox {
+ background-color: #222;
+ color: #eee;
+}
+
+#topmostdiv {
+ transition: background-color 0.3s;
+}
+
+#top {
+ height: 78px;
+ border-bottom: 2px solid black;
+}
+
+.dark #top {
+ border-bottom: 2px solid #ccc;
+}
+
+#dbg {
+ display: block;
+}
+
+::-webkit-scrollbar {
+ width: 8px;
+}
+
+::-webkit-scrollbar-track {
+ background: #aaa;
+}
+
+::-webkit-scrollbar-thumb {
+ background: #666;
+ border-radius: 3px;
+}
+
+::-webkit-scrollbar-thumb:hover {
+ background: #555;
+}
+
+.slider {
+ -webkit-appearance: none;
+ width: 100%;
+ margin: 3px 0;
+ padding: 0;
+ outline: none;
+ opacity: 0.7;
+ -webkit-transition: .2s;
+ transition: opacity .2s;
+ border-radius: 3px;
+}
+
+.slider:hover {
+ opacity: 1;
+}
+
+.slider:focus {
+ outline: none;
+}
+
+.slider::-webkit-slider-runnable-track {
+ -webkit-appearance: none;
+ width: 100%;
+ height: 8px;
+ background: #d3d3d3;
+ border-radius: 3px;
+ border: none;
+}
+
+.slider::-webkit-slider-thumb {
+ -webkit-appearance: none;
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ background: #0a0;
+ cursor: pointer;
+ margin-top: -4px;
+}
+
+.dark .slider::-webkit-slider-thumb {
+ background: #3d3;
+}
+
+.slider::-moz-range-thumb {
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ background: #0a0;
+ cursor: pointer;
+}
+
+.slider::-moz-range-track {
+ height: 8px;
+ background: #d3d3d3;
+ border-radius: 3px;
+}
+
+.dark .slider::-moz-range-thumb {
+ background: #3d3;
+}
+
+.slider::-ms-track {
+ width: 100%;
+ height: 8px;
+ border-width: 3px 0;
+ background: transparent;
+ border-color: transparent;
+ color: transparent;
+ transition: opacity .2s;
+}
+
+.slider::-ms-fill-lower {
+ background: #d3d3d3;
+ border: none;
+ border-radius: 3px;
+}
+
+.slider::-ms-fill-upper {
+ background: #d3d3d3;
+ border: none;
+ border-radius: 3px;
+}
+
+.slider::-ms-thumb {
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ background: #0a0;
+ cursor: pointer;
+ margin: 0;
+}
+
+.shameless-plug {
+ font-size: 0.8em;
+ text-align: center;
+ display: block;
+}
+
+.shameless-plug a {
+ color: #0278a4;
+}
+
+.dark .shameless-plug a {
+ color: #00b9fd;
+}
+
+ </style>
+ <script type="text/javascript" >
+///////////////////////////////////////////////
+/*
+ Split.js - v1.3.5
+ MIT License
+ https://github.com/nathancahill/Split.js
+*/
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Split=t()}(this,function(){"use strict";var e=window,t=e.document,n="addEventListener",i="removeEventListener",r="getBoundingClientRect",s=function(){return!1},o=e.attachEvent&&!e[n],a=["","-webkit-","-moz-","-o-"].filter(function(e){var n=t.createElement("div");return n.style.cssText="width:"+e+"calc(9px)",!!n.style.length}).shift()+"calc",l=function(e){return"string"==typeof e||e instanceof String?t.querySelector(e):e};return function(u,c){function z(e,t,n){var i=A(y,t,n);Object.keys(i).forEach(function(t){return e.style[t]=i[t]})}function h(e,t){var n=B(y,t);Object.keys(n).forEach(function(t){return e.style[t]=n[t]})}function f(e){var t=E[this.a],n=E[this.b],i=t.size+n.size;t.size=e/this.size*i,n.size=i-e/this.size*i,z(t.element,t.size,this.aGutterSize),z(n.element,n.size,this.bGutterSize)}function m(e){var t;this.dragging&&((t="touches"in e?e.touches[0][b]-this.start:e[b]-this.start)<=E[this.a].minSize+M+this.aGutterSize?t=E[this.a].minSize+this.aGutterSize:t>=this.size-(E[this.b].minSize+M+this.bGutterSize)&&(t=this.size-(E[this.b].minSize+this.bGutterSize)),f.call(this,t),c.onDrag&&c.onDrag())}function g(){var e=E[this.a].element,t=E[this.b].element;this.size=e[r]()[y]+t[r]()[y]+this.aGutterSize+this.bGutterSize,this.start=e[r]()[G]}function d(){var t=this,n=E[t.a].element,r=E[t.b].element;t.dragging&&c.onDragEnd&&c.onDragEnd(),t.dragging=!1,e[i]("mouseup",t.stop),e[i]("touchend",t.stop),e[i]("touchcancel",t.stop),t.parent[i]("mousemove",t.move),t.parent[i]("touchmove",t.move),delete t.stop,delete t.move,n[i]("selectstart",s),n[i]("dragstart",s),r[i]("selectstart",s),r[i]("dragstart",s),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",t.gutter.style.cursor="",t.parent.style.cursor=""}function S(t){var i=this,r=E[i.a].element,o=E[i.b].element;!i.dragging&&c.onDragStart&&c.onDragStart(),t.preventDefault(),i.dragging=!0,i.move=m.bind(i),i.stop=d.bind(i),e[n]("mouseup",i.stop),e[n]("touchend",i.stop),e[n]("touchcancel",i.stop),i.parent[n]("mousemove",i.move),i.parent[n]("touchmove",i.move),r[n]("selectstart",s),r[n]("dragstart",s),o[n]("selectstart",s),o[n]("dragstart",s),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",i.gutter.style.cursor=j,i.parent.style.cursor=j,g.call(i)}function v(e){e.forEach(function(t,n){if(n>0){var i=F[n-1],r=E[i.a],s=E[i.b];r.size=e[n-1],s.size=t,z(r.element,r.size,i.aGutterSize),z(s.element,s.size,i.bGutterSize)}})}function p(){F.forEach(function(e){e.parent.removeChild(e.gutter),E[e.a].element.style[y]="",E[e.b].element.style[y]=""})}void 0===c&&(c={});var y,b,G,E,w=l(u[0]).parentNode,D=e.getComputedStyle(w).flexDirection,U=c.sizes||u.map(function(){return 100/u.length}),k=void 0!==c.minSize?c.minSize:100,x=Array.isArray(k)?k:u.map(function(){return k}),L=void 0!==c.gutterSize?c.gutterSize:10,M=void 0!==c.snapOffset?c.snapOffset:30,O=c.direction||"horizontal",j=c.cursor||("horizontal"===O?"ew-resize":"ns-resize"),C=c.gutter||function(e,n){var i=t.createElement("div");return i.className="gutter gutter-"+n,i},A=c.elementStyle||function(e,t,n){var i={};return"string"==typeof t||t instanceof String?i[e]=t:i[e]=o?t+"%":a+"("+t+"% - "+n+"px)",i},B=c.gutterStyle||function(e,t){return n={},n[e]=t+"px",n;var n};"horizontal"===O?(y="width","clientWidth",b="clientX",G="left","paddingLeft"):"vertical"===O&&(y="height","clientHeight",b="clientY",G="top","paddingTop");var F=[];return E=u.map(function(e,t){var i,s={element:l(e),size:U[t],minSize:x[t]};if(t>0&&(i={a:t-1,b:t,dragging:!1,isFirst:1===t,isLast:t===u.length-1,direction:O,parent:w},i.aGutterSize=L,i.bGutterSize=L,i.isFirst&&(i.aGutterSize=L/2),i.isLast&&(i.bGutterSize=L/2),"row-reverse"===D||"column-reverse"===D)){var a=i.a;i.a=i.b,i.b=a}if(!o&&t>0){var c=C(t,O);h(c,L),c[n]("mousedown",S.bind(i)),c[n]("touchstart",S.bind(i)),w.insertBefore(c,s.element),i.gutter=c}0===t||t===u.length-1?z(s.element,s.size,L/2):z(s.element,s.size,L);var f=s.element[r]()[y];return f<s.minSize&&(s.minSize=f),t>0&&F.push(i),s}),o?{setSizes:v,destroy:p}:{setSizes:v,getSizes:function(){return E.map(function(e){return e.size})},collapse:function(e){if(e===F.length){var t=F[e-1];g.call(t),o||f.call(t,t.size-t.bGutterSize)}else{var n=F[e];g.call(n),o||f.call(n,n.aGutterSize)}},destroy:p}}});
+
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+var config = {"redraw_on_drag": true, "highlight_pin1": false, "extra_fields": [], "dark_mode": false, "bom_view": "left-right", "board_rotation": 0.0, "checkboxes": "Sourced,Placed", "show_silkscreen": true, "layer_view": "FB"}
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+var pcbdata = {"font_data": {"+": {"l": [[[0.23809523809523814, -0.42857142857142855], [1.0, -0.42857142857142855]], [[0.6190476190476191, -0.047619047619047616], [0.6190476190476191, -0.8095238095238095]]], "w": 1.2380952380952381}, "1": {"l": [[[0.7619047619047619, -0.047619047619047616], [0.19047619047619047, -0.047619047619047616]], [[0.47619047619047616, -0.047619047619047616], [0.47619047619047616, -1.0476190476190474], [0.38095238095238093, -0.9047619047619047], [0.2857142857142857, -0.8095238095238095], [0.19047619047619047, -0.7619047619047619]]], "w": 0.9523809523809523}, "2": {"l": [[[0.19047619047619047, -0.9523809523809523], [0.23809523809523808, -1.0], [0.3333333333333333, -1.0476190476190474], [0.5714285714285714, -1.0476190476190474], [0.6666666666666666, -1.0], [0.7142857142857142, -0.9523809523809523], [0.7619047619047619, -0.8571428571428571], [0.7619047619047619, -0.7619047619047619], [0.7142857142857142, -0.6190476190476191], [0.14285714285714285, -0.047619047619047616], [0.7619047619047619, -0.047619047619047616]]], "w": 0.9523809523809523}, "5": {"l": [[[0.7142857142857142, -1.0476190476190474], [0.23809523809523808, -1.0476190476190474], [0.19047619047619047, -0.5714285714285714], [0.23809523809523808, -0.6190476190476191], [0.3333333333333333, -0.6666666666666666], [0.5714285714285714, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.7619047619047619, -0.47619047619047616], [0.7619047619047619, -0.23809523809523808], [0.7142857142857142, -0.14285714285714285], [0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.14285714285714285]]], "w": 0.9523809523809523}, "E": {"l": [[[0.23809523809523808, -0.5714285714285714], [0.5714285714285714, -0.5714285714285714]], [[0.7142857142857142, -0.047619047619047616], [0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474], [0.7142857142857142, -1.0476190476190474]]], "w": 0.9047619047619047}, "D": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.4761904761904761, -1.0476190476190474], [0.619047619047619, -1.0], [0.7142857142857142, -0.9047619047619047], [0.7619047619047619, -0.8095238095238095], [0.8095238095238094, -0.6190476190476191], [0.8095238095238094, -0.47619047619047616], [0.7619047619047619, -0.2857142857142857], [0.7142857142857142, -0.19047619047619047], [0.619047619047619, -0.09523809523809523], [0.4761904761904761, -0.047619047619047616], [0.23809523809523803, -0.047619047619047616]]], "w": 1.0}, "G": {"l": [[[0.7619047619047619, -1.0], [0.6666666666666666, -1.0476190476190474], [0.5238095238095237, -1.0476190476190474], [0.38095238095238093, -1.0], [0.2857142857142857, -0.9047619047619047], [0.23809523809523808, -0.8095238095238095], [0.19047619047619047, -0.6190476190476191], [0.19047619047619047, -0.47619047619047616], [0.23809523809523808, -0.2857142857142857], [0.2857142857142857, -0.19047619047619047], [0.38095238095238093, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.6190476190476191, -0.047619047619047616], [0.7619047619047619, -0.09523809523809523], [0.8095238095238095, -0.14285714285714285], [0.8095238095238095, -0.47619047619047616], [0.6190476190476191, -0.47619047619047616]]], "w": 1.0}, "F": {"l": [[[0.5714285714285714, -0.5714285714285714], [0.23809523809523808, -0.5714285714285714]], [[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474], [0.7142857142857142, -1.0476190476190474]]], "w": 0.8571428571428571}, "J": {"l": [[[0.5238095238095237, -1.0476190476190474], [0.5238095238095237, -0.3333333333333333], [0.47619047619047616, -0.19047619047619047], [0.38095238095238093, -0.09523809523809523], [0.23809523809523808, -0.047619047619047616], [0.14285714285714285, -0.047619047619047616]]], "w": 0.7619047619047619}, "L": {"l": [[[0.7142857142857142, -0.047619047619047616], [0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474]]], "w": 0.8095238095238095}, "O": {"l": [[[0.4285714285714285, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.8095238095238094, -0.9047619047619047], [0.857142857142857, -0.7142857142857142], [0.857142857142857, -0.38095238095238093], [0.8095238095238094, -0.19047619047619047], [0.7142857142857142, -0.09523809523809523], [0.619047619047619, -0.047619047619047616], [0.4285714285714285, -0.047619047619047616], [0.33333333333333326, -0.09523809523809523], [0.23809523809523803, -0.19047619047619047], [0.1904761904761904, -0.38095238095238093], [0.1904761904761904, -0.7142857142857142], [0.23809523809523803, -0.9047619047619047], [0.33333333333333326, -1.0], [0.4285714285714285, -1.0476190476190474]]], "w": 1.0476190476190474}, "N": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.8095238095238094, -0.047619047619047616], [0.8095238095238094, -1.0476190476190474]]], "w": 1.0476190476190474}, "P": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.7619047619047619, -0.9523809523809523], [0.8095238095238094, -0.8571428571428571], [0.8095238095238094, -0.7142857142857142], [0.7619047619047619, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.619047619047619, -0.5238095238095237], [0.23809523809523803, -0.5238095238095237]]], "w": 1.0}, "S": {"l": [[[0.19047619047619047, -0.09523809523809523], [0.3333333333333333, -0.047619047619047616], [0.5714285714285714, -0.047619047619047616], [0.6666666666666666, -0.09523809523809523], [0.7142857142857142, -0.14285714285714285], [0.7619047619047619, -0.23809523809523808], [0.7619047619047619, -0.3333333333333333], [0.7142857142857142, -0.42857142857142855], [0.6666666666666666, -0.47619047619047616], [0.5714285714285714, -0.5238095238095237], [0.38095238095238093, -0.5714285714285714], [0.2857142857142857, -0.6190476190476191], [0.23809523809523808, -0.6666666666666666], [0.19047619047619047, -0.7619047619047619], [0.19047619047619047, -0.8571428571428571], [0.23809523809523808, -0.9523809523809523], [0.2857142857142857, -1.0], [0.38095238095238093, -1.0476190476190474], [0.6190476190476191, -1.0476190476190474], [0.7619047619047619, -1.0]]], "w": 0.9523809523809523}, "R": {"l": [[[0.8095238095238094, -0.047619047619047616], [0.4761904761904761, -0.5238095238095237]], [[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.7619047619047619, -0.9523809523809523], [0.8095238095238094, -0.8571428571428571], [0.8095238095238094, -0.7142857142857142], [0.7619047619047619, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.619047619047619, -0.5238095238095237], [0.23809523809523803, -0.5238095238095237]]], "w": 1.0}, "T": {"l": [[[0.09523809523809523, -1.0476190476190474], [0.6666666666666666, -1.0476190476190474]], [[0.38095238095238093, -0.047619047619047616], [0.38095238095238093, -1.0476190476190474]]], "w": 0.7619047619047619}, "V": {"l": [[[0.09523809523809523, -1.0476190476190474], [0.42857142857142855, -0.047619047619047616], [0.7619047619047619, -1.0476190476190474]]], "w": 0.8571428571428571}, "a": {"l": [[[0.6666666666666666, -0.047619047619047616], [0.6666666666666666, -0.5714285714285714], [0.6190476190476191, -0.6666666666666666], [0.5238095238095237, -0.7142857142857142], [0.3333333333333333, -0.7142857142857142], [0.23809523809523808, -0.6666666666666666]], [[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.19047619047619047], [0.19047619047619047, -0.2857142857142857], [0.23809523809523808, -0.38095238095238093], [0.3333333333333333, -0.42857142857142855], [0.5714285714285714, -0.42857142857142855], [0.6666666666666666, -0.47619047619047616]]], "w": 0.9047619047619047}, "c": {"l": [[[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.19047619047619047, -0.23809523809523808], [0.19047619047619047, -0.5238095238095237], [0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5714285714285714, -0.7142857142857142], [0.6666666666666666, -0.6666666666666666]]], "w": 0.8571428571428571}, "e": {"l": [[[0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.19047619047619047], [0.19047619047619047, -0.5714285714285714], [0.23809523809523808, -0.6666666666666666], [0.3333333333333333, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.5714285714285714], [0.6666666666666666, -0.47619047619047616], [0.19047619047619047, -0.38095238095238093]]], "w": 0.8571428571428571}, "d": {"l": [[[0.6666666666666666, -0.047619047619047616], [0.6666666666666666, -1.0476190476190474]], [[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.19047619047619047, -0.23809523809523808], [0.19047619047619047, -0.5238095238095237], [0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5714285714285714, -0.7142857142857142], [0.6666666666666666, -0.6666666666666666]]], "w": 0.9047619047619047}, "g": {"l": [[[0.6666666666666666, -0.7142857142857142], [0.6666666666666666, 0.09523809523809523], [0.6190476190476191, 0.19047619047619047], [0.5714285714285714, 0.23809523809523808], [0.47619047619047616, 0.2857142857142857], [0.3333333333333333, 0.2857142857142857], [0.23809523809523808, 0.23809523809523808]], [[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.19047619047619047, -0.23809523809523808], [0.19047619047619047, -0.5238095238095237], [0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5714285714285714, -0.7142857142857142], [0.6666666666666666, -0.6666666666666666]]], "w": 0.9047619047619047}, "f": {"l": [[[0.09523809523809523, -0.7142857142857142], [0.47619047619047616, -0.7142857142857142]], [[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.9047619047619047], [0.2857142857142857, -1.0], [0.38095238095238093, -1.0476190476190474], [0.47619047619047616, -1.0476190476190474]]], "w": 0.5714285714285714}, "i": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.7142857142857142]], [[0.23809523809523808, -1.0476190476190474], [0.19047619047619047, -1.0], [0.23809523809523808, -0.9523809523809523], [0.2857142857142857, -1.0], [0.23809523809523808, -1.0476190476190474], [0.23809523809523808, -0.9523809523809523]]], "w": 0.47619047619047616}, "h": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474]], [[0.6666666666666666, -0.047619047619047616], [0.6666666666666666, -0.5714285714285714], [0.6190476190476191, -0.6666666666666666], [0.5238095238095237, -0.7142857142857142], [0.38095238095238093, -0.7142857142857142], [0.2857142857142857, -0.6666666666666666], [0.23809523809523808, -0.6190476190476191]]], "w": 0.9047619047619047}, "l": {"l": [[[0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.19047619047619047], [0.23809523809523808, -1.0476190476190474]]], "w": 0.5238095238095237}, "r": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.7142857142857142]], [[0.23809523809523808, -0.5238095238095237], [0.2857142857142857, -0.6190476190476191], [0.3333333333333333, -0.6666666666666666], [0.42857142857142855, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142]]], "w": 0.6190476190476191}, "t": {"l": [[[0.09523809523809523, -0.7142857142857142], [0.47619047619047616, -0.7142857142857142]], [[0.23809523809523808, -1.0476190476190474], [0.23809523809523808, -0.19047619047619047], [0.2857142857142857, -0.09523809523809523], [0.38095238095238093, -0.047619047619047616], [0.47619047619047616, -0.047619047619047616]]], "w": 0.5714285714285714}, "y": {"l": [[[0.14285714285714285, -0.7142857142857142], [0.38095238095238093, -0.047619047619047616]], [[0.6190476190476191, -0.7142857142857142], [0.38095238095238093, -0.047619047619047616], [0.2857142857142857, 0.19047619047619047], [0.23809523809523808, 0.23809523809523808], [0.14285714285714285, 0.2857142857142857]]], "w": 0.7619047619047619}}, "modules": [{"layer": "F", "center": [155.194, 88.392], "pads": [{"layers": ["F", "B"], "angle": -225.0, "pos": [153.39794899999998, 86.59594899999999], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -225.0, "pos": [155.194, 88.392], "drillsize": [1.0, 1.0], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7, 1.7]}], "drawings": [], "ref": "J2", "bbox": {"pos": [150.820292, 84.018292], "size": [6.944293, 6.944293]}}, {"layer": "F", "center": [147.32, 88.646], "pads": [{"layers": ["F", "B"], "angle": -90.0, "pos": [147.32, 86.106], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [147.32, 88.646], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}], "drawings": [], "ref": "D5", "bbox": {"pos": [144.044999, 84.120999], "size": [6.550002, 6.500001999999999]}}, {"layer": "F", "center": [147.32, 94.996], "pads": [{"layers": ["F", "B"], "angle": -90.0, "pos": [147.32, 94.996], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [147.32, 92.45599999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}], "drawings": [], "ref": "D4", "bbox": {"pos": [144.044999, 90.47099899999999], "size": [6.550002, 6.500001999999999]}}, {"layer": "F", "center": [154.9, 101.39999999999999], "pads": [{"layers": ["F", "B"], "angle": -90.0, "pos": [154.9, 98.86], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [154.9, 101.39999999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}], "drawings": [], "ref": "D3", "bbox": {"pos": [151.624999, 96.874999], "size": [6.550002, 6.500001999999999]}}, {"layer": "F", "center": [147.32, 101.34599999999999], "pads": [{"layers": ["F", "B"], "angle": -90.0, "pos": [147.32, 101.34599999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [147.32, 98.806], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}], "drawings": [], "ref": "D2", "bbox": {"pos": [144.044999, 96.820999], "size": [6.550002, 6.500001999999999]}}, {"layer": "F", "center": [138.9, 101.3], "pads": [{"layers": ["F", "B"], "angle": -90.0, "pos": [138.9, 98.75999999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [138.9, 101.3], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}], "drawings": [], "ref": "D1", "bbox": {"pos": [135.624999, 96.774999], "size": [6.550002, 6.500001999999999]}}, {"layer": "F", "center": [140.71599999999998, 105.664], "pads": [{"layers": ["F", "B"], "angle": -90.0, "pos": [153.416, 105.664], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [150.876, 105.664], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [148.33599999999998, 105.664], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [145.796, 105.664], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [143.256, 105.664], "drillsize": [1.0, 1.0], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7, 1.7]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [140.71599999999998, 105.664], "drillsize": [1.0, 1.0], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7, 1.7]}], "drawings": [], "ref": "J1", "bbox": {"pos": [138.890999, 103.838999], "size": [16.350002, 3.6500019999999997]}}, {"layer": "B", "center": [140.446183, 91.455817], "pads": [{"layers": ["B"], "angle": -225.0, "pos": [139.668366, 92.233634], "shape": "rect", "offset": [0.0, 0.0], "type": "smd", "size": [1.2, 0.8999999999999999]}, {"layers": ["B"], "angle": -225.0, "pos": [141.224, 90.678], "shape": "rect", "offset": [0.0, 0.0], "pin1": 1, "type": "smd", "size": [1.2, 0.8999999999999999]}], "drawings": [], "ref": "R1", "bbox": {"pos": [138.547349, 89.54991199999999], "size": [3.8047389999999996, 3.8047389999999996]}}], "edges": [{"start": [158.49599999999998, 88.392], "end": [158.49599999999998, 108.71199999999999], "type": "segment", "width": 0.15}, {"start": [153.162, 83.312], "end": [158.49599999999998, 88.392], "type": "segment", "width": 0.15}, {"start": [140.71599999999998, 83.312], "end": [153.162, 83.312], "type": "segment", "width": 0.15}, {"start": [135.382, 88.89999999999999], "end": [140.71599999999998, 83.312], "type": "segment", "width": 0.15}, {"start": [135.382, 108.71199999999999], "end": [135.382, 88.89999999999999], "type": "segment", "width": 0.15}, {"start": [158.49599999999998, 108.71199999999999], "end": [135.382, 108.71199999999999], "type": "segment", "width": 0.15}], "bom": {"both": [[1, "R", "R_0603_HandSoldering", [["R1", 7]], []], [1, "left", "LED_D5.0mm", [["D1", 5]], []], [1, "GO", "LED_D5.0mm", [["D2", 4]], []], [1, "right", "LED_D5.0mm", [["D3", 3]], []], [1, "ready", "LED_D5.0mm", [["D4", 2]], []], [1, "STOP", "LED_D5.0mm", [["D5", 1]], []], [1, "Conn_01x02_Male", "Socket_Strip_Straight_1x02_Pitch2.54mm", [["J2", 0]], []], [1, "Conn_01x06_Male", "Socket_Strip_Straight_1x06_Pitch2.54mm", [["J1", 6]], []]], "B": [[1, "R", "R_0603_HandSoldering", [["R1", 7]], []]], "F": [[1, "left", "LED_D5.0mm", [["D1", 5]], []], [1, "GO", "LED_D5.0mm", [["D2", 4]], []], [1, "right", "LED_D5.0mm", [["D3", 3]], []], [1, "ready", "LED_D5.0mm", [["D4", 2]], []], [1, "STOP", "LED_D5.0mm", [["D5", 1]], []], [1, "Conn_01x02_Male", "Socket_Strip_Straight_1x02_Pitch2.54mm", [["J2", 0]], []], [1, "Conn_01x06_Male", "Socket_Strip_Straight_1x06_Pitch2.54mm", [["J1", 6]], []]]}, "silkscreen": {"B": [{"width": 1.0, "angle": 45.0, "attr": ["mirrored"], "horiz_justify": 0, "text": "R1", "thickness": 0.15, "pos": [139.420878, 90.430512], "height": 1.0}, {"start": [140.318904, 90.621431], "end": [139.611797, 91.328538], "type": "segment", "width": 0.12}, {"start": [140.573462, 92.29020299999999], "end": [141.28056899999999, 91.583096], "type": "segment", "width": 0.12}], "F": [{"width": 0.7999999999999999, "angle": 135.0, "attr": [], "horiz_justify": 0, "text": "GND", "thickness": 0.09999999999999999, "pos": [153.67, 90.17], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 135.0, "attr": [], "horiz_justify": 0, "text": "+5V", "thickness": 0.09999999999999999, "pos": [151.892, 88.392], "height": 0.7999999999999999}, {"width": 1.0, "angle": 45.0, "attr": [], "horiz_justify": 0, "text": "trafficLight", "thickness": 0.19999999999999998, "pos": [140.625, 89.52499999999999], "height": 1.0}, {"width": 1.5, "angle": 45.0, "attr": [], "horiz_justify": 0, "text": "FOSSEE\n\n", "thickness": 0.3, "pos": [140.275, 89.0], "height": 1.5}, {"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "Re", "thickness": 0.15, "pos": [148.375, 108.07499999999999], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "S", "thickness": 0.15, "pos": [150.875, 108.07499999999999], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "Ri", "thickness": 0.15, "pos": [153.4, 108.05], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "G", "thickness": 0.15, "pos": [145.775, 108.07499999999999], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "L", "thickness": 0.15, "pos": [143.2, 108.07499999999999], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "+5V", "thickness": 0.15, "pos": [140.525, 108.07499999999999], "height": 0.7999999999999999}, {"width": 1.0, "angle": 45.0, "attr": [], "horiz_justify": 0, "text": "J2", "thickness": 0.15, "pos": [156.841559, 90.039559], "height": 1.0}, {"start": [157.074904, 88.392], "end": [156.13445199999998, 89.33245199999999], "type": "segment", "width": 0.12}, {"start": [156.13445199999998, 87.451548], "end": [157.074904, 88.392], "type": "segment", "width": 0.12}, {"start": [153.35552199999998, 88.434426], "end": [155.236426, 86.553522], "type": "segment", "width": 0.12}, {"start": [151.517045, 86.59594899999999], "end": [153.35552199999998, 88.434426], "type": "segment", "width": 0.12}, {"start": [153.39794899999998, 84.71504499999999], "end": [151.517045, 86.59594899999999], "type": "segment", "width": 0.12}, {"start": [155.236426, 86.553522], "end": [153.39794899999998, 84.71504499999999], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "STOP", "thickness": 0.15, "pos": [150.876, 84.328], "height": 1.0}, {"start": [145.775, 89.93599999999999], "end": [148.86499999999998, 89.93599999999999], "type": "segment", "width": 0.12}, {"start": [147.32, 87.37599999999999], "radius": 2.5, "type": "circle", "width": 0.12}, {"width": 0.12, "endangle": 58.89115156915048, "start": [147.32, 87.37599999999999], "radius": 2.9899999999999998, "startangle": -90.00884843084953, "type": "arc"}, {"width": 0.12, "endangle": 270.0088484308496, "start": [147.32, 87.37599999999999], "radius": 2.9899999999999998, "startangle": 121.10884843084955, "type": "arc"}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "ready", "thickness": 0.15, "pos": [151.638, 91.18599999999999], "height": 1.0}, {"width": 0.12, "endangle": 270.0088484308496, "start": [147.32, 93.726], "radius": 2.9899999999999998, "startangle": 121.10884843084955, "type": "arc"}, {"width": 0.12, "endangle": 58.89115156915048, "start": [147.32, 93.726], "radius": 2.9899999999999998, "startangle": -90.00884843084953, "type": "arc"}, {"start": [147.32, 93.726], "radius": 2.5, "type": "circle", "width": 0.12}, {"start": [145.775, 96.286], "end": [148.86499999999998, 96.286], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "right", "thickness": 0.15, "pos": [154.94, 96.225], "height": 1.0}, {"start": [153.355, 102.69], "end": [156.445, 102.69], "type": "segment", "width": 0.12}, {"start": [154.9, 100.13], "radius": 2.5, "type": "circle", "width": 0.12}, {"width": 0.12, "endangle": 58.89115156915048, "start": [154.9, 100.13], "radius": 2.9899999999999998, "startangle": -90.00884843084953, "type": "arc"}, {"width": 0.12, "endangle": 270.0088484308496, "start": [154.9, 100.13], "radius": 2.9899999999999998, "startangle": 121.10884843084955, "type": "arc"}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "GO", "thickness": 0.15, "pos": [150.62199999999999, 96.52], "height": 1.0}, {"width": 0.12, "endangle": 270.0088484308496, "start": [147.32, 100.076], "radius": 2.9899999999999998, "startangle": 121.10884843084955, "type": "arc"}, {"width": 0.12, "endangle": 58.89115156915048, "start": [147.32, 100.076], "radius": 2.9899999999999998, "startangle": -90.00884843084953, "type": "arc"}, {"start": [147.32, 100.076], "radius": 2.5, "type": "circle", "width": 0.12}, {"start": [145.775, 102.636], "end": [148.86499999999998, 102.636], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "left", "thickness": 0.15, "pos": [138.938, 96.19999999999999], "height": 1.0}, {"start": [137.355, 102.58999999999999], "end": [140.445, 102.58999999999999], "type": "segment", "width": 0.12}, {"start": [138.9, 100.03], "radius": 2.5, "type": "circle", "width": 0.12}, {"width": 0.12, "endangle": 58.89115156915048, "start": [138.9, 100.03], "radius": 2.9899999999999998, "startangle": -90.00884843084953, "type": "arc"}, {"width": 0.12, "endangle": 270.0088484308496, "start": [138.9, 100.03], "radius": 2.9899999999999998, "startangle": 121.10884843084955, "type": "arc"}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "J1", "thickness": 0.15, "pos": [156.20999999999998, 105.664], "height": 1.0}, {"start": [139.386, 106.994], "end": [139.386, 105.664], "type": "segment", "width": 0.12}, {"start": [140.71599999999998, 106.994], "end": [139.386, 106.994], "type": "segment", "width": 0.12}, {"start": [141.986, 104.33399999999999], "end": [141.986, 106.994], "type": "segment", "width": 0.12}, {"start": [154.74599999999998, 104.33399999999999], "end": [141.986, 104.33399999999999], "type": "segment", "width": 0.12}, {"start": [154.74599999999998, 106.994], "end": [154.74599999999998, 104.33399999999999], "type": "segment", "width": 0.12}, {"start": [141.986, 106.994], "end": [154.74599999999998, 106.994], "type": "segment", "width": 0.12}]}, "edges_bbox": {"minx": 135.306999, "miny": 83.236999, "maxx": 158.571001, "maxy": 108.78700099999999}, "metadata": {"date": "2019-01-14 16:19:17", "company": "", "revision": "", "title": "traffic"}}
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+/* Utility functions */
+
+var storagePrefix = 'KiCad_HTML_BOM__' + pcbdata.metadata.title + '__' +
+ pcbdata.metadata.revision + '__';
+var storage;
+
+function initStorage(key) {
+ try {
+ window.localStorage.getItem("blank");
+ storage = window.localStorage;
+ } catch (e) {
+ // localStorage not available
+ }
+ if (!storage) {
+ try {
+ window.sessionStorage.getItem("blank");
+ storage = window.sessionStorage;
+ } catch (e) {
+ // sessionStorage also not available
+ }
+ }
+}
+
+function readStorage(key) {
+ if (storage) {
+ return storage.getItem(storagePrefix + '#' + key);
+ } else {
+ return null;
+ }
+}
+
+function writeStorage(key, value) {
+ if (storage) {
+ storage.setItem(storagePrefix + '#' + key, value);
+ }
+}
+
+function fancyDblClickHandler(el, onsingle, ondouble) {
+ return function() {
+ if (el.getAttribute("data-dblclick") == null) {
+ el.setAttribute("data-dblclick", 1);
+ setTimeout(function() {
+ if (el.getAttribute("data-dblclick") == 1) {
+ onsingle();
+ }
+ el.removeAttribute("data-dblclick");
+ }, 200);
+ } else {
+ el.removeAttribute("data-dblclick");
+ ondouble();
+ }
+ }
+}
+
+function smoothScrollToRow(rowid) {
+ document.getElementById(rowid).scrollIntoView({
+ behavior: "smooth",
+ block: "center",
+ inline: "nearest"
+ });
+}
+
+function focusInputField(input) {
+ input.scrollIntoView(false);
+ input.focus();
+ input.select();
+}
+
+function copyToClipboard() {
+ var text = '';
+ for (var node of bomhead.childNodes[0].childNodes) {
+ if (node.firstChild) {
+ text = text + node.firstChild.nodeValue;
+ }
+ if (node != bomhead.childNodes[0].lastChild) {
+ text += '\t';
+ }
+ }
+ text += '\n';
+ for (var row of bombody.childNodes) {
+ for (var cell of row.childNodes) {
+ for (var node of cell.childNodes) {
+ if (node.nodeName == "INPUT") {
+ if (node.checked) {
+ text = text + '✓';
+ }
+ } else if (node.nodeName == "MARK") {
+ text = text + node.firstChild.nodeValue;
+ } else {
+ text = text + node.nodeValue;
+ }
+ }
+ if (cell != row.lastChild) {
+ text += '\t';
+ }
+ }
+ text += '\n';
+ }
+ var textArea = document.createElement("textarea");
+ textArea.classList.add('clipboard-temp');
+ textArea.value = text;
+
+ document.body.appendChild(textArea);
+ textArea.focus();
+ textArea.select();
+
+ try {
+ if (document.execCommand('copy')) {
+ console.log('Bom copied to clipboard.');
+ }
+ } catch (err) {
+ console.log('Can not copy to clipboard.');
+ }
+
+ document.body.removeChild(textArea);
+}
+
+function removeGutterNode(node) {
+ for (var i = 0; i < node.childNodes.length; i++) {
+ if (node.childNodes[i].classList &&
+ node.childNodes[i].classList.contains("gutter")) {
+ node.removeChild(node.childNodes[i]);
+ break;
+ }
+ }
+}
+
+function cleanGutters() {
+ removeGutterNode(document.getElementById("bot"));
+ removeGutterNode(document.getElementById("canvasdiv"));
+}
+
+var units = {
+ prefixes: {
+ giga: ["G", "g", "giga", "Giga", "GIGA"],
+ mega: ["M", "mega", "Mega", "MEGA"],
+ kilo: ["K", "k", "kilo", "Kilo", "KILO"],
+ milli: ["m", "milli", "Milli", "MILLI"],
+ micro: ["U", "u", "micro", "Micro", "MICRO", "μ", "µ"], // different utf8 μ
+ nano: ["N", "n", "nano", "Nano", "NANO"],
+ pico: ["P", "p", "pico", "Pico", "PICO"],
+ },
+ unitsShort: ["R", "r", "Ω", "F", "f", "H", "h"],
+ unitsLong: [
+ "OHM", "Ohm", "ohm", "ohms",
+ "FARAD", "Farad", "farad",
+ "HENRY", "Henry", "henry"
+ ],
+ getMultiplier: function(s) {
+ if (this.prefixes.giga.includes(s)) return 1e9;
+ if (this.prefixes.mega.includes(s)) return 1e6;
+ if (this.prefixes.kilo.includes(s)) return 1e3;
+ if (this.prefixes.milli.includes(s)) return 1e-3;
+ if (this.prefixes.micro.includes(s)) return 1e-6;
+ if (this.prefixes.nano.includes(s)) return 1e-9;
+ if (this.prefixes.pico.includes(s)) return 1e-12;
+ return 1;
+ },
+ valueRegex: null,
+}
+
+function initUtils() {
+ var allPrefixes = units.prefixes.giga
+ .concat(units.prefixes.mega)
+ .concat(units.prefixes.kilo)
+ .concat(units.prefixes.milli)
+ .concat(units.prefixes.micro)
+ .concat(units.prefixes.nano)
+ .concat(units.prefixes.pico);
+ var allUnits = units.unitsShort.concat(units.unitsLong);
+ units.valueRegex = new RegExp("^([0-9\.]+)" +
+ "\\s*(" + allPrefixes.join("|") + ")?" +
+ "(" + allUnits.join("|") + ")?" +
+ "(\\b.*)?$", "");
+ units.valueAltRegex = new RegExp("^([0-9]*)" +
+ "(" + units.unitsShort.join("|") + ")?" +
+ "([GgMmKkUuNnPp])?" +
+ "([0-9]*)" +
+ "(\\b.*)?$", "");
+ for (var bomtable of Object.values(pcbdata.bom)) {
+ for (var row of bomtable) {
+ row.push(parseValue(row[1], row[3][0][0]));
+ }
+ }
+}
+
+function parseValue(val, ref) {
+ var inferUnit = (unit, ref) => {
+ if (unit) {
+ unit = unit.toLowerCase();
+ if (unit == 'Ω' || unit == "ohm" || unit == "ohms") {
+ unit = 'r';
+ }
+ unit = unit[0];
+ } else {
+ ref = /^([a-z]+)\d+$/i.exec(ref);
+ if (ref) {
+ ref = ref[1].toLowerCase();
+ if (ref == "c") unit = 'f';
+ else if (ref == "l") unit = 'h';
+ else if (ref == "r" || ref == "rv") unit = 'r';
+ else unit = null;
+ }
+ }
+ return unit;
+ };
+ val = val.replace(/,/g, "");
+ var match = units.valueRegex.exec(val);
+ var unit;
+ if (match) {
+ val = parseFloat(match[1]);
+ if (match[2]) {
+ val = val * units.getMultiplier(match[2]);
+ }
+ unit = inferUnit(match[3], ref);
+ if (!unit) return null;
+ else return {
+ val: val,
+ unit: unit,
+ extra: match[4],
+ }
+ }
+ match = units.valueAltRegex.exec(val);
+ if (match && (match[1] || match[4])) {
+ val = parseFloat(match[1] + "." + match[4]);
+ if (match[3]) {
+ val = val * units.getMultiplier(match[3]);
+ }
+ unit = inferUnit(match[2], ref);
+ if (!unit) return null;
+ else return {
+ val: val,
+ unit: unit,
+ extra: match[5],
+ }
+ }
+ return null;
+}
+
+function valueCompare(a, b, stra, strb) {
+ if (a === null && b === null) {
+ // Failed to parse both values, compare them as strings.
+ if (stra != strb) return stra > strb ? 1 : -1;
+ else return 0;
+ } else if (a === null) {
+ return 1;
+ } else if (b === null) {
+ return -1;
+ } else {
+ if (a.unit != b.unit) return a.unit > b.unit ? 1 : -1;
+ else if (a.val != b.val) return a.val > b.val ? 1 : -1;
+ else if (a.extra != b.extra) return a.extra > b.extra ? 1 : -1;
+ else return 0;
+ }
+}
+
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+/* PCB rendering code */
+
+var redrawOnDrag = true;
+var boardRotation = 0;
+
+function deg2rad(deg) {
+ return deg * Math.PI / 180;
+}
+
+function calcFontPoint(linepoint, text, offsetx, offsety, tilt) {
+ var point = [
+ linepoint[0] * text.width + offsetx,
+ linepoint[1] * text.height + offsety
+ ];
+ // Adding half a line height here is technically a bug
+ // but pcbnew currently does the same, text is slightly shifted.
+ point[0] -= (point[1] + text.height * 0.5) * tilt;
+ return point;
+}
+
+function drawtext(ctx, text, color, flip) {
+ ctx.save();
+ ctx.translate(...text.pos);
+ var angle = -text.angle;
+ if (text.attr.includes("mirrored")) {
+ ctx.scale(-1, 1);
+ angle = -angle;
+ }
+ var tilt = 0;
+ if (text.attr.includes("italic")) {
+ tilt = 0.125;
+ }
+ var interline = (text.height * 1.5 + text.thickness) / 2;
+ var txt = text.text.split("\n");
+ // KiCad ignores last empty line.
+ if (txt[txt.length-1] == '') txt.pop();
+ ctx.rotate(deg2rad(angle));
+ ctx.fillStyle = color;
+ ctx.strokeStyle = color;
+ ctx.lineCap = "round";
+ ctx.lineWidth = text.thickness;
+ for (var i in txt) {
+ var offsety = (-(txt.length - 1) + i * 2) * interline + text.height / 2;
+ var lineWidth = 0;
+ for (var c of txt[i]) {
+ lineWidth += pcbdata.font_data[c].w * text.width;
+ }
+ var offsetx = 0;
+ switch (text.horiz_justify) {
+ case -1:
+ // Justify left, do nothing
+ break;
+ case 0:
+ // Justify center
+ offsetx -= lineWidth / 2;
+ break;
+ case 1:
+ // Justify right
+ offsetx -= lineWidth;
+ break;
+ }
+ for (var c of txt[i]) {
+ for (var line of pcbdata.font_data[c].l) {
+ // Drawing each segment separately instead of
+ // polyline because round line caps don't work in joints
+ for (var i = 0; i < line.length - 1; i++) {
+ ctx.beginPath();
+ ctx.moveTo(...calcFontPoint(line[i], text, offsetx, offsety, tilt));
+ ctx.lineTo(...calcFontPoint(line[i + 1], text, offsetx, offsety, tilt));
+ ctx.stroke();
+ }
+ }
+ offsetx += pcbdata.font_data[c].w * text.width;
+ }
+ }
+ ctx.restore();
+}
+
+function drawedge(ctx, scalefactor, edge, color) {
+ ctx.strokeStyle = color;
+ ctx.lineWidth = Math.max(1 / scalefactor, edge.width);
+ ctx.lineCap = "round";
+ if (edge.type == "segment") {
+ ctx.beginPath();
+ ctx.moveTo(...edge.start);
+ ctx.lineTo(...edge.end);
+ ctx.stroke();
+ }
+ if (edge.type == "arc") {
+ ctx.beginPath();
+ ctx.arc(
+ ...edge.start,
+ edge.radius,
+ deg2rad(edge.startangle),
+ deg2rad(edge.endangle));
+ ctx.stroke();
+ }
+ if (edge.type == "circle") {
+ ctx.beginPath();
+ ctx.arc(
+ ...edge.start,
+ edge.radius,
+ 0, 2 * Math.PI);
+ ctx.closePath();
+ ctx.stroke();
+ }
+}
+
+function drawRoundRect(ctx, color, size, radius, ctxmethod) {
+ ctx.beginPath();
+ ctx.strokeStyle = color;
+ var x = size[0] * -0.5;
+ var y = size[1] * -0.5;
+ var width = size[0];
+ var height = size[1];
+ ctx.moveTo(x, 0);
+ ctx.arcTo(x, y + height, x + width, y + height, radius);
+ ctx.arcTo(x + width, y + height, x + width, y, radius);
+ ctx.arcTo(x + width, y, x, y, radius);
+ ctx.arcTo(x, y, x, y + height, radius);
+ ctx.closePath();
+ ctxmethod();
+}
+
+function drawOblong(ctx, color, size, ctxmethod) {
+ drawRoundRect(ctx, color, size, Math.min(size[0], size[1]) / 2, ctxmethod);
+}
+
+function drawPolygons(ctx, color, polygons, ctxmethod) {
+ ctx.fillStyle = color;
+ for (var polygon of polygons) {
+ ctx.beginPath();
+ for (var vertex of polygon) {
+ ctx.lineTo(...vertex)
+ }
+ ctx.closePath();
+ ctxmethod();
+ }
+}
+
+function drawPolygonShape(ctx, shape, color) {
+ ctx.save();
+ ctx.translate(...shape.pos);
+ ctx.rotate(deg2rad(-shape.angle));
+ drawPolygons(ctx, color, shape.polygons, ctx.fill.bind(ctx));
+ ctx.restore();
+}
+
+function drawDrawing(ctx, layer, scalefactor, drawing, color) {
+ if (["segment", "arc", "circle"].includes(drawing.type)) {
+ drawedge(ctx, scalefactor, drawing, color);
+ } else if (drawing.type == "polygon") {
+ drawPolygonShape(ctx, drawing, color);
+ } else {
+ drawtext(ctx, drawing, color, layer == "B");
+ }
+}
+
+function drawCircle(ctx, radius, ctxmethod) {
+ ctx.beginPath();
+ ctx.arc(0, 0, radius, 0, 2 * Math.PI);
+ ctx.closePath();
+ ctxmethod();
+}
+
+function drawPad(ctx, pad, color, outline) {
+ ctx.save();
+ ctx.translate(...pad.pos);
+ ctx.rotate(deg2rad(pad.angle));
+ if (pad.offset) {
+ ctx.translate(...pad.offset);
+ }
+ ctx.fillStyle = color;
+ ctx.strokeStyle = color;
+ var ctxmethod = outline ? ctx.stroke.bind(ctx) : ctx.fill.bind(ctx);
+ if (pad.shape == "rect") {
+ var rect = [...pad.size.map(c => -c * 0.5), ...pad.size];
+ if (outline) {
+ ctx.strokeRect(...rect);
+ } else {
+ ctx.fillRect(...rect);
+ }
+ } else if (pad.shape == "oval") {
+ drawOblong(ctx, color, pad.size, ctxmethod);
+ } else if (pad.shape == "circle") {
+ drawCircle(ctx, pad.size[0] / 2, ctxmethod);
+ } else if (pad.shape == "roundrect") {
+ drawRoundRect(ctx, color, pad.size, pad.radius, ctxmethod);
+ } else if (pad.shape == "custom") {
+ drawPolygons(ctx, color, pad.polygons, ctxmethod);
+ }
+ if (pad.type == "th" && !outline) {
+ ctx.fillStyle = "#CCCCCC";
+ if (pad.drillshape == "oblong") {
+ drawOblong(ctx, "#CCCCCC", pad.drillsize, ctxmethod);
+ } else {
+ drawCircle(ctx, pad.drillsize[0] / 2, ctxmethod);
+ }
+ }
+ ctx.restore();
+}
+
+function drawModule(ctx, layer, scalefactor, module, padcolor, outlinecolor, highlight) {
+ if (highlight) {
+ // draw bounding box
+ if (module.layer == layer) {
+ ctx.save();
+ ctx.globalAlpha = 0.2;
+ ctx.translate(...module.bbox.pos);
+ ctx.fillStyle = padcolor;
+ ctx.fillRect(
+ 0, 0,
+ ...module.bbox.size);
+ ctx.globalAlpha = 1;
+ ctx.strokeStyle = padcolor;
+ ctx.strokeRect(
+ 0, 0,
+ ...module.bbox.size);
+ ctx.restore();
+ }
+ }
+ // draw drawings
+ for (var drawing of module.drawings) {
+ if (drawing.layer == layer) {
+ drawDrawing(ctx, layer, scalefactor, drawing.drawing, padcolor);
+ }
+ }
+ // draw pads
+ for (var pad of module.pads) {
+ if (pad.layers.includes(layer)) {
+ drawPad(ctx, pad, padcolor, false);
+ if (pad.pin1 && highlightpin1) {
+ drawPad(ctx, pad, outlinecolor, true);
+ }
+ }
+ }
+}
+
+function drawEdges(canvas, scalefactor) {
+ var ctx = canvas.getContext("2d");
+ var edgecolor = getComputedStyle(topmostdiv).getPropertyValue('--pcb-edge-color');
+ for (var edge of pcbdata.edges) {
+ drawedge(ctx, scalefactor, edge, edgecolor);
+ }
+}
+
+function drawModules(canvas, layer, scalefactor, highlight) {
+ var ctx = canvas.getContext("2d");
+ ctx.lineWidth = 3 / scalefactor;
+ var style = getComputedStyle(topmostdiv);
+ var padcolor = style.getPropertyValue('--pad-color');
+ var outlinecolor = style.getPropertyValue('--pin1-outline-color');
+ if (highlight > 0) {
+ padcolor = style.getPropertyValue('--pad-color-highlight');
+ outlinecolor = style.getPropertyValue('--pin1-outline-color-highlight');
+ }
+ for (var i = 0; i < pcbdata.modules.length; i++) {
+ var mod = pcbdata.modules[i];
+ if (!highlight || highlightedModules.includes(i)) {
+ drawModule(ctx, layer, scalefactor, mod, padcolor, outlinecolor, highlight);
+ }
+ }
+}
+
+function drawSilkscreen(canvas, layer, scalefactor) {
+ var ctx = canvas.getContext("2d");
+ for (var d of pcbdata.silkscreen[layer]) {
+ if (["segment", "arc", "circle"].includes(d.type)) {
+ drawedge(ctx, scalefactor, d, "#aa4");
+ } else if (d.type == "polygon") {
+ drawPolygonShape(ctx, d, "#4aa");
+ } else {
+ drawtext(ctx, d, "#4aa", layer == "B");
+ }
+ }
+}
+
+function clearCanvas(canvas) {
+ var ctx = canvas.getContext("2d");
+ ctx.save();
+ ctx.setTransform(1, 0, 0, 1, 0, 0);
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
+ ctx.restore();
+}
+
+function drawHighlightsOnLayer(canvasdict) {
+ clearCanvas(canvasdict.highlight);
+ drawModules(canvasdict.highlight, canvasdict.layer,
+ canvasdict.transform.s * canvasdict.transform.zoom, true);
+}
+
+function drawHighlights() {
+ drawHighlightsOnLayer(allcanvas.front);
+ drawHighlightsOnLayer(allcanvas.back);
+}
+
+function drawBackground(canvasdict) {
+ clearCanvas(canvasdict.bg);
+ clearCanvas(canvasdict.silk);
+ drawEdges(canvasdict.bg, canvasdict.transform.s);
+ drawModules(canvasdict.bg, canvasdict.layer,
+ canvasdict.transform.s * canvasdict.transform.zoom, false);
+ drawSilkscreen(canvasdict.silk, canvasdict.layer, canvasdict.transform.s);
+}
+
+function prepareCanvas(canvas, flip, transform) {
+ var ctx = canvas.getContext("2d");
+ ctx.setTransform(1, 0, 0, 1, 0, 0);
+ var fontsize = 1.55;
+ ctx.scale(transform.zoom, transform.zoom);
+ ctx.translate(transform.panx, transform.pany);
+ if (flip) {
+ ctx.scale(-1, 1);
+ }
+ ctx.translate(transform.x, transform.y);
+ ctx.rotate(deg2rad(boardRotation));
+ ctx.scale(transform.s, transform.s);
+}
+
+function prepareLayer(canvasdict) {
+ var flip = (canvasdict.layer == "B");
+ for (var c of ["bg", "silk", "highlight"]) {
+ prepareCanvas(canvasdict[c], flip, canvasdict.transform);
+ }
+}
+
+function rotateVector(v, angle) {
+ angle = deg2rad(angle);
+ return [
+ v[0] * Math.cos(angle) - v[1] * Math.sin(angle),
+ v[0] * Math.sin(angle) + v[1] * Math.cos(angle)
+ ];
+}
+
+function applyRotation(bbox) {
+ var corners = [
+ [bbox.minx, bbox.miny],
+ [bbox.minx, bbox.maxy],
+ [bbox.maxx, bbox.miny],
+ [bbox.maxx, bbox.maxy],
+ ];
+ corners = corners.map((v) => rotateVector(v, boardRotation));
+ return {
+ minx: corners.reduce((a, v) => Math.min(a, v[0]), Infinity),
+ miny: corners.reduce((a, v) => Math.min(a, v[1]), Infinity),
+ maxx: corners.reduce((a, v) => Math.max(a, v[0]), -Infinity),
+ maxy: corners.reduce((a, v) => Math.max(a, v[1]), -Infinity),
+ }
+}
+
+function recalcLayerScale(canvasdict) {
+ var canvasdivid = {
+ "F": "frontcanvas",
+ "B": "backcanvas"
+ } [canvasdict.layer];
+ var width = document.getElementById(canvasdivid).clientWidth * 2;
+ var height = document.getElementById(canvasdivid).clientHeight * 2;
+ var bbox = applyRotation(pcbdata.edges_bbox);
+ var scalefactor = 0.98 * Math.min(
+ width / (bbox.maxx - bbox.minx),
+ height / (bbox.maxy - bbox.miny)
+ );
+ if (scalefactor < 0.1) {
+ scalefactor = 1;
+ }
+ canvasdict.transform.s = scalefactor;
+ var flip = (canvasdict.layer == "B");
+ if (flip) {
+ canvasdict.transform.x = -((bbox.maxx + bbox.minx) * scalefactor + width) * 0.5;
+ } else {
+ canvasdict.transform.x = -((bbox.maxx + bbox.minx) * scalefactor - width) * 0.5;
+ }
+ canvasdict.transform.y = -((bbox.maxy + bbox.miny) * scalefactor - height) * 0.5;
+ for (var c of ["bg", "silk", "highlight"]) {
+ canvas = canvasdict[c];
+ canvas.width = width;
+ canvas.height = height;
+ canvas.style.width = (width / 2) + "px";
+ canvas.style.height = (height / 2) + "px";
+ }
+}
+
+function redrawCanvas(layerdict) {
+ prepareLayer(layerdict);
+ drawBackground(layerdict);
+ drawHighlightsOnLayer(layerdict);
+}
+
+function resizeCanvas(layerdict) {
+ recalcLayerScale(layerdict);
+ redrawCanvas(layerdict);
+}
+
+function resizeAll() {
+ resizeCanvas(allcanvas.front);
+ resizeCanvas(allcanvas.back);
+}
+
+function bboxScan(layer, x, y) {
+ var result = [];
+ for (var i = 0; i < pcbdata.modules.length; i++) {
+ var module = pcbdata.modules[i];
+ if (module.layer == layer) {
+ var b = module.bbox;
+ if (b.pos[0] <= x && b.pos[0] + b.size[0] >= x &&
+ b.pos[1] <= y && b.pos[1] + b.size[1] >= y) {
+ result.push(i);
+ }
+ }
+ }
+ return result;
+}
+
+function handleMouseDown(e, layerdict) {
+ if (e.which != 1) {
+ return;
+ }
+ e.preventDefault();
+ e.stopPropagation();
+ layerdict.transform.mousestartx = e.offsetX;
+ layerdict.transform.mousestarty = e.offsetY;
+ layerdict.transform.mousedownx = e.offsetX;
+ layerdict.transform.mousedowny = e.offsetY;
+ layerdict.transform.mousedown = true;
+}
+
+function handleMouseClick(e, layerdict) {
+ var x = e.offsetX;
+ var y = e.offsetY;
+ var t = layerdict.transform;
+ if (layerdict.layer == "B") {
+ x = (2 * x / t.zoom - t.panx + t.x) / -t.s;
+ } else {
+ x = (2 * x / t.zoom - t.panx - t.x) / t.s;
+ }
+ y = (2 * y / t.zoom - t.y - t.pany) / t.s;
+ var v = rotateVector([x, y], -boardRotation);
+ var modules = bboxScan(layerdict.layer, v[0], v[1]);
+ if (modules.length > 0) {
+ modulesClicked(modules);
+ }
+}
+
+function handleMouseUp(e, layerdict) {
+ e.preventDefault();
+ e.stopPropagation();
+ if (e.which == 1 &&
+ layerdict.transform.mousedown &&
+ layerdict.transform.mousedownx == e.offsetX &&
+ layerdict.transform.mousedowny == e.offsetY) {
+ // This is just a click
+ handleMouseClick(e, layerdict);
+ layerdict.transform.mousedown = false;
+ return;
+ }
+ if (e.which == 3) {
+ // Reset pan and zoom on right click.
+ layerdict.transform.panx = 0;
+ layerdict.transform.pany = 0;
+ layerdict.transform.zoom = 1;
+ redrawCanvas(layerdict);
+ } else if (!redrawOnDrag) {
+ redrawCanvas(layerdict);
+ }
+ layerdict.transform.mousedown = false;
+}
+
+function handleMouseMove(e, layerdict) {
+ if (!layerdict.transform.mousedown) {
+ return;
+ }
+ e.preventDefault();
+ e.stopPropagation();
+ var dx = e.offsetX - layerdict.transform.mousestartx;
+ var dy = e.offsetY - layerdict.transform.mousestarty;
+ layerdict.transform.panx += 2 * dx / layerdict.transform.zoom;
+ layerdict.transform.pany += 2 * dy / layerdict.transform.zoom;
+ layerdict.transform.mousestartx = e.offsetX;
+ layerdict.transform.mousestarty = e.offsetY;
+ if (redrawOnDrag) {
+ redrawCanvas(layerdict);
+ }
+}
+
+function handleMouseWheel(e, layerdict) {
+ e.preventDefault();
+ e.stopPropagation();
+ var t = layerdict.transform;
+ var wheeldelta = e.deltaY;
+ if (e.deltaMode == 1) {
+ // FF only, scroll by lines
+ wheeldelta *= 30;
+ } else if (e.deltaMode == 2) {
+ wheeldelta *= 300;
+ }
+ var m = Math.pow(1.1, -wheeldelta / 40);
+ // Limit amount of zoom per tick.
+ if (m > 2) {
+ m = 2;
+ } else if (m < 0.5) {
+ m = 0.5;
+ }
+ t.zoom *= m;
+ var zoomd = (1 - m) / t.zoom;
+ t.panx += 2 * e.offsetX * zoomd;
+ t.pany += 2 * e.offsetY * zoomd;
+ redrawCanvas(layerdict);
+}
+
+function addMouseHandlers(div, layerdict) {
+ div.onmousedown = function(e) {
+ handleMouseDown(e, layerdict);
+ };
+ div.onmousemove = function(e) {
+ handleMouseMove(e, layerdict);
+ };
+ div.onmouseup = function(e) {
+ handleMouseUp(e, layerdict);
+ };
+ div.onmouseout = function(e) {
+ handleMouseUp(e, layerdict);
+ }
+ div.onwheel = function(e) {
+ handleMouseWheel(e, layerdict);
+ }
+ for (var element of [div, layerdict.bg, layerdict.silk, layerdict.highlight]) {
+ element.addEventListener("contextmenu", function(e) {
+ e.preventDefault();
+ }, false);
+ }
+}
+
+function setRedrawOnDrag(value) {
+ redrawOnDrag = value;
+ writeStorage("redrawOnDrag", value);
+}
+
+function setBoardRotation(value) {
+ boardRotation = value * 5;
+ writeStorage("boardRotation", boardRotation);
+ document.getElementById("rotationDegree").textContent = boardRotation;
+ resizeAll();
+}
+
+function initRender() {
+ allcanvas = {
+ front: {
+ transform: {
+ x: 0,
+ y: 0,
+ s: 1,
+ panx: 0,
+ pany: 0,
+ zoom: 1,
+ mousestartx: 0,
+ mousestarty: 0,
+ mousedown: false,
+ },
+ bg: document.getElementById("F_bg"),
+ silk: document.getElementById("F_slk"),
+ highlight: document.getElementById("F_hl"),
+ layer: "F",
+ },
+ back: {
+ transform: {
+ x: 0,
+ y: 0,
+ s: 1,
+ panx: 0,
+ pany: 0,
+ zoom: 1,
+ mousestartx: 0,
+ mousestarty: 0,
+ mousedown: false,
+ },
+ bg: document.getElementById("B_bg"),
+ silk: document.getElementById("B_slk"),
+ highlight: document.getElementById("B_hl"),
+ layer: "B",
+ }
+ };
+ addMouseHandlers(document.getElementById("frontcanvas"), allcanvas.front);
+ addMouseHandlers(document.getElementById("backcanvas"), allcanvas.back);
+}
+
+///////////////////////////////////////////////
+
+///////////////////////////////////////////////
+/* DOM manipulation and misc code */
+
+var bomsplit;
+var canvassplit;
+var canvaslayout = "default";
+var bomlayout = "default";
+var initDone = false;
+var bomSortFunction = null;
+var currentSortColumn = null;
+var currentSortOrder = null;
+var currentHighlightedRowId;
+var highlightHandlers = [];
+var highlightedModules = [];
+var checkboxes = [];
+var bomCheckboxes = "";
+var highlightpin1 = false;
+var lastClicked;
+
+function dbg(html) {
+ dbgdiv.innerHTML = html;
+}
+
+function setDarkMode(value) {
+ if (value) {
+ topmostdiv.classList.add("dark");
+ } else {
+ topmostdiv.classList.remove("dark");
+ }
+ writeStorage("darkmode", value);
+ if (initDone) {
+ redrawCanvas(allcanvas.front);
+ redrawCanvas(allcanvas.back);
+ }
+}
+
+function setHighlightPin1(value) {
+ writeStorage("highlightpin1", value);
+ highlightpin1 = value;
+ if (initDone) {
+ redrawCanvas(allcanvas.front);
+ redrawCanvas(allcanvas.back);
+ }
+}
+
+function getStoredCheckboxRefs(checkbox) {
+ function convert(ref) {
+ var intref = parseInt(ref);
+ if (isNaN(intref)) {
+ for (var i = 0; i < pcbdata.modules.length; i++) {
+ if (pcbdata.modules[i].ref == ref) {
+ return i;
+ }
+ }
+ return -1;
+ } else {
+ return intref;
+ }
+ }
+ var existingRefs = readStorage("checkbox_" + checkbox);
+ if (!existingRefs) {
+ return new Set();
+ } else {
+ return new Set(existingRefs.split(",").map(r => convert(r)));
+ }
+}
+
+function getCheckboxState(checkbox, references) {
+ var storedRefsSet = getStoredCheckboxRefs(checkbox);
+ var currentRefsSet = new Set(references.map(r => r[1]));
+ // Get difference of current - stored
+ var difference = new Set(currentRefsSet);
+ for (ref of storedRefsSet) {
+ difference.delete(ref);
+ }
+ if (difference.size == 0) {
+ // All the current refs are stored
+ return "checked";
+ } else if (difference.size == currentRefsSet.size) {
+ // None of the current refs are stored
+ return "unchecked";
+ } else {
+ // Some of the refs are stored
+ return "indeterminate";
+ }
+}
+
+function setBomCheckboxState(checkbox, element, references) {
+ var state = getCheckboxState(checkbox, references);
+ element.checked = (state == "checked");
+ element.indeterminate = (state == "indeterminate");
+}
+
+function createCheckboxChangeHandler(checkbox, references) {
+ return function() {
+ refsSet = getStoredCheckboxRefs(checkbox);
+ if (this.checked) {
+ // checkbox ticked
+ for (var ref of references) {
+ refsSet.add(ref[1]);
+ }
+ } else {
+ // checkbox unticked
+ for (var ref of references) {
+ refsSet.delete(ref[1]);
+ }
+ }
+ writeStorage("checkbox_" + checkbox, [...refsSet].join(","));
+ }
+}
+
+function createRowHighlightHandler(rowid, refs) {
+ return function() {
+ if (currentHighlightedRowId) {
+ if (currentHighlightedRowId == rowid) {
+ return;
+ }
+ document.getElementById(currentHighlightedRowId).classList.remove("highlighted");
+ }
+ document.getElementById(rowid).classList.add("highlighted");
+ currentHighlightedRowId = rowid;
+ highlightedModules = refs.map(r => r[1]);
+ drawHighlights();
+ }
+}
+
+function entryMatches(entry) {
+ // check refs
+ for (var ref of entry[3]) {
+ if (ref[0].toLowerCase().indexOf(filter) >= 0) {
+ return true;
+ }
+ }
+ // check value
+ if (entry[1].toLowerCase().indexOf(filter) >= 0) {
+ return true;
+ }
+ // check footprint
+ if (entry[2].toLowerCase().indexOf(filter) >= 0) {
+ return true;
+ }
+ return false;
+}
+
+function findRefInEntry(entry) {
+ return entry[3].filter(r => r[0].toLowerCase() == reflookup);
+}
+
+function highlightFilter(s) {
+ if (!filter) {
+ return s;
+ }
+ var parts = s.toLowerCase().split(filter);
+ if (parts.length == 1) {
+ return s;
+ }
+ var r = "";
+ var pos = 0;
+ for (var i in parts) {
+ if (i > 0) {
+ r += '<mark class="highlight">' +
+ s.substring(pos, pos + filter.length) +
+ '</mark>';
+ pos += filter.length;
+ }
+ r += s.substring(pos, pos + parts[i].length);
+ pos += parts[i].length;
+ }
+ return r;
+}
+
+function checkboxSetUnsetAllHandler(checkboxname) {
+ return function() {
+ var checkboxnum = 0;
+ while (checkboxnum < checkboxes.length &&
+ checkboxes[checkboxnum].toLowerCase() != checkboxname.toLowerCase()) {
+ checkboxnum++;
+ }
+ if (checkboxnum >= checkboxes.length) {
+ return;
+ }
+ var allset = true;
+ var checkbox;
+ var row;
+ for (row of bombody.childNodes) {
+ checkbox = row.childNodes[checkboxnum + 1].childNodes[0];
+ if (!checkbox.checked || checkbox.indeterminate) {
+ allset = false;
+ break;
+ }
+ }
+ for (row of bombody.childNodes) {
+ checkbox = row.childNodes[checkboxnum + 1].childNodes[0];
+ checkbox.checked = !allset;
+ checkbox.indeterminate = false;
+ checkbox.onchange();
+ }
+ }
+}
+
+function createColumnHeader(name, cls, comparator) {
+ var th = document.createElement("TH");
+ th.innerHTML = name;
+ th.classList.add(cls);
+ th.style.cursor = "pointer";
+ var span = document.createElement("SPAN");
+ span.classList.add("sortmark");
+ span.classList.add("none");
+ th.appendChild(span);
+ th.onclick = function() {
+ if (currentSortColumn && this !== currentSortColumn) {
+ // Currently sorted by another column
+ currentSortColumn.childNodes[1].classList.remove(currentSortOrder);
+ currentSortColumn.childNodes[1].classList.add("none");
+ currentSortColumn = null;
+ currentSortOrder = null;
+ }
+ if (currentSortColumn && this === currentSortColumn) {
+ // Already sorted by this column
+ if (currentSortOrder == "asc") {
+ // Sort by this column, descending order
+ bomSortFunction = function(a, b) {
+ return -comparator(a, b);
+ }
+ currentSortColumn.childNodes[1].classList.remove("asc");
+ currentSortColumn.childNodes[1].classList.add("desc");
+ currentSortOrder = "desc";
+ } else {
+ // Unsort
+ bomSortFunction = null;
+ currentSortColumn.childNodes[1].classList.remove("desc");
+ currentSortColumn.childNodes[1].classList.add("none");
+ currentSortColumn = null;
+ currentSortOrder = null;
+ }
+ } else {
+ // Sort by this column, ascending order
+ bomSortFunction = comparator;
+ currentSortColumn = this;
+ currentSortColumn.childNodes[1].classList.remove("none");
+ currentSortColumn.childNodes[1].classList.add("asc");
+ currentSortOrder = "asc";
+ }
+ populateBomBody();
+ }
+ return th;
+}
+
+function populateBomHeader() {
+ while (bomhead.firstChild) {
+ bomhead.removeChild(bomhead.firstChild);
+ }
+ var tr = document.createElement("TR");
+ var th = document.createElement("TH");
+ th.classList.add("numCol");
+ tr.appendChild(th);
+ checkboxes = bomCheckboxes.split(",").filter((e) => e);
+ var checkboxCompareClosure = function(checkbox) {
+ return (a, b) => {
+ var stateA = getCheckboxState(checkbox, a[3]);
+ var stateB = getCheckboxState(checkbox, b[3]);
+ if (stateA > stateB) return -1;
+ if (stateA < stateB) return 1;
+ return 0;
+ }
+ }
+ for (var checkbox of checkboxes) {
+ th = createColumnHeader(
+ checkbox, "bom-checkbox", checkboxCompareClosure(checkbox));
+ th.onclick = fancyDblClickHandler(
+ th, th.onclick.bind(th), checkboxSetUnsetAllHandler(checkbox));
+ tr.appendChild(th);
+ }
+ tr.appendChild(createColumnHeader("References", "References", (a, b) => {
+ var i = 0;
+ while (i < a[3].length && i < b[3].length) {
+ if (a[3][i] != b[3][i]) return a[3][i] > b[3][i] ? 1 : -1;
+ i++;
+ }
+ return a[3].length - b[3].length;
+ }));
+ // Extra fields
+ if (config.extra_fields.length > 0) {
+ var extraFieldCompareClosure = function(fieldIndex) {
+ return (a, b) => {
+ var fa = a[4][fieldIndex];
+ var fb = b[4][fieldIndex];
+ if (fa != fb) return fa > fb ? 1 : -1;
+ else return 0;
+ }
+ }
+ for (var i in config.extra_fields) {
+ tr.appendChild(createColumnHeader(
+ config.extra_fields[i], "extra", extraFieldCompareClosure(i)));
+ }
+ }
+ tr.appendChild(createColumnHeader("Value", "Value", (a, b) => {
+ return valueCompare(a[5], b[5], a[1], b[1]);
+ }));
+ tr.appendChild(createColumnHeader("Footprint", "Footprint", (a, b) => {
+ if (a[2] != b[2]) return a[2] > b[2] ? 1 : -1;
+ else return 0;
+ }));
+ tr.appendChild(createColumnHeader("Quantity", "Quantity", (a, b) => {
+ return a[3].length - b[3].length;
+ }));
+ bomhead.appendChild(tr);
+}
+
+function populateBomBody() {
+ while (bom.firstChild) {
+ bom.removeChild(bom.firstChild);
+ }
+ highlightHandlers = [];
+ currentHighlightedRowId = null;
+ var first = true;
+ switch (canvaslayout) {
+ case 'F':
+ bomtable = pcbdata.bom.F;
+ break;
+ case 'FB':
+ bomtable = pcbdata.bom.both;
+ break;
+ case 'B':
+ bomtable = pcbdata.bom.B;
+ break;
+ }
+ if (bomSortFunction) {
+ bomtable = bomtable.slice().sort(bomSortFunction);
+ }
+ for (var i in bomtable) {
+ var bomentry = bomtable[i];
+ if (filter && !entryMatches(bomentry)) {
+ continue;
+ }
+ var references = bomentry[3];
+ if (reflookup) {
+ references = findRefInEntry(bomentry);
+ if (references.length == 0) {
+ continue;
+ }
+ }
+ var tr = document.createElement("TR");
+ var td = document.createElement("TD");
+ var rownum = +i + 1;
+ tr.id = "bomrow" + rownum;
+ td.textContent = rownum;
+ tr.appendChild(td);
+ // Checkboxes
+ for (var checkbox of checkboxes) {
+ if (checkbox) {
+ td = document.createElement("TD");
+ var input = document.createElement("input");
+ input.type = "checkbox";
+ input.onchange = createCheckboxChangeHandler(checkbox, references);
+ setBomCheckboxState(checkbox, input, references);
+ td.appendChild(input);
+ tr.appendChild(td);
+ }
+ }
+ // References
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(references.map(r => r[0]).join(", "));
+ tr.appendChild(td);
+ // Extra fields
+ for (var i in config.extra_fields) {
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(bomentry[4][i]);
+ tr.appendChild(td);
+ }
+ // Value
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(bomentry[1]);
+ tr.appendChild(td);
+ // Footprint
+ td = document.createElement("TD");
+ td.innerHTML = highlightFilter(bomentry[2]);
+ tr.appendChild(td);
+ // Quantity
+ td = document.createElement("TD");
+ td.textContent = bomentry[3].length;
+ tr.appendChild(td);
+ bom.appendChild(tr);
+ var handler = createRowHighlightHandler(tr.id, references);
+ tr.onmousemove = handler;
+ highlightHandlers.push({
+ id: tr.id,
+ handler: handler,
+ refs: references
+ });
+ if ((filter || reflookup) && first) {
+ handler();
+ first = false;
+ }
+ }
+}
+
+function highlightPreviousRow() {
+ if (!currentHighlightedRowId) {
+ highlightHandlers[highlightHandlers.length - 1].handler();
+ } else {
+ if (highlightHandlers.length > 1 &&
+ highlightHandlers[0].id == currentHighlightedRowId) {
+ highlightHandlers[highlightHandlers.length - 1].handler();
+ } else {
+ for (var i = 0; i < highlightHandlers.length - 1; i++) {
+ if (highlightHandlers[i + 1].id == currentHighlightedRowId) {
+ highlightHandlers[i].handler();
+ break;
+ }
+ }
+ }
+ }
+ smoothScrollToRow(currentHighlightedRowId);
+}
+
+function highlightNextRow() {
+ if (!currentHighlightedRowId) {
+ highlightHandlers[0].handler();
+ } else {
+ if (highlightHandlers.length > 1 &&
+ highlightHandlers[highlightHandlers.length - 1].id == currentHighlightedRowId) {
+ highlightHandlers[0].handler();
+ } else {
+ for (var i = 1; i < highlightHandlers.length; i++) {
+ if (highlightHandlers[i - 1].id == currentHighlightedRowId) {
+ highlightHandlers[i].handler();
+ break;
+ }
+ }
+ }
+ }
+ smoothScrollToRow(currentHighlightedRowId);
+}
+
+function populateBomTable() {
+ populateBomHeader();
+ populateBomBody();
+}
+
+function modulesClicked(moduleIndexes) {
+ var lastClickedIndex = moduleIndexes.indexOf(lastClicked);
+ var index = moduleIndexes[(lastClickedIndex + 1) % moduleIndexes.length];
+ for (var handler of highlightHandlers) {
+ if (handler.refs.map(r => r[1]).indexOf(index) >= 0) {
+ lastClicked = index;
+ handler.handler();
+ smoothScrollToRow(currentHighlightedRowId);
+ break;
+ }
+ }
+}
+
+function updateFilter(input) {
+ filter = input.toLowerCase();
+ populateBomTable();
+}
+
+function updateRefLookup(input) {
+ reflookup = input.toLowerCase();
+ populateBomTable();
+}
+
+function silkscreenVisible(visible) {
+ if (visible) {
+ allcanvas.front.silk.style.display = "";
+ allcanvas.back.silk.style.display = "";
+ writeStorage("silkscreenVisible", true);
+ } else {
+ allcanvas.front.silk.style.display = "none";
+ allcanvas.back.silk.style.display = "none";
+ writeStorage("silkscreenVisible", false);
+ }
+}
+
+function changeCanvasLayout(layout) {
+ document.getElementById("fl-btn").classList.remove("depressed");
+ document.getElementById("fb-btn").classList.remove("depressed");
+ document.getElementById("bl-btn").classList.remove("depressed");
+ switch (layout) {
+ case 'F':
+ document.getElementById("fl-btn").classList.add("depressed");
+ if (bomlayout != "bom-only") {
+ canvassplit.collapse(1);
+ }
+ break;
+ case 'B':
+ document.getElementById("bl-btn").classList.add("depressed");
+ if (bomlayout != "bom-only") {
+ canvassplit.collapse(0);
+ }
+ break;
+ default:
+ document.getElementById("fb-btn").classList.add("depressed");
+ if (bomlayout != "bom-only") {
+ canvassplit.setSizes([50, 50]);
+ }
+ }
+ canvaslayout = layout;
+ writeStorage("canvaslayout", layout);
+ resizeAll();
+ populateBomTable();
+}
+
+function populateMetadata() {
+ document.getElementById("title").innerHTML = pcbdata.metadata.title;
+ document.getElementById("revision").innerHTML = "Rev: " + pcbdata.metadata.revision;
+ document.getElementById("company").innerHTML = pcbdata.metadata.company;
+ document.getElementById("filedate").innerHTML = pcbdata.metadata.date;
+ if (pcbdata.metadata.title != "") {
+ document.title = pcbdata.metadata.title + " BOM";
+ }
+}
+
+function changeBomLayout(layout) {
+ document.getElementById("bom-btn").classList.remove("depressed");
+ document.getElementById("lr-btn").classList.remove("depressed");
+ document.getElementById("tb-btn").classList.remove("depressed");
+ switch (layout) {
+ case 'bom-only':
+ document.getElementById("bom-btn").classList.add("depressed");
+ if (bomsplit) {
+ bomsplit.destroy();
+ bomsplit = null;
+ canvassplit.destroy();
+ canvassplit = null;
+ }
+ document.getElementById("frontcanvas").style.display = "none";
+ document.getElementById("backcanvas").style.display = "none";
+ document.getElementById("bot").style.height = "";
+ break;
+ case 'top-bottom':
+ document.getElementById("tb-btn").classList.add("depressed");
+ document.getElementById("frontcanvas").style.display = "";
+ document.getElementById("backcanvas").style.display = "";
+ document.getElementById("bot").style.height = "calc(100% - 80px)";
+ document.getElementById("bomdiv").classList.remove("split-horizontal");
+ document.getElementById("canvasdiv").classList.remove("split-horizontal");
+ document.getElementById("frontcanvas").classList.add("split-horizontal");
+ document.getElementById("backcanvas").classList.add("split-horizontal");
+ if (bomsplit) {
+ bomsplit.destroy();
+ bomsplit = null;
+ canvassplit.destroy();
+ canvassplit = null;
+ }
+ bomsplit = Split(['#bomdiv', '#canvasdiv'], {
+ sizes: [50, 50],
+ onDragEnd: resizeAll,
+ direction: "vertical",
+ gutterSize: 5
+ });
+ canvassplit = Split(['#frontcanvas', '#backcanvas'], {
+ sizes: [50, 50],
+ gutterSize: 5,
+ onDragEnd: resizeAll
+ });
+ break;
+ case 'left-right':
+ document.getElementById("lr-btn").classList.add("depressed");
+ document.getElementById("frontcanvas").style.display = "";
+ document.getElementById("backcanvas").style.display = "";
+ document.getElementById("bot").style.height = "calc(100% - 80px)";
+ document.getElementById("bomdiv").classList.add("split-horizontal");
+ document.getElementById("canvasdiv").classList.add("split-horizontal");
+ document.getElementById("frontcanvas").classList.remove("split-horizontal");
+ document.getElementById("backcanvas").classList.remove("split-horizontal");
+ if (bomsplit) {
+ bomsplit.destroy();
+ bomsplit = null;
+ canvassplit.destroy();
+ canvassplit = null;
+ }
+ bomsplit = Split(['#bomdiv', '#canvasdiv'], {
+ sizes: [50, 50],
+ onDragEnd: resizeAll,
+ gutterSize: 5
+ });
+ canvassplit = Split(['#frontcanvas', '#backcanvas'], {
+ sizes: [50, 50],
+ gutterSize: 5,
+ direction: "vertical",
+ onDragEnd: resizeAll
+ });
+ }
+ bomlayout = layout;
+ writeStorage("bomlayout", layout);
+ changeCanvasLayout(canvaslayout);
+}
+
+function focusFilterField() {
+ focusInputField(document.getElementById("filter"));
+}
+
+function focusRefLookupField() {
+ focusInputField(document.getElementById("reflookup"));
+}
+
+function toggleBomCheckbox(bomrowid, checkboxnum) {
+ if (!bomrowid || checkboxnum > checkboxes.length) {
+ return;
+ }
+ var bomrow = document.getElementById(bomrowid);
+ var checkbox = bomrow.childNodes[checkboxnum].childNodes[0];
+ checkbox.checked = !checkbox.checked;
+ checkbox.indeterminate = false;
+ checkbox.onchange();
+}
+
+function checkBomCheckbox(bomrowid, checkboxname) {
+ var checkboxnum = 0;
+ while (checkboxnum < checkboxes.length &&
+ checkboxes[checkboxnum].toLowerCase() != checkboxname.toLowerCase()) {
+ checkboxnum++;
+ }
+ if (!bomrowid || checkboxnum >= checkboxes.length) {
+ return;
+ }
+ var bomrow = document.getElementById(bomrowid);
+ var checkbox = bomrow.childNodes[checkboxnum + 1].childNodes[0];
+ checkbox.checked = true;
+ checkbox.indeterminate = false;
+ checkbox.onchange();
+}
+
+function setBomCheckboxes(value) {
+ bomCheckboxes = value;
+ writeStorage("bomCheckboxes", value);
+ populateBomTable();
+}
+
+document.onkeydown = function(e) {
+ switch (e.key) {
+ case "n":
+ if (document.activeElement.type == "text") {
+ return;
+ }
+ if (currentHighlightedRowId !== null) {
+ checkBomCheckbox(currentHighlightedRowId, "placed");
+ highlightNextRow();
+ e.preventDefault();
+ }
+ break;
+ case "ArrowUp":
+ highlightPreviousRow();
+ e.preventDefault();
+ break;
+ case "ArrowDown":
+ highlightNextRow();
+ e.preventDefault();
+ break;
+ default:
+ break;
+ }
+ if (e.altKey) {
+ switch (e.key) {
+ case "f":
+ focusFilterField();
+ e.preventDefault();
+ break;
+ case "r":
+ focusRefLookupField();
+ e.preventDefault();
+ break;
+ case "z":
+ changeBomLayout("bom-only");
+ e.preventDefault();
+ break;
+ case "x":
+ changeBomLayout("left-right");
+ e.preventDefault();
+ break;
+ case "c":
+ changeBomLayout("top-bottom");
+ e.preventDefault();
+ break;
+ case "v":
+ changeCanvasLayout("F");
+ e.preventDefault();
+ break;
+ case "b":
+ changeCanvasLayout("FB");
+ e.preventDefault();
+ break;
+ case "n":
+ changeCanvasLayout("B");
+ e.preventDefault();
+ break;
+ default:
+ break;
+ }
+ if (e.key >= '1' && e.key <= '9') {
+ toggleBomCheckbox(currentHighlightedRowId, parseInt(e.key));
+ }
+ }
+}
+
+function initDefaults() {
+ bomlayout = readStorage("bomlayout");
+ if (bomlayout === null) {
+ bomlayout = config.bom_view;
+ }
+ if (!['bom-only', 'left-right', 'top-bottom'].includes(bomlayout)) {
+ bomlayout = config.bom_view;
+ }
+ canvaslayout = readStorage("canvaslayout");
+ if (canvaslayout === null) {
+ canvaslayout = config.layer_view;
+ }
+ bomCheckboxes = readStorage("bomCheckboxes");
+ if (bomCheckboxes === null) {
+ bomCheckboxes = config.checkboxes;
+ }
+ document.getElementById("bomCheckboxes").value = bomCheckboxes;
+
+ var b = readStorage("silkscreenVisible");
+ if (b === null) {
+ b = config.show_silkscreen;
+ }
+ document.getElementById("silkscreenCheckbox").checked = b;
+ silkscreenVisible(b);
+
+ b = readStorage("redrawOnDrag");
+ if (b === null) {
+ b = config.redraw_on_drag;
+ }
+ document.getElementById("dragCheckbox").checked = b;
+ setRedrawOnDrag(b);
+
+ b = readStorage("darkmode");
+ if (b === null) {
+ b = config.dark_mode;
+ }
+ document.getElementById("darkmodeCheckbox").checked = b;
+ setDarkMode(b);
+
+ b = readStorage("highlightpin1");
+ if (b === null) {
+ b = config.highlight_pin1;
+ }
+ document.getElementById("highlightpin1Checkbox").checked = b;
+ setHighlightPin1(b);
+
+ boardRotation = readStorage("boardRotation");
+ if (boardRotation === null) {
+ boardRotation = config.board_rotation * 5;
+ } else {
+ boardRotation = parseInt(boardRotation);
+ }
+ document.getElementById("boardRotation").value = boardRotation / 5;
+ document.getElementById("rotationDegree").textContent = boardRotation;
+}
+
+window.onload = function(e) {
+ initUtils();
+ initRender();
+ initStorage();
+ initDefaults();
+ cleanGutters();
+ populateMetadata();
+ dbgdiv = document.getElementById("dbg");
+ bom = document.getElementById("bombody");
+ bomhead = document.getElementById("bomhead");
+ filter = "";
+ reflookup = "";
+ initDone = true;
+ // Triggers render
+ changeBomLayout(bomlayout);
+}
+
+window.onresize = resizeAll;
+window.matchMedia("print").addListener(resizeAll);
+
+///////////////////////////////////////////////
+
+ </script>
+</head>
+
+<body>
+<div id="topmostdiv" style="width: 100%; height: 100%">
+ <div id="top">
+ <div style="float: right;">
+ <div class="hideonprint menu" style="float: right; margin: 10px; top: 8px;">
+ <button class="menubtn"></button>
+ <div class="menu-content">
+ <label class="menu-label menu-label-top">
+ <input id="darkmodeCheckbox" type="checkbox" onchange="setDarkMode(this.checked)">
+ Dark mode
+ </label>
+ <label class="menu-label">
+ <input id="silkscreenCheckbox" type="checkbox" checked onchange="silkscreenVisible(this.checked)">
+ Show silkscreen
+ </label>
+ <label class="menu-label">
+ <input id="highlightpin1Checkbox" type="checkbox" onchange="setHighlightPin1(this.checked)">
+ Highlight first pin
+ </label>
+ <label class="menu-label">
+ <input id="dragCheckbox" type="checkbox" checked onchange="setRedrawOnDrag(this.checked)">
+ Continuous redraw on drag
+ </label>
+ <label class="menu-label">
+ <span>Board rotation</span>
+ <span style="float: right"><span id="rotationDegree">0</span>&#176;</span>
+ <input id="boardRotation" type="range" min="-36" max="36" value="0" class="slider" oninput="setBoardRotation(this.value)">
+ </label>
+ <label class="menu-label">
+ <div style="margin-left: 5px">Bom checkboxes</div>
+ <input id="bomCheckboxes" class="menu-textbox" type=text
+ oninput="setBomCheckboxes(this.value)">
+ </label>
+ <label class="menu-label">
+ <span class="shameless-plug">
+ <span>Created using</span>
+ <a target="blank" href="https://github.com/openscopeproject/InteractiveHtmlBom">InteractiveHtmlBom</a>
+ </span>
+ </label>
+ </div>
+ </div>
+ <div class="button-container hideonprint"
+ style="float: right; margin: 10px; position: relative; top: 8px">
+ <button id="fl-btn" class="left-most-button" onclick="changeCanvasLayout('F')"
+ title="Front only">F
+ </button>
+ <button id="fb-btn" class="middle-button" onclick="changeCanvasLayout('FB')"
+ title="Front and Back">FB
+ </button>
+ <button id="bl-btn" class="right-most-button" onclick="changeCanvasLayout('B')"
+ title="Back only">B
+ </button>
+ </div>
+ <div class="button-container hideonprint"
+ style="float: right; margin: 10px; position: relative; top: 8px">
+ <button id="bom-btn" class="left-most-button" onclick="changeBomLayout('bom-only')"
+ title="BOM only"></button>
+ <button id="lr-btn" class="middle-button" onclick="changeBomLayout('left-right')"
+ title="BOM left, drawings right"></button>
+ <button id="tb-btn" class="right-most-button" onclick="changeBomLayout('top-bottom')"
+ title="BOM top, drawings bot"></button>
+ </div>
+ </div>
+ <div id="fileinfodiv" style="overflow: auto;">
+ <table class="fileinfo">
+ <tbody>
+ <tr>
+ <td id="title" class="title" style="width: 70%">
+ Title
+ </td>
+ <td id="revision" class="title" style="width: 30%">
+ Revision
+ </td>
+ </tr>
+ <tr>
+ <td id="company">
+ Kicad version
+ </td>
+ <td id="filedate">
+ Date
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <div id="bot" class="split" style="height: calc(100% - 80px)">
+ <div id="bomdiv" class="split split-horizontal">
+ <div style="width: 100%">
+ <input id="reflookup" class="searchbox reflookup hideonprint" type="text" placeholder="Ref lookup"
+ oninput="updateRefLookup(this.value)">
+ <input id="filter" class="searchbox filter hideonprint" type="text" placeholder="Filter"
+ oninput="updateFilter(this.value)">
+ <div class="button-container hideonprint" style="float: left">
+ <button id="copy" title="Copy bom table to clipboard"
+ onclick="copyToClipboard()"></button>
+ </div>
+ </div>
+ <div id="dbg"></div>
+ <table class="bom">
+ <thead id="bomhead">
+ </thead>
+ <tbody id="bombody">
+ </tbody>
+ </table>
+ </div>
+ <div id="canvasdiv" class="split split-horizontal">
+ <div id="frontcanvas" class="split" style="overflow: hidden">
+ <div style="position: relative; width: 100%; height: 100%;">
+ <canvas id="F_bg" style="position: absolute; left: 0; top: 0; z-index: 0;"></canvas>
+ <canvas id="F_slk" style="position: absolute; left: 0; top: 0; z-index: 1;"></canvas>
+ <canvas id="F_hl" style="position: absolute; left: 0; top: 0; z-index: 2;"></canvas>
+ </div>
+ </div>
+ <div id="backcanvas" class="split" style="overflow: hidden">
+ <div style="position: relative; width: 100%; height: 100%;">
+ <canvas id="B_bg" style="position: absolute; left: 0; top: 0; z-index: 0;"></canvas>
+ <canvas id="B_slk" style="position: absolute; left: 0; top: 0; z-index: 1;"></canvas>
+ <canvas id="B_hl" style="position: absolute; left: 0; top: 0; z-index: 2;"></canvas>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+</body>
+
+</html>
diff --git a/traffic/traffic b/traffic/traffic
new file mode 100644
index 0000000..978ae03
--- /dev/null
+++ b/traffic/traffic
@@ -0,0 +1,18 @@
+Source,/home/easwaran/allProjects/kicad/openplc_modules/traffic/traffic.sch
+Kicad Rev,Eeschema 5.0.1
+Generated Date,Mon 21 Jan 2019 01:24:52 PM IST
+
+Title,Not Set
+Company,Not Set
+Revision,Not Set
+Date Issue,Not Set
+
+Reference,Value,Library,Library Ref
+D1,left,Device,LED
+D5,STOP,Device,LED
+D2,GO,Device,LED
+D4,ready,Device,LED
+D3,right,Device,LED
+R1,R,Device,R
+J1,Conn_01x06_Male,Connector,Conn_01x06_Male
+J2,Conn_01x02_Male,Connector,Conn_01x02_Male
diff --git a/traffic/traffic.xml b/traffic/traffic.xml
new file mode 100644
index 0000000..3a67cf7
--- /dev/null
+++ b/traffic/traffic.xml
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<export version="D">
+ <design>
+ <source>/home/easwaran/allProjects/kicad/openplc_modules/traffic/traffic.sch</source>
+ <date>Mon 21 Jan 2019 01:24:52 PM IST</date>
+ <tool>Eeschema 5.0.1</tool>
+ <sheet number="1" name="/" tstamps="/">
+ <title_block>
+ <title/>
+ <company/>
+ <rev/>
+ <date/>
+ <source>traffic.sch</source>
+ <comment number="1" value=""/>
+ <comment number="2" value=""/>
+ <comment number="3" value=""/>
+ <comment number="4" value=""/>
+ </title_block>
+ </sheet>
+ </design>
+ <components>
+ <comp ref="D1">
+ <value>left</value>
+ <footprint>LEDs:LED_D5.0mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2C2999</tstamp>
+ </comp>
+ <comp ref="D5">
+ <value>STOP</value>
+ <footprint>LEDs:LED_D5.0mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2C2A10</tstamp>
+ </comp>
+ <comp ref="D2">
+ <value>GO</value>
+ <footprint>LEDs:LED_D5.0mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2C2A3E</tstamp>
+ </comp>
+ <comp ref="D4">
+ <value>ready</value>
+ <footprint>LEDs:LED_D5.0mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2C2A6F</tstamp>
+ </comp>
+ <comp ref="D3">
+ <value>right</value>
+ <footprint>LEDs:LED_D5.0mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="LED" description="Light emitting diode"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2C2AD6</tstamp>
+ </comp>
+ <comp ref="R1">
+ <value>R</value>
+ <footprint>Resistors_SMD:R_0603_HandSoldering</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Device" part="R" description="Resistor"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2C3B8D</tstamp>
+ </comp>
+ <comp ref="J1">
+ <value>Conn_01x06_Male</value>
+ <footprint>Socket_Strips:Socket_Strip_Straight_1x06_Pitch2.54mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x06_Male" description="Generic connector, single row, 01x06, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C2C6811</tstamp>
+ </comp>
+ <comp ref="J2">
+ <value>Conn_01x02_Male</value>
+ <footprint>Socket_Strips:Socket_Strip_Straight_1x02_Pitch2.54mm</footprint>
+ <datasheet>~</datasheet>
+ <libsource lib="Connector" part="Conn_01x02_Male" description="Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)"/>
+ <sheetpath names="/" tstamps="/"/>
+ <tstamp>5C3CB942</tstamp>
+ </comp>
+ </components>
+ <libparts>
+ <libpart lib="Connector" part="Conn_01x02_Male">
+ <description>Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>Connector*:*_1x??_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">J</field>
+ <field name="Value">Conn_01x02_Male</field>
+ </fields>
+ <pins>
+ <pin num="1" name="Pin_1" type="passive"/>
+ <pin num="2" name="Pin_2" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Connector" part="Conn_01x06_Male">
+ <description>Generic connector, single row, 01x06, script generated (kicad-library-utils/schlib/autogen/connector/)</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>Connector*:*_1x??_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">J</field>
+ <field name="Value">Conn_01x06_Male</field>
+ </fields>
+ <pins>
+ <pin num="1" name="Pin_1" type="passive"/>
+ <pin num="2" name="Pin_2" type="passive"/>
+ <pin num="3" name="Pin_3" type="passive"/>
+ <pin num="4" name="Pin_4" type="passive"/>
+ <pin num="5" name="Pin_5" type="passive"/>
+ <pin num="6" name="Pin_6" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Device" part="LED">
+ <description>Light emitting diode</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>LED*</fp>
+ <fp>LED_SMD:*</fp>
+ <fp>LED_THT:*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">D</field>
+ <field name="Value">LED</field>
+ </fields>
+ <pins>
+ <pin num="1" name="K" type="passive"/>
+ <pin num="2" name="A" type="passive"/>
+ </pins>
+ </libpart>
+ <libpart lib="Device" part="R">
+ <description>Resistor</description>
+ <docs>~</docs>
+ <footprints>
+ <fp>R_*</fp>
+ </footprints>
+ <fields>
+ <field name="Reference">R</field>
+ <field name="Value">R</field>
+ </fields>
+ <pins>
+ <pin num="1" name="~" type="passive"/>
+ <pin num="2" name="~" type="passive"/>
+ </pins>
+ </libpart>
+ </libparts>
+ <libraries>
+ <library logical="Connector">
+ <uri>/usr/share/kicad/library/Connector.lib</uri>
+ </library>
+ <library logical="Device">
+ <uri>/usr/share/kicad/library/Device.lib</uri>
+ </library>
+ </libraries>
+ <nets>
+ <net code="1" name="Net-(D2-Pad1)">
+ <node ref="J1" pin="3"/>
+ <node ref="D2" pin="1"/>
+ </net>
+ <net code="2" name="+5C">
+ <node ref="J1" pin="1"/>
+ <node ref="R1" pin="2"/>
+ <node ref="J2" pin="2"/>
+ </net>
+ <net code="3" name="Net-(D3-Pad1)">
+ <node ref="D3" pin="1"/>
+ <node ref="J1" pin="6"/>
+ </net>
+ <net code="4" name="Net-(D5-Pad1)">
+ <node ref="D5" pin="1"/>
+ <node ref="J1" pin="5"/>
+ <node ref="J2" pin="1"/>
+ </net>
+ <net code="5" name="Net-(D4-Pad1)">
+ <node ref="D4" pin="1"/>
+ <node ref="J1" pin="4"/>
+ </net>
+ <net code="6" name="Net-(D1-Pad2)">
+ <node ref="D4" pin="2"/>
+ <node ref="R1" pin="1"/>
+ <node ref="D5" pin="2"/>
+ <node ref="D1" pin="2"/>
+ <node ref="D2" pin="2"/>
+ <node ref="D3" pin="2"/>
+ </net>
+ <net code="7" name="Net-(D1-Pad1)">
+ <node ref="J1" pin="2"/>
+ <node ref="D1" pin="1"/>
+ </net>
+ </nets>
+</export>